Eth0 becomes eth1 after the VM is copied in linuxKVM

Source: Internet
Author: User
After the VM is copied in linuxKVM, eth0 becomes eth1. when the VM is cloned or reloaded and then started, eth0 is no longer available in the system, but eth1 is used./etc/init is used. d/network: when you restart the network, the system will prompt that the startup scripts of eth0 and eth1 cannot be found. Make the following changes... in linux KVM, after the VM is copied, eth0 becomes eth1. when cloning or reinstalling the VM, and then starting the system, you will find that eth0 is no longer in the system, but eth1 is used./etc/init is used. d/network: when you restart the network, the system will prompt that the startup scripts of eth0 and eth1 cannot be found. Rename/etc/sysconfig/network-scripts/ifcfg-eth0 to/etc/sysconfig/network-scripts/ifcfg-eth1/etc/init. d/network restart prompt: eth0 cannot be found. The device item in the script has not been changed. change it to eth1 (or delete it)/etc/init. d/network restart indicates that the physical address of the NIC does not match the mac address in/etc/sysconfig/network-scripts/ifcfg-eth0 as the physical address of the original eth0 Nic, the VM allocates a new physical address for eth1, so the information in the startup script does not match the actual information. delete the MAC address information from the script and restart the network again. OK! Why does the original eth0 change to eth1? Many Linux distribution uses udev to dynamically manage device files and name them based on device information. Udev identifies the Nic during system boot, and records the mac address and Nic name in the udev rule script. For new virtual machines, VMware will automatically generate a MAC address for the virtual machine's Nic. when you clone or reinstall the virtual machine software, because you used the previous system virtual hard disk information, the system already has eth0 information. for this new Nic, udev will automatically name it eth1 (accumulation principle), so after your system starts, the network card name you see in ifconfig is eth1. How can I change the name back to eth0? In fedora 11, the udev script for recording network rules is:/etc/udev/rules. d/70-persistent-net.rules open the file and you will find that eth0 and eth1 are in the file, but you can only find the information of one eth1 network adapter in ifconfig, in this case, eth0 does not exist. Delete the eth0 information, change the device name in eth1 to eth0, and restart the system. The network card you see is eth0, or delete all the information and restart the system udev to help you find the new device.
Related Article

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.