The virtual machine uses VMware Workstation, the network is configured for NAT, and after cloning, the Ifconfig view shows only the LO network card, ifconfig-a can be viewed to eth0, but no IP address.
We use the dhclient command, get to the IP, can be used normally. However, if you restart, you will still lose the IP information.
A complete solution:
modify /etc/udev/rules.d/70-persistent-net.rules eth0 line, The MAC address of the machine before cloning is also recorded here. But the newly started system Mac has changed, Change Name= "eth1" to "eth0", ATTR tagged mac address, this is the Mac assigned by the virtual machine to this virtual network card, replace it with the Mac above /etc/sysconfig/network-scripts/ Mac in Ifcfg-eth0 (default should automatically update to new MAC address)
Direct restart of service network restart is not good and requires restarting the machine to take effect.
This article is from the "Riding" blog, make sure to keep this source http://dezhou.blog.51cto.com/332858/1763744
A solution that fails to start a network card or is unable to access the Internet after cloning a virtual machine via CentOS