Article From:https://www.cnblogs.com/EasonJim/p/9064053.html

The first step:

Edit the file to add the parameters shown below

vi /etc/sysconfig/grub

GRUB_CMDLINE_LINUX=”rd.lvm.lv=vg0/swap vconsole.keymap=us crashkernel=auto  vconsole.font=latarcyrheb-sun16 net.ifnames=0 biosdevname=0 rd.lvm.lv=vg0/usr rhgb quiet”

The second step:

grub2-mkconfig -o /boot/grub2/grub.cfg

The third step:

The file that modifies the original network card name is eth0

mv /etc/sysconfig/network-scripts/ifcfg-ens33 /etc/sysconfig/network-scripts/ifcfg-eth0

Modify the contents and modify the ens33 to eth0. If you want to clone the virtual machine, you can simplify it as follows:

Note: MAC address is not conducive to virtual machine cloning.

Out of question:

After research, it is discovered that the RedHat naming scheme adopts the biosdevname software to carry out the new naming specification, which is to disable this function.

 

Reference resources:

https://unix.stackexchange.com/questions/205010/centos-7-rename-network-interface-without-rebooting/219277

RHEL 7 / CentOS 7 use classic eth0 style device naming for network adapters

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/ch-consistent_network_device_naming

Leave a Reply

Your email address will not be published. Required fields are marked *