After cloning a virtual machine, CentOS has no eth0 solution
We often need to clone a new system from a virtual machine system that has already been installed (it is not necessary to change the physical address of the NIC when cloning), but after the new system starts, it will find that the system network is not working properly.
This time from master cloning 3 computers, named Slave1, Slave2, Slave3, start slave1,
Enter ifconfig and find there is no eth0,1 shown at all.
By modifying the/etc/network/interfaces configuration eth0 address, start the network card service, there is still no eth0, but will add a eth2.
This is the reason why the Device Manager Udev was used. Udev is a Device Manager for the Linux kernel 2.6 series. Its main function is to manage the device nodes under the/dev directory. It is also used to replace the DEVFS and hotplug functions, which means that it handles the/dev directory and all user space behavior when adding/removing hardware, including when loading firmware.
Locate the Udev configuration file,/etc/udev/rules.d/70-persistent-net.rules. Its contents are shown in 2.
In naming, the MAC address matching method is used to record the name of the network card. In other words, the physical address of the original network card has been recorded to the eth0, the cloning time modified the physical address of the network card, was recorded on the eth1, making the clone system only eth1, modify a eth0, automatically match the increase of a network card, eth0 still does not exist.
From this, it is very simple, directly delete the file, and then modify the physical address of the/etc/sysconfig/network-scripts/ifcfg-eth0 eth0, so that the data and the system generated consistent, and then, restart the system to fix the problem.
Resources:
1, http://f.dataguru.cn/thread-479438-1-1.html
There is no eth0 after the CentOS virtual machine clone in VMware