一、修改/etc/udev/rules.d/70-persistent-net.rules文件
将之前的eth0那行删了,将eth1改为eth0
二、配置ifcfg-eth0脚本,注意HWADDR那行,要和上图ATTR对应
- DEVICE=eth0
- TYPE=Ethernet
- ONBOOT=yes
- NM_CONTROLLED=yes
- BOOTPROTO=dhcp
- DEFROUTE=yes
- IPV4_FAILURE_FATAL=yes
- IPV6INIT=no
- NAME="System eth0"
- HWADDR=00:0C:29:de:00:1f
- DNS1=114.114.114.114
- PEERDNS=no
- PEERROUTES=yes
- LAST_CONNECT=1433149405
三、虚拟机关机重启就OK啦