Host machine win7linux ubuntu 14.04 LTS reference: Linux series: Ubuntu virtual machine Set fixed IP internet (configure IP, gateway, DNS, prevent resolv.conf from being rewritten) 1 Win7 set up virtual NIC 8
2 after setting up the virtual machine, restore the default settings first. It's on the VMnet8. Set 3 to enter Linux through Ifconfig view current NIC
In Linux, you can see the current Linux network card through Ifconfig. (the default appears to be sort from 0)
The eth0 in the virtual machine should be the Wamre8 network card of our outside host such as Win7.
Modify File/etc/network/interfacesmy configuration is as follows: Here the address needs to be the same network segment as the Wamre8 NIC in Win7. Gateway to be consistent. Dns-nameservers cannot access the Internet via the domain name if not set.
# interfaces(5) file used by ifup(8) and ifdown(8)auto loiface lo inet loopbackauto eth0iface eth0 inet staticaddress 192.168.127.58netmask 255.255.255.0gateway 192.168.127.2dns-nameservers 223.5.5.5 #192.168.64.2#auto eth0
you can then ping and telnet to each other on the host machine and Linuxif Ping can not telnet, check the firewall.
the host can access the Web services in the virtual machine directly through the browserThe host accesses the 80 port of the virtual machine as if there is a default problem and can perform two machine port mappings by doing the following.
From for notes (Wiz)
Example Ubuntu virtual machine set fixed IP internet