Qemu on FreeBSD6.2 is connected through bridging

Source: Internet
Author: User

The qemu in my FreeBSD virtualizes a 2003 value and has always been a NAT method (default). The problem is that I cannot communicate with other machines on the Intranet, therefore, many tests cannot be performed. After checking the information, we found that Bridge can be used. The specific practices are as follows:

1. Add the following lines in/boot/loader. conf to start the machine to automatically load aio, kqemu, if_tap, if_bridge, and bridge modules (if the module is not supported, re-compile the kernel ):

Aio_load = "YES"
Kqemu_load = "YES"
Bridge_load = "YES"
If_tap_load = "YES"
If_bridge_load = "YES"

2. Run the sysctl variable and add the following line to/etc/sysctl. conf.

Net. link. tap. user_open = 1

3. Bridge and kqemu, and add the following lines to/etc/rc. conf:

Kqemu_enable = "YES"
Cloned_interfaces = "bridge0"
Ifconfig_bridge0 = "addm fxp0"

My physical network port is fxp0.

4. Add the-net nic-net tap parameter at startup. Otherwise, the NAT mode is used by default instead of bridging:

/Usr/local/bin/qemu-net nic-net tap-hda/usr/local/qemu/windows. img-cdrom/root/8029.iso-boot c-m 512-localtime

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.