拷贝centos6遇到问题:Device eth0 does not seem to be pres

换了个新机器,把从移动硬盘上备份的虚拟机搞到新机器上之后,打开虚拟机之后,发现ssh链接不上机器,重启network服务器之后,发现报错:

Bringing up loopback interface: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[OK]Bringing up interface eth0: ? ?Device eth0 does not seem to be present,delaying ?initiallization, ? ? [FAILED]

百度之后,发现貌似不少人都遇到过我一样的话题,思来想去,我曾经在这个虚拟机上添加删除N多次网卡,还曾经修改过网卡的MAC地址,估计是这个引起的后遗症啊,哈哈,那就让我来解决吧:

网上资料都说是和一个文件有关:

[root@localhost ~]# 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 0x1022:0x2000 (pcnet32)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:75:3d:d0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"# PCI device 0x1022:0x2000 (pcnet32)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:a4:55:93", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

我们可以看到里面记录了2块网卡的真实的mac地址,我看了下,其中eth0的正式mac貌似是正确的啊,我直接删掉了eth1的那一行,然后重启了虚拟机,结果失败,郁闷了,仔细看了下报错信息,说好像找不到eth0,但是我的配置文件显然是eth0的文件,那么我修改成eth1如何呢,于是重命名ifcfg-eth0 ?为ifcfg-eth1,然后修改配置文件里面那一行

DEVICE=eth0 ? 为DEVICE=eth1,再把mac地址修改成eth1的地址,然后重启网络服务,居然搞定了,呵呵,记录下做个笔记,也许以后还会用得到。。。。

拷贝centos6遇到问题:Device eth0 does not seem to be pres

相关文章:

你感兴趣的文章:

标签云: