ifup eth0 up启动网卡出现:

Device eth0 does not seem to be present, delaying initialization

因为是在虚拟机里面的虚拟网卡,从网上查到的解决方法:

将/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.

# 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" 

 

原文出自:http://blog.163.com/longsu2010@yeah/blog/static/173612348201111292478361/