Problem: After the virtual machine is completely cloned, it is found that some hosts can access the Internet, but the cloned hosts cannot access the Internet. If the network is restarted, an error will be reported, and the ssh connection cannot be performed, as shown in the figure:
reason:
This is because in ifcfg-eth0, the MAC address of the cloned host is saved, and a new network card is used after cloning with a new MAC address.
Solution:
1. Modify according to the picture
vi /etc/sysconfig/network-scripts/ifcfg-eth0
Modify according to the picture:
2. Restart the system after deleting 70-persistent-net.rules
rm -rf /etc/udev/rules.d/70-persistent-net.rules shutdown -r now
After the system is started, you can access the Internet and connect via ssh.