现象:
一台克隆生成的centos,启动后使用ifconfig查看网络信息,发现只有lo而没有任何可用网卡.

使用ifup eth0后报vmware device eth0 does not seem to be present delaying initialization
大概意识是找不到eth0这个网络设备

使用
ls /sys/class/net
查看物理网卡信息返回结果如下:
eth1 lo




原因:

很多Linux distribution使用udev动态管理设备文件,并根据设备的信息对其进行持久化命名。例如在 

Debian etch中,udev会在系统引导的过程中识别网卡,将mac地址和网卡名称对应起来记录在udev的规则 脚本中。而VMware会自动生 成虚拟机的mac地址。这样,由于基本系统的虚拟机已经记录了该虚拟机的网 卡mac地址对应于网卡eth0,在克隆出的虚拟机中由于mac地址发生改 变,udev会自动将该mac对应于网 卡eth1。以此类推,udev会记录所有已经识别的mac与网卡名的关系,所以每次克隆网卡名称会自动加1, 而其 实kernel仅仅只识别到一张网卡,跟网卡名相关的网络配置也未发生任何变化。 

解决方法:

编辑如下文件
/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 0x15ad:0x07b0 (vmxnet3) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:bc:00:45", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:bc:00:46", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"


注释掉eth0的那个段落,然后将eth1的修改为eth0

修改网卡配置文件
/etc/sysconfig/network-scripts/ifcfg-eth0

把mac地址修改为eth1的地址
HWADDR字段

重启后生效


当然,如果你还什么东西都没装,没有在什么配置文件中指定过eth0字段的话.直接cp或者mv    ifcfg-eth0 ifcfg-eth1也是可以的.