ubuntu 8.04 配置网络桥使virtualbox虚拟机联网

Kvm、VMware、Virtualbox、Xen、Qemu 等
回复
sundoctor
帖子: 125
注册时间: 2007-01-16 15:41

ubuntu 8.04 配置网络桥使virtualbox虚拟机联网

#1

帖子 sundoctor » 2008-06-09 1:37

第一种配置方法:
#sudo apt-get install bridge-utils
#sudo gedit /etc/network/interfaces
加入
auto br0
iface br0 inet dhcp
#iface br0 inet static
#address 192.168.1.108
#netmask 255.255.255.0
#gateway 192.168.1.1
bridge_ports eth0
保存。

#sudo /etc/init.d/networking restart
#sudo VBoxAddIF vbox0 <user> br0
<user>为你系统登录用户名

在 VirtualBox 中,设置
连接方式: Host Interface
Host Interface: vbox0
启动虚拟机,然后设置 IP,DNS 和 MASK

第二种配置方法:
#sudo apt-get install uml-utilities
#sudo gpasswd -a <user> uml-net
<user>为你系统登录用户名

#sudo gedit /etc/network/interfaces
加入
auto tap0
iface tap0 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user <user>

auto br0
iface br0 inet dhcp
#iface br0 inet static
#address 192.168.1.108
#netmask 255.255.255.0
#gateway 192.168.1.1
bridge_ports eth0 tap0
<user>为你系统登录用户名,保存。

#sudo /etc/init.d/networking restart

在 VirtualBox 中,设置
连接方式: Host Interface
Host Interface: tap0
启动虚拟机,然后设置 IP,DNS 和 MASK
回复