首页 > 其他 > 详细

CentOS:Device eth0 does not seem to be present 问题解决方法

时间:2015-03-09 19:22:23      阅读:280      评论:0      收藏:0      [点我收藏+]

使用Vmware克隆linux虚拟机后,常常是网络连接不上,表现为ifconfig无法看到网卡,即使改了/etc/sysconfig/network-scripts/下的相应网卡文件onboot=yes也不行,重启网络时(/etc/init.d/network restart)会出现以下错误提示:

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


这是由于克隆机的网卡配置文件错误导致的,解决方法:


1. 打开/etc/udev/rules.d/70-persistent-net.rules 文件。

2. 查找到匹配你机器MAC地址的行,将其“NAME”字段改为你现在下在使用的网卡设备名(eth0,eth1,eth2等),再将其他MAC不匹配的行删除或注释掉。如:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:04:19:2D:3F:52", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1022:0x2000 (pcnet32)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:04:19:2D:3F:53", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

3. 请将/etc/sysconfig/network-scripts/ifcfg-ethX(要改的网卡名)文件中的MAC地址和网卡名也作相应更改,并将onboot改为yes.

4. 重启虚拟机,这是必须的。


注:在第二步里正确的mac地址要到Vsphere client 的管理界面Edit setting去查看,而不是在系统中/etc/sysconfig/network-scripts/中那个。


CentOS:Device eth0 does not seem to be present 问题解决方法

原文:http://ponyjia.blog.51cto.com/917324/1618603

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!