1、修改网卡名称:
sed -i 's/^NAME.*$/NAME=eth0/g' ifcfg-ens33

sed -i 's/DEVICE.*$/DEVICE=eth0/g' ifcfg-ens33

2、获取网卡物理地址
[root@centos7 rules.d]# ifconfig ens33 |grep ether |awk '{print $2}'
00:50:56:33:a8:d4

[root@centos7 rules.d]# ifconfig ens33 |grep ether |awk '{print $2}'
00:50:56:33:a8:d4

3、添加 网卡配置文件,添加物理地址
sed -i '/BOOTPROTO/a\HWADDR='$mac ifcfg-ens33



4、修改网卡配置文件

5、
[root@centos7 network-scripts]# sed -i 's/rhgb/net.ifnames=0 biosdevname=0 &/' /etc/default/grub
[root@centos7 network-scripts]# grub2-mkconfig -o /boot/grub2/grub.cfg

6、删除70-persistent-ipoib.rules
[root@centos7 rules.d]# pwd
/etc/udev/rules.d
[root@centos7 rules.d]# rm -f 70-persistent-ipoib.rules
7、重启虚拟机:reboot