您的位置:首页 > 其它

Device eth0 does not seem to be present, delaying initialization(vmware 拷贝引起)

2016-03-09 16:01 351 查看
VC改动之后不能ping网卡,需要修改 ifcfg-eth0中MAC地址注释掉 把新的eth1 的地址写上去

重新安装或者克隆虚拟机适用:

1、将/etc/udev/rules.d/70-persistent-net.rules 改名字,重启虚拟机。

此时机器自己重新生成/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.

---------------------------VC操作上还有一张网卡eth0 但是 不是这张 是用的新的下面的eth1 这张

# PCI device 0x1022:0x2000 (pcnet32)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:50:bd:1

7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

这里只有eth1这块网卡的信息主要是MAC信息

看完的得记住

2、改网卡的文件名字。

这个网卡可以不修改 照样能够 高通

mv /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1

我之前的网卡名字是eth0,现在是eth1这块网卡了。所以把ifcfg-eth0 改为ifcfg-eth1.

3、编辑/etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE="eth1" #改网卡代号

BOOTPROTO=dhcp

HWADDR="00:0C:29:50:bd:17" #改成刚才看见的MAC地址

NM_CONTROLLED="yes"

ONBOOT="yes"

OK了。

service network restart 就好了。

我是看了下面的一段话知道这么做的。 原话如下:

處理方式,將/etc/udev/rules.d/70-persistent-net.rules這個檔案刪除,重新啟動server,該檔案就會被重建,MAC Address也會重抓。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: