虚拟机NAT网关:192.168.50.1
主机VM8网址:192.168.50.2
虚拟机网卡:192.168.50.30
vim /etc/network/interfaces
1 # The loopback network interface
2 auto lo
3 iface lo inet loopback
4 #eth0
5 auto eth0
6 iface eth0 inet static
7 address 192.168.50.30
8 netmask 255.255.255.0
9 network 192.168.50.0
10 gateway 192.168.50.1
vim /etc/resolv.conf
1 search localdomain
2 nameserver 192.168.50.1
service networking restart
OK