主机与虚拟系统通信(无网线情况下)



环境:
主机:openSUSE 12.2
虚拟机:VirtualBox 4.1.22
虚拟的系统:ubuntu 12.04
  www.2cto.com  
step1: 设置VirtualBox
1)   管理(F) --> 全局设定 (P)   或者  ctrl+g 
  2)  选择“网络”
3)  添加 “Host-Only”

 
4) 取消DHCP

 
5)  网卡选择 “Host-Only”
 

step2: ubuntu的网络设置

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.56.99
netmask 255.255.255.0
gateway 192.168.56.1
  www.2cto.com  
这样,主机就可以在没有连接网线的情况下,与虚拟系统连接。
主机使用 ifconfig eth0 192.168.56.90 设定IP,使之与虚拟系统为统一网段。
这样虚拟系统也可以访问主机了。

相关内容

    暂无相关文章