Recently, to use Nginx to build a virtual experimental environment of reverse proxy after cloning in the virtual machine, the cloned system does not correctly access the network.
The troubleshooting was found because the cloned environment changed the location of the network card, so the MAC address is incorrect.
Share a lazy way
The first step:
Delete/etc/udev/rules.d/70-persistent-net.rules file Here's an old MAC address.
Step Two:
Reboot let the system automatically generate a new 70-persistent-net.rules file
Step Three:
Vi/etc/udev/rules.d/70-persistent-net.rules record the new MAC address
Fourth Step:
CD/ETC/SYSCONFIG/NETWORK-SCRIPTS/MV ifcfg-eth0 ifcfg-eth1vi ifcfg-eth1 replace HWADDR to modify IP for new MAC address for new IP
Fifth Step
Service Network restart
OK to complete the configuration here, ping the original CentOS IP, no problem.
After cloning CentOS, the virtual machine network configuration