您的位置:首页 > 运维架构 > Linux

VMware中Linux(Federa Core)下网卡无法使用故障一例

2010-01-22 16:56 435 查看
启动的时候,提示:

Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization. [FAILED]
service network start的时候也是一样的提示。。。

lspci的时候可以看到

02:00.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE](rev 10)
lsmod的时候可以看到

pcnet32 31476 0
这样看来的话,驱动程序应该没有什么问题

查了很多的资料,没有找到解决办法
后来找到这个帖子http://ephemeralvalue.com/?p=23

删除/etc/udev/rules.d/70-persistent-net.rules 后,重启机器后就ok了!

这个问题应该多见于Vmware中,猜想造成这个问题的原因应该是由于虚拟机是从另一个机器拷过来的,一个网卡被认作2个网卡了,70-persistent-net.rules中出现了2个mac地址的情况

至于/etc/udev/rules.d/ 这个配置文件目录下的文件的功能还不了解,希望大家不吝指教~

原文内容如下:

Cloning Ubuntu Server 7.10 on VMware ESX
February 18, 2008, 2:49 pm

After cloning a virtual machine running Ubuntu Server 7.10 I found that it didn’t have any network available. Restarting networking gave:

sudo /etc/init.d/networking restart

* Reconfiguring network interfaces...
eth0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
eth0: ERROR while getting interface flags: No such device
eth0: ERROR while getting interface flags: No such device
Failed to bring up eth0.

The problem lies in the fact that ethernet MAC addresses are cached. You need to remove a file to clear the cached value:

sudo rm /etc/udev/rules.d/70-persistent-net.rules

After a restart of your server you should have networking back again.

I also had to edit the following files to change the static ip addresses and hostname:

* /etc/hosts – change ip address and hostnames
* /etc/hostname – change hostname
* /etc/network/interfaces – change ip address

本文出自 “泊缘沧溟” 博客,请务必保留此出处http://nkmis02.blog.51cto.com/612689/269433
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: