本文共 2250 字,大约阅读时间需要 7 分钟。
安装系统时候为防止后面克隆导致网卡MAC地址重复,安装系统的时候没有添加网卡,后面克隆完系统添加了网卡,通过setup发现找不到网卡,安装VMware tools后发现也还是一样,把VMXNET3换成E1000重启后发现还是认不出,怎么办?配置文件没找到我就创建了个,配置好IP、DNS,重启网卡提示以下错误:
Device eth0 does not seem to be present, delaying initialization.
这时候通过setup就可以找到网卡了,发现网卡、NDS那栏是空着的,我就又给填上,保存退出,重启网卡,提示如上错误,
网上查找资料后得知是MAC的问题,于是我又在配置文件里添加上对应的MAC地址
HWADDR=00:0C:29:2C:E1:0F
重启网卡,问题依然,然后我又删除/etc/udev/rules.d/70-persistent-net.rules文件,重启机器,系统在启动时会自动监测变化,然后由/lib/udev/write_net_rules写入到/etc/udev/rules.d/70-persistent-net.rules中,这时候我再重启网卡发现还是一样,于是查看了下
70-persistent-net.rules文件,发现ATTR{address}=="00:0C:29:2C:E1:0F"对应的NAME=eht1,于是又回到配置文件中将DEVICE修改成eth1,重启网卡正常启动
[root@localhost ~]# cat /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 0x8086:0x100f (e1000)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:be:47:37", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" # PCI device 0x8086:0x100f (e1000)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0C:29:2C:E1:0F", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"[root@localhost ~]#
系统是VMware ESXI上的一台虚拟机原本为一个网卡,新加了一个网卡后死活起不来,报Device does not seem to be present, delaying initialization。也没有找到/etc/udev/rules.d/70-persistent-net.rules文件,可以通过ifconfig -a来查看,找到一个dev319的网卡,发现HWaddr就是添加的那块网卡的地址,于是就到配置文件里把DRIVERS=eth1修改成DRIVERS=dev319,把HWADDR修改成网卡的地址或者注释掉,重启网卡成功
[root@mail rules.d]# pwd/etc/udev/rules.d[root@mail rules.d]# ls05-udev-early.rules 50-udev.rules 60-net.rules 90-dm.rules 95-pam-console.rules40-multipath.rules 51-hotplug.rules 60-raw.rules 90-hal.rules[root@mail network-scripts]# ifconfig -adev319 Link encap:Ethernet HWaddr 00:50:5B:DB:28:2D BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Base address:0x2040 Memory:fd5a0000-fd5c0000 eth0 Link encap:Ethernet HWaddr 0D:5B:56:8B:0C:5C
转载地址:http://omdkx.baihongyu.com/