openstack------修改网卡名称

1、/etc/default/grub中,在GRUB_CMDLINE_LINUX后面添加net.ifnames=0 biosdevname=0这段话。

vim /etc/default/grub
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0"

在这里插入图片描述
2、到网卡中修改配置文件:设备、名称、文件名
在这里插入图片描述

3、在命令行输入grub2-mkconfig -o /boot/grub2/grub.cfg,更新内核参数。

[root@ct network-scripts]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-957.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-957.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-52c810f112594af0a27a315ac9ac04e7
Found initrd image: /boot/initramfs-0-rescue-52c810f112594af0a27a315ac9ac04e7.img
done

4、init 6,重启系统,这样问题就解决了
重启之前,先将计算节点关闭,再重启控制节点

[root@ct network-scripts]# init 6

[root@ct ~]# systemctl restart network

猜你喜欢

转载自blog.csdn.net/IvyXYW/article/details/114996461