1. 程式人生 > >使用Hyper-v克隆虛擬機器出現克隆後虛擬機器不能使用eth0,eth0 提示Device does not seem to be present

使用Hyper-v克隆虛擬機器出現克隆後虛擬機器不能使用eth0,eth0 提示Device does not seem to be present

故障前的操作:

DELL刀片裝的是CentOS6.3的作業系統,網絡卡識別的是em1和em2,由於工作需要做了槽位調整,並啟動了刀片

故障現象:

啟動後網路不通,通過iDRAC登入後route檢視預設路由正常;

重啟網路服務:

[[email protected] ~]# service network restart Shutting down loopback insterface: [ OK ] Bringing up loopback insterface: [ OK ] Bringing up interface em1: Device em1 does not seem to be present,delaying initialization. [FAILED]

分析問題和解決:

之前在別的文章中我們提過70-persistent-net.rules檔案,所以看了一下:

[[email protected]eA ~]# vi /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.

# PCI device 0x14e4:0x163a (bnx2) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="24:b6:fd:ab:76:1e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x14e4:0x163a (bnx2) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="24:b6:fd:ab:76:1c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

發現NAME的名稱不正確,依次將上述紅色字型中的eth0改為em1,eth1改為em2;

*切記:網絡卡編號由MAC地址大小決定,MAC越小網絡卡編號越小;

如下:

…………

# PCI device 0x14e4:0x163a (bnx2)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="24:b6:fd:ab:76:1e", ATTR{type}=="1", KERNEL=="eth*", NAME="em2"

# PCI device 0x14e4:0x163a (bnx2) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="24:b6:fd:ab:76:1c", ATTR{type}=="1", KERNEL=="eth*", NAME="em1"

儲存退出~!

[[email protected] ~]#reboot

………………

問題解決~!