VMware (ii): Virtual Machine Linux system Redhat7 change NIC Name

Source: Internet
Author: User
Tags naming convention

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.