Device eth0 does not seem to be present,delaying initialization.

场景:在进行linux 主机克隆的时候,网卡初始化通常都会有问题,最多见的“Device eth0 does not seem to be present,delaying initialization.”,从字面意思 说eth0没有固化,延迟启动。因为网卡有MAC地址信息,这个是物理网卡决定的,虚拟机的网卡MAC地址是在网卡初始化的时候就肯定下来,固然也能够修改:linux

这个MAC地址在两个地方有,因此在克隆虚拟机的时候必定记得要把这个MAC改掉。一个是 /etc/sysconfig/network-scripts/ifcfg-eth0,spa

DEVICE=eth0
HWADDR=00:0c:29:7e:aa:f3
TYPE=Ethernet
UUID=7e686749-c1d9-422d-9275-c8174d8ad7a5
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.83.11
IPV6INIT=no
USERCTL=n

另一个是 /etc/udev/rules.d/70-persistent-net.rulescode

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:7e:aa:f3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

如上 要保证 HWADDR和ATTR{address}一致,NAME也要保持一致,而后重启网卡生效。blog