(Linux) replicated virtual machine NIC Eth0 changed to eth1 or other name post-remediation method

Source: Internet
Author: User

The virtual machine in use, after replication, found that the network card name has changed, the correct method is as follows:


For example, Eth0 became eth1:


Ifconfig


Udev dynamic management device files:

Cat/etc/udev/rules.d/70-persistent-net.rules


Udev identifies the network card during the boot process and records the MAC address and Nic name in the Udev rules script.

The new virtual machine will automatically generate a MAC address for the virtual machine's network card.

Virtual machine cloning, the previous system already exists eth0 information, for the system is the equivalent of a new network card, the system will be automatically named Eth1 (in order + 1),

Udev will also generate MAC addresses with this network card.


Udev content: subsystem== "net", action== "Add", drivers== "? *", attr{address}== "00:e0:ed:54:b5:2a", attr{type}== "1", kernel= = "eth*", name= "eth0"


Recovery process:

Open Udev file rules:

Vi/etc/udev/rules.d/70-persistent-net.rules

Delete the eth0 line of information, or comment.

Change the eth1 line device name to eth0. Also modify the Ifcfg-eth0 information, if any MAC address is also modified to the same as Udev.

Catalog:/etc/sysconfig/network-scripts/


Restart the network!


This article is from the "Laotaibuxiao" blog, make sure to keep this source http://lubcdc.blog.51cto.com/3785870/1763131

(Linux) replicated virtual machine NIC Eth0 changed to eth1 or other name post-remediation method

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.