Download: http://note.sdo.com/u/634870192378852873/n/7ero9 ~ Kigocvnm36q000ij
First, how to configure the static IP address of ubuntu in the Virtual Machine
Run sudo VI/etc/Network/interfaces
Modify the IP address of a DNS server
Sudo VI/etc/resolv. conf
Restart the network service
Sudo/etc/init. d/networking restart
View network configurations
Ifconfig
2. Set the NIC connection mode of the virtual machine to Nat.
Step 3: Run ipcongfig in the Command window in Windows to view vmnet8 attributes
Attributes of vmnet8 are as follows:
Vmnet8 attributes: IP 192.168.145.1 subnet mask 255.255.0
Step 4: Set the IP address of the VM to be in the same network segment as vmnet8 (that is, the subnet mask is the same, and the IP address should be in the form of 192.168.145.xxx, where XXX is set, but it should not be 1 or 255), and then set the virtual machine's gateway and DNS Server IP address to the vmnet8 IP address, that is, 192.168.145.1.
Note:
After the above settings, no network cable is inserted, and the virtual machine can communicate with the host machine;
For example, the IP address of my host machine is configured as follows:
The VM can only ping vmnet8.
Whether the host machine is connected to the Internet. You can successfully ping the Virtual Machine IP address on the host machine.