1、修改網(wǎng)卡名稱:
sed -i 's/^NAME.*$/NAME=eth0/g' ifcfg-ens33?
sed -i 's/DEVICE.*$/DEVICE=eth0/g' ifcfg-ens33
2、獲取網(wǎng)卡物理地址
[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、添加 網(wǎng)卡配置文件,添加物理地址
sed -i '/BOOTPROTO/a\HWADDR='$mac ifcfg-ens33?
4、修改網(wǎng)卡配置文件
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、重啟虛擬機(jī):reboot
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。