Virtual machine bad n more back, really let me installed to vomit blood, after two days of tossing finally figure out how to configure the static IP of the virtual machine.
Method:
1. Turn the virtual machine,--> Open edit, click Virtual Network Map, and click Restore Defaults in the lower-left corner of VMnet8
Wait for your network segment to be seen after the restore is complete
OK, finish.
2. Virtual machine settings, enter the virtual machine to open the terminal
cd/etc/sysconfig/net/network-scripts/
ll
Enter the above two command to see the diagram of the red box configuration, the following figure is my successful operation of the directory, before the Ifcfg-eth0 this file.
If you do not have that file, you can copy the Ifcfg-lo file, modify it, and Ifcfg-lo is the configuration of the local loopback IP
sudo cp Ifcfg-lo Ifcfg-eth0
sudo vim Ifcfg-eth0
Enter Eth0 to modify
255.255.255.0 is a subnet mask, and I don't know what to do, but I've been setting this up.
After Setup is complete, restart the network
Service Network restart
Ping www.baidu.com
See if the network is ping, ping
Set the hostname of Linux
sudo vim/etc/sysconfig/network
Set up virtual network mappings
sudo vim/etc/hosts
3. Configure the network map on Windows to set the Hosts file on Windows
C:\Windows\System32\drivers\etc\hosts
Open the Hosts file and add the static IP and host name to the last side
================================================================================
The 2nd step on the virtual machine settings can also use the mouse action () Right click on the small computer)
Follow the above steps to complete the setup, restart the network
Troubleshoot virtual machine networking issues Linux VMware eth0