In VMware Linux, device eth0 does not seem to be present and delaying initialization appear. solution:

Source: Internet
Author: User

No eth0 Nic information is displayed when ifconfig is used in Linux in VMware!

Recently, the virtual machine system was installed with fedora9, which was cloned or copied for future use. When the cloned virtual machine is used, the eth0 Nic in the basic system is lost to the new system. If ifconfig-A is used, only eth1 is found. Because the network configuration of the basic system is based on eth0, and eth1 does not have network-related configuration, in this case, the network in the virtual machine must be normal, and only the network configuration of eth1 should be added, in this way, it is inconvenient to modify the NIC configuration every time you perform multiple Linux system tests. Furthermore, if the clone VM continues to clone or copy a new Vm, the nic id will be automatically added with 1 (the second clone will be changed to eth2 ), dmesg shows that the kernel only recognizes the network adapter eth0. Cause Analysis: Many Linux distribution uses udev to dynamically manage device files and persistently name them based on device information. For example, in Debian Etch, udev identifies the NIC during system boot and records the MAC address and nic name in the udev rule script. VMware automatically generates the MAC address of the VM. In this way, because the VM of the basic system has recorded that the MAC address of the NIC of the VM corresponds to eth0 of the NIC, the MAC address of the cloned VM is changed, udev automatically maps the Mac to the network adapter eth1. Similarly, udev records all the relationships between recognized MAC addresses and network card names. Therefore, each clone Nic name is automatically added with 1. In fact, the kernel only recognizes one network card, the network configuration related to the NIC name has not changed. Solution: In Debian Etch, udev stores the correspondence between MAC and nic names in/etc/udev/rules. d/z25_persistent-net.rules, In the cloned virtual machine as long as you delete the line with name = "eth0" and restart the system. For example, delete the following two lines in Debian etch: # PCI device 0x1022: 0x2000 (pcnet32) subsystem = "Net", drivers = "? * ", Attrs {address} =" 00: 0C: 29: 4C: 46: 01 ", name = "eth0" in my fedora9 Modify/etc/udev/rules. delete the 70-persistent-net.rules file under D # Advanced Micro Devices [amd] 79c970 [pcnet32 Lance] (rule written by Anaconda) subsystem = "Net", Action = "add ", drivers = "? * ", ATTR {address} =" 00: 0C: 29: AD: 06: 2a ", ATTR {type} =" 1 ", kernel = "ETH *", name = "eth0" and then change "eth1" to "eth0" for the line corresponding to eth1. Another method is to delete all the contents and restart the system. The system also discovers the hardware of the NIC and generates the file again. OK!

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.