First, the virtual machine Linux system REDHAT7 change the NIC name
Objective:
In the virtual machine REDHAT7 the name of the network card is relatively long by default, more complex, such as eno16777736, eno33554992, eno50332216, inconvenient to change the parameter information and identification, to try to rename the Linux system network card in the virtual machine is very necessary.
Scheme:
1. Modify the NIC configuration file to change the NIC name and parameter information
2. Modify the grub file to disable the kernel from continuing with the naming convention
3. Regenerate the GRUB configuration and update the kernel parameters
4. Adding Udev Rules
5, restart the system verification, is to restart the system is not just restart the network card Configuration service
Steps:
1, you can view the REDHAT7 network card information through the command, the previous network card information is not changed as follows:
2. Enter the network card configuration directory to view the network card configuration information, copy a backup of the NIC configuration information, and then start editing the NIC configuration information. Change the Name field to Eth0,device field to eth0, save and exit, and rename the configuration file to Ifcfg-ethx (X is based on the actual network card) . Note Do not restart the network service immediately after the configuration is complete, and then restart the system after all parameters have been changed.
3. Modify the Grub file to disable the kernel to continue using the naming convention
Edit the Grub configuration file "/etc/sysconfig/grub": Add a "net.ifnames=0 biosdevname=0" to the "grub_cmdline_linux" variable. Regenerate grub configuration and update kernel parameters: Run command: "Grub2-mkconfig-o/boot/grub2/grub.cfg"
4, modify the Udev rules, modify the configuration file:/etc/udev/rules.d/70-persistent-ipoib.rules, modify the Name=eth0, the configuration line to remove the comments
5, configuration complete, and then restart the computer: Reboot, view: IP add show, modify the success.
VMware (ii): Virtual Machine Linux system Redhat7 change NIC Name