「Device eth0 does not seem to be present」解決辦法

VirtualBox遷移CentOS虛擬機後配置網卡時,出現以下問題:html

[root@localhost Desktop]# service network restart
Shutting down loopback insterface: [ OK ]
Bringing up loopback insterface: [ OK ]
Bringing up interface eth0: Device eth0 does not seem to be present,delaying initialization. [FAILED]

用ifconfig查看發現缺乏eth0,只有lo。vim

解決辦法:網絡

[root@localhost Desktop]# cat /etc/udev/rules.d/70-persistent-net.rules
[root@localhost Desktop]# vim /etc/sysconfig/network-scripts/ifcfg-eth0

打開ifcfg-eth0,將該文件MAC地址修改爲70-persistent-net.rules文件顯示的MAC地址,同時修改DEVICE名稱爲70-persistent-net.rules文件中的設備名:NAME="eth0",保存後,再重啓網絡便可。ide

要保證/etc/sysconfig/network-scripts/ifcfg-eth0 與/etc/udev/rules.d/70-persistent-net.rules的網卡地址與設備號信息一致,service network restart 配置成功。oop

(參考:http://www.cnblogs.com/fbwfbi/archive/2013/04/29/3050907.htmlrest

相關文章
相關標籤/搜索