虚拟机克隆后eth0网卡变成eth1网卡并且IP地址消失问题解决(2)
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
克隆过来后,原本的eth0变成了eth1,IP地址也丢失了,并用HWaddr的值发生改变了。
4.2、网络接口配置文件存在情况对比
A机器(原机器) |
B机器(克隆后机器) |
cd /etc/sysconfig/network-scripts |
cd /etc/sysconfig/network-scripts |
[root@ol6-single network-scripts]# ls ifcfg-eth* ifcfg-eth0 |
[root@ol6-weblogic_1 network-scripts]# ls ifcfg-eth* ifcfg-eth0 |
从上面对比结果看来,虽然克隆后的B机器从ifconfig –a上看到原来的eth0不见了,变成了eth1,但是,在/etc/sysconfig/network-scripts看到,B机器的网卡配置文件名称仍然叫eth0
4.3、网络设备绑定文件70-persistent-net.rules内容对比
A机器 (原机器) |
# 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 0x8086:0x100f (e1000) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:5e:35:00", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" |
B机器 (克隆后机器) |
# 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 0x8086:0x100f (e1000) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:5e:35:00", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:3a:f2:8e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1" |
从上面比较来看,克隆后的机器,/etc/udev/rules.d/70-persistent-net.rules多出了一行配置,见上面标红色内容,其NAME=“eth1”,MAC发生了变化,原有的NAME="eth0"一行内容仍在,且MAC地址也相同。
5、解决办法
5.1、修改克隆后机器(B机器)70-persistent-net.rules文件内容
对克隆后机器(B机器)/etc/udev/rules.d/70-persistent-net.rules文件进行两步修改:
相关新闻>>
- 在VMwarevSphereClient下使用Linux虚拟机安装CentOS6.4系统
- 解决虚拟机提示VMwareWorkstationcannotconnecttothevirtualmach
- VMWarelinux虚拟机扩容
- 在VMware虚拟机中安装中文版Win7系统详细教程 附虚拟机下载
- 虚拟机无法联网解决方法
- 虚拟机VMWare“提示:软件虚拟化与此平台上的长模式不兼容”的解
- Virtualbox虚拟机安装CentOS6.5图文详细教程
- VMware虚拟机平台的网络配置(RHEL5)
- VMware虚拟机上网络连接(networktype)的三种模式--bridged、ho
- Vbox虚拟机下如何登陆Windows2008
- 发表评论
-
- 最新评论 更多>>