|
|
在官方的WIKI上看到的这种方式:
编辑以下这几个文件然后重新启动:
/etc/conf.d/bridges
/etc/rc.conf
/etc/vbox/interfaces
Ready? Let's go!
/etc/conf.d/bridges:
bridge_br0="eth0" # Put any interfaces you need.
BRIDGE_INTERFACES=(br0)
/etc/rc.conf:
把bridge添加到MODULES
MODULES=( <your other modules> bridge)
在网络配置选项,做如下更改:
lo="lo 127.0.0.1"
eth0="eth0 up" # If you have more interfaces in the previous file, more lines like "if_number="if_number up" here.
br0="dhcp" # Maybe you have some static configuration... I use DHCP.
INTERFACES=(lo eth0 br0)
/etc/vbox/interfaces (you can set up more interfaces if you want. Sky is the limit!):
vbox0 your_user br0 # Be sure that your user is in the vboxusers group.
Reboot and enjoy!
NOTE: Remember to set up your virtual machine with proper network configuration.
NOTE: If you have any issue, make sure that you have the bridge-utils package installed and vboxnet daemon loaded |
|