"Device eth0 does not seem to be pres

  
caused by Linux clone virtual machine         

The virtual machine Vmware cloned a Red Hat Enterprise Linx and found that the network card could not be found. As shown below, if you start the network service in the command window, you will encounter "Device eth0 does not seem to be present, delaying initialization & ldquo; error

on this error, search a bit online information, people find quite encountered this type of error, learned about the causes of errors and produce solutions

Reason for error:


The cloned Linux system is running on a new machine and the physical address of the new server NIC has changed. The /etc/udev/rules.d/70-persistent-net.rules file determines the binding between the NIC and the MAC address information. The MAC of the cloned NIC has changed, causing the system to consider the network device. Does not exist, the network does not start properly. The other one is the old MAC address in /etc/sysconfig/network-scripts/ifcfg-eth0.

About /etc/udev/rules.d/70-persistent-net.rules This file automatically detects changes when it starts, and then writes to /etc/udev by /lib/udev/write_net_rules /rules.d/70-persistent-net.rules A new configuration section, the serial number of the network card is incremented (if the original is eth0, then an eth1 is generated after the first modification, and an eth2 is generated after modification) And its ATTR{address} value is the mac address corresponding to the current network card.


Solution:


1: Edit the /etc/sysconfig/network-scripts/ifcfg-eth0 configuration file, which will be ifcfg-eth0 The previous line about the MAC address in the configuration file is deleted or modified. In addition, the IP address of the cloned server is static IP, or it is changed 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 After rebooting, the system will automatically generate a 70-persistent-net.rules file.

Because this file is bound to the network card and MAC address, after changing the network card, the MAC address has changed, so it can not be started normally. You can also directly edit this configuration file to modify the internal network card and MAC address to correspond. However, this is a lot of trouble, directly delete the restart, it will automatically generate a new file.


contents before deleting 70-persistent-net.rules of

regenerated 70-persistent-net.rules content


OK after reboot, but I want to set the test server to dynamic IP, so I modified it in the /etc/sysconfig/network-scripts/ifcfg-eth0 configuration file, but I always get it. If you don't have an IP address, change the address to a static IP address. There is no problem. Toss for a long time. Finally, you need to run the dhclient command to get the dynamic IP address.


Reference
Author: Xiaoxiang hermit Source: http: //www.cnblogs.com/kerrycode/article belongs to all authors, welcome to reprint, but without the author's consent This paragraph statement must be retained and the original text link is given in the obvious position on the article page.

Copyright © Windows knowledge All Rights Reserved