在VMware中克隆完成后,开启系统,启动网卡时出现错误,提示这样的失败:网络
Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization. [FAILED]
ide
是由于网卡mac地址写入硬件致使问题
oop
在RHEL5里也发生相似事情,由于复制虚拟机MAC会从新生成,可是操做系统的MAC却写在ifcfg-ethx里,形成了不一致,因此不能启动 网络接口,在RHEL5里能够使用kudzu或者注释网卡配置文件的MAC字段来解决这个问题。可是在RHEL6里,kudzu已经被hal服务取代了。 虽然lspci可以正常认到网卡,可是却没法使用/etc/init.d/network restart来启动服务。尝试注释ifcfg-eth0的MAC字段,仍是报错。查看了下udev的规则,发现了问题的所在。操作系统
[root@Oracle ~]# cat /etc/udev/rules.d/70-persistent-net.rules
# 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.rest
# net device () (custom name provided by external tool)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”08:00:27:16:31:11″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″code
# net device ()
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”08:00:27:32:66:63″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″
[root@Oracle ~]#接口
原来UDEV这里把克隆前的MAC当成了当前虚拟机的eth0 MAC,而从新生成的08:00:27:32:66:63是eth1的MAC。ci
解决这个问题,只要删除旧的UDEV配置,修改成:
[root@Oracle ~]# cat /etc/udev/rules.d/70-persistent-net.rules
# 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.generator
# net device () (custom name provided by external tool)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”08:00:27:32:66:63″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″虚拟机
重启network服务有时能够有时不行,重启系统就一切OK!试过屡次![root@Oracle ~]# /etc/init.d/network restartShutting down interface eth0: [ OK ]Shutting down loopback interface: [ OK ]Bringing up loopback interface: [ OK ]Bringing up interface eth0: [ OK ][root@Oracle ~]# ifconfig eth0eth0 Link encap:Ethernet HWaddr 08:00:27:32:66:63inet addr:172.16.100.3 Bcast:172.16.100.255 Mask:255.255.255.0inet6 addr: fe80::a00:27ff:fe32:6663/64 Scope:LinkUP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1RX packets:206 errors:0 dropped:0 overruns:0 frame:0TX packets:203 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000RX bytes:21157 (20.6 KiB) TX bytes:24515 (23.9 KiB)