vmware 8

系统版本:

[root@storage ~]# uname -a
Linux storage 2.6.32-220.el6.i686 #1 SMP Wed Nov 9 08:02:18 EST 2011 i686 i686 i386 GNU/Linux

重启网卡报错:

[root@storage ~]# service network restart
      Shutting down loopback interface: [ OK ]
      Bringing up loopback interface: [ OK ]
      Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization.
[FAILED]
      Bringing up interface eth1: Device eth1 does not seem to be present, delaying initialization.

[FAILED]

原因分析:vmware 在克隆虚拟机时会将网卡mac地址更改,而虚拟机里面原有的配置文件记录的mac地址却和被克隆的主机是一样的,克隆机启动后发现网卡与mac地址不匹配,网卡便不能正常启动。

[root@storage ~]# cat /etc/udev/rules.d/70-persistent-net.rules

照上面记录的网卡mac地址修改配置文件,使二者保持一致

[root@storage ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0

[root@storage ~]# udevadm trigger    #request events from the kernel

重启网络就好了
[root@storage~]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: [ OK ]