Solution to CentOS7 network restart error in VMware
Solution 1
Applicable situation: the cloning of a virtual machine fails to access the network.
Analysis: In this case, the network MAC address of the cloned virtual machine is not modified.
Solution:
1. Enter vi/etc/sysconfig/network-scripts/on the terminal/Ifcfg-ens33 (the bold part is the name of your own Nic, available ifconfig command to view );
2. modify or add HWADDR = "XXXX" to the file. XXXX is the MAC address of your network card. You can view the address using the ip addr command.
Solution 2Applicable scenario: solution 1 cannot be solved
Solution: Start a service named NetworkManager-wait-online at startup (command: systemctl enable NetworkManager-wait-online.service)
Solution 3Applicable scenario: solution 2 cannot solve
Analysis: I don't know why, but Baidu has come up with a solution to my problem. You can also try it.
Solution:
1. disable network management in configuration (chkconfig NetworkManager off)
2. Enable chkconfig network on in the configuration)
3. service NetworkManager stop)
4. Enable network Management (service network start) in the service)
So far, my problem has been solved.
If it still doesn't work, you can try to delete the configuration file and try to get another one. I won't go into details about the specifics.