"Device eth0 does not seem to be present, delaying initialization" caused by a Linux clone virtual machine
Virtual machine vmware Cloning a red Hat Enterprise Linx startup found that the network card could not find the NIC, as shown below, if you start the Web Service in the command window will encounter "Device Eth0 does not seem to be present, Delayin G Initialization "error
About this error, search the information on the Internet, found that quite a lot of people have encountered such errors, understand the cause of the error and solutions
Cause of Error:
The cloned Linux system runs on the new machine, and the physical address of the new server NIC has changed. And/etc/udev/rules.d/70-persistent-net.rules This file determines the network card and the MAC address of the binding between the information, the cloned Nic Mac has changed, so that the system does not think the network device exists, the network can not start normally. The other one is the/etc/sysconfig/network-scripts/ifcfg-eth0 inside the MAC address is also old information.
About/etc/udev/rules.d/70-persistent-net.rules This file, the system automatically monitors for changes when it starts, and then writes the/lib/udev/write_net_rules to/ETC/UDEV/RULES.D /70-persistent-net.rules A new configuration section, the serial number of the network card is incremented sequentially (for example, the original is eth0, then modify the first generation into a eth1, again modified to generate a eth2 ... ), and the value of its attr{address} is the corresponding MAC address of the current network card.
Workaround:
1: Edit the/etc/sysconfig/network-scripts/ifcfg-eth0 configuration file, the Ifcfg-eth0 in the configuration file in the previous about the MAC address this line deleted or modified. In addition, the cloned server IP setting is static IP, either modified to a different IP address or set to dynamic IP, restart the network card service
2: Find/etc/udev/rules.d/70-persistent-net.rules Delete and restart the machine, the system will automatically generate a 70-persistent-net.rules file.
Because this file is bound to the network card and MAC address, changed the network card after the MAC address has changed, so it can not start normally, or directly edit the configuration file inside the network card and MAC address modified to correspond, but so much trouble, the direct deletion of the restart, it will automatically generate a new file.
Delete Pre-70-persistent-net.rules content
Regenerating the contents of the 70-persistent-net.rules
Reboot OK, but I want to set the test server as a dynamic IP, so in the/etc/sysconfig/network-scripts/ifcfg-eth0 configuration file modified, but always get the IP address, change the address to a static IP address and no problem , tossing for a long time, the last sad discovery needs to run the dhclient command to get the dynamic IP address.
"Device eth0 does not seem to be present, delaying initialization" caused by a Linux clone virtual machine