环境:
Oracle VM VirtualBox 5.0.20
CentOS-6.7-x86_64-minimal.iso
1.复制虚拟机
-->右击休眠状态模板虚拟机,选择复制
-->填写好新虚拟电脑名称,勾选"重新初始化所有网卡MAC地址(R)"
-->默认"完全复制"
-->默认"当前虚拟电脑状态(M)"
2.启动休眠状态的新虚拟机,关闭新虚拟机;
这步操作是为了让/etc/init.d/network restart重启能够产生网卡MAC地址冲突报错,测试reboot并不能产生MAC冲突,所以选择关机。
[root@localhost ~]# shutdown -h now
启动虚拟机,重启network服务
[root@localhost ~]# /etc/init.d/network restart
Shutting down loopback insterface: [ OK ]
Bringing up loopback insterface: [ OK ]
Bringing up interface eth0: Device eth0 does not seem to be present,delaying initialization. [FAILED]
3.解决方案
a.删除/etc/udev/rules.d/70-persistent-net.rules中eth0整行,修改eth1为eth0
b.运行start_udev
c.注释/etc/sysconfig/network-scripts/ifcfg-eth0文件HWADDR信息
d.重启network服务