Welcome 微信登录

首页 / 操作系统 / Linux / RHEL6.3克隆虚拟机后的网卡启动失败问题解析

公司测试环境安装的都是RHEL6.3,在进行虚拟机克隆后,发现clone的虚拟机网卡起不来,具体报如下错误:
 [root@localhost Desktop]# service network restart
 Shutting down loopback interface:                        [  OK  ]
 Bringing up loopback interface:                            [  OK  ]
 Bringing up interface eth0:  Error: No suitable device found: no device found for connection "System eth0".
                                                            [FAILED]
 
当你执行ifconfig命令的时候,会发现显示eth1网卡的配置文件却为/etc/sysconfig/network-scripts/ifcfg-eth0。
 
[root@localhost network-scripts]# ifconfig|grep addr
 eth1      Link encap:Ethernet  HWaddr 00:0c:29:f4:95:e3 
          inet6 addr: fe80::20c:29ff:fe5c:65b7/64 Scope:Link
          Interrupt:19 Base address:0x2024
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
 [root@localhost network-scripts]# ls
 ifcfg-eth0  ifdown-isdn    ifup-aliases  ifup-plusb    init.ipv6-global
 ifcfg-lo    ifdown-post    ifup-bnep    ifup-post      net.hotplug
 ifdown      ifdown-ppp    ifup-eth      ifup-ppp      network-functions
 ifdown-bnep  ifdown-routes  ifup-ippp    ifup-routes    network-functions-ipv6
 ifdown-eth  ifdown-sit    ifup-ipv6    ifup-sit
 ifdown-ippp  ifdown-tunnel  ifup-isdn    ifup-tunnel
 ifdown-ipv6  ifup          ifup-plip    ifup-wireless
 [root@localhost network-scripts]#产生这个问题的原因是虚拟机分配给操作系统的虚拟网卡MAC地址是不一样的。第一个系统的网卡MAC地址记录在了/etc/udev/rules.d/70-persistent-net.rules,命名为eth0。新克隆分配的系统的网卡MAC地址也记录在了该文件当中,与之前的系统一样,因此有了冲突。
 
可以查看一下两个机子的这个70-persistent-net.rules文件的内容
 
第一个系统:
 [root@localhost rules.d]# cat 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:f4:95:e3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
 
 
克隆后的系统:
 
[root@localhost rules.d]# cat 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:f4:95:e3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
  • 1
  • 2
  • 下一页
用Red Hat Enterprise Linux 搭建Java开发环境Linux下boost库的安装相关资讯      RHEL6.3  虚拟机克隆 
  • 克隆虚拟机后重启无法启动网络  (12/10/2015 10:32:54)
  • 基于RHEL6.3-KVM三节点虚拟机命令  (06/24/2013 06:19:28)
  • 使用RHEL6.3+PXE+DHCP+Apache+NFS+  (02/23/2013 17:51:22)
  • VMware虚拟机克隆以后出现“需要整  (10/16/2014 19:18:13)
  • RHEL6.3下iSCSI的搭建和多路径的使  (06/05/2013 08:32:11)
  • 使用Nginx+Tomcat7在RHEL6.3下实现  (02/02/2013 14:01:42)
本文评论 查看全部评论 (0)
表情: 姓名: 字数