ArticleAuthor:SlyarSource: slyar home (Www.slyar.comFor more information, see. Thank you for your cooperation.
I copied a copy of the Ubuntu server VMware vmdk that I configured to my girlfriend. Ubuntu created with this virtual hard disk can also be used on her computer. The only problem is that the NIC cannot be found, prompt "No such device eth0 "...
It took me several hours to solve the problem...
The reason is that the hardware configuration file saved by VMware *. in vmx, the MAC address of the NIC is recorded, while in Ubuntu, the MAC address is also recorded. In this way, when cloning a VM, VMWare assigns a new eth0 Nic to Ubuntu, however, because it is occupied by the previous eth0, it will become eth1. The error message "No such device eth0" is displayed because eth0 is the default Nic and does not exist "..
The configuration file for saving the MAC address in Ubuntu is "/etc/udev/rules. d/70-persistent-net.rules". I installed version 9.10, and Versions later than 8.04 should all adopt this solution:
Method 1: Delete the configuration file directly.
Directly Delete the configuration file. After the restart, UBUNTU will find the new Nic.
Sudo RM/etc/udev/rules. d/70-persistent-net.rules
Method 2: modify the configuration file
Modify the configuration file, delete the original eth0, and then change eth1's name = "erh1" to name = "eth0". After the restart, UBUNTU will use the new configuration file to set the NIC.
Before modification, the/etc/udev/rules. d/70-persistent-net.rules is as follows:
# PCI device 0x1022: 0x2000 (pcnet32)
Subsystem = "Net", Action = "add", drivers = "? * ", ATTR {address} =" 00: 0C: 29: 50: XX ", ATTR {dev_id} =" 0x0 ", ATTR {type} = "1", kernel = "ETH *", name = "eth0"
# PCI device 0x1022: 0x2000 (pcnet32)
Subsystem = "Net", Action = "add", drivers = "? * ", ATTR {address} =" 00: 0C: 29: 85: XX ", ATTR {dev_id} =" 0x0 ", ATTR {type} = "1", kernel = "ETH *", name = "eth1"
Modify it:
# PCI device 0x1022: 0x2000 (pcnet32)
Subsystem = "Net", Action = "add", drivers = "? * ", ATTR {address} =" 00: 0C: 29: 85: XX ", ATTR {dev_id} =" 0x0 ", ATTR {type} = "1", kernel = "ETH *", name = "eth0"