虛擬機克隆造成網卡不能正常啓動解決辦法

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 ]


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章