What the editor brings to you today is how to solve the problem of CentOS7 network restart under VMware; follow the editor to take a look!
Solution 1
Applicable situations: the problem that the cloned virtual machine cannot access the Internet
Analysis: In this case, it is probably because the network MAC address of the virtual machine has not been modified after cloning the virtual machine.
solve:
1. Enter in the terminal: vi /etc/sysconfig/network-scripts/ifcfg-ens33 (The bold part is the name of your own network card, you can view it with the ifconfig command);
2. Modify or add HWADDR="XXXX" in the file. XXXX is the MAC address of your own network card. You can use the ip addr command to view it.
Solution 2
Applicable situations: solution one cannot solve the problem
Solution: Start a service named NetworkManager-wait-online after booting (command: systemctl enable NetworkManager-wait-online.service)
Solution Three
Applicable situations: Solution 2 cannot solve the problem
Analysis: I don’t know why, but Baidu has a solution to my problem. You can also try it.
solve:
1. Turn off network management in configuration (chkconfig NetworkManager off)
2. Turn on network management in configuration (chkconfig network on)
3. Close network management in the service (service NetworkManager stop)
4. Start network management in the service (service network start)
Now my problem is solved.
If it still doesn’t work, you can try to delete the configuration file and create a new one. Please download it from Baidu and I won’t go into details.
The above is the detailed content of How to solve the problem of CentOS7 network restart failure in VMware. For more information, please follow other related articles on the PHP Chinese website!