Ubuntu "No such device eth0" error after cloning Vmware
Environment: VMWare 6.5, UBUNTU 8.10 Server
After creating a VMware Virtual Machine for Ubuntu locally, copy, create a new clone image, start, the NIC is invalid, and an error "eth0: Error while getting interface flags: no such device" is displayed ".
Cause
The MAC address of the NIC of the newly cloned virtual machine image has been changed. Open the. vmx file of the VM. The ethernet0.generatedaddress entry records the MAC address of the VM.
View All adapter Information
Ifconfig-A found that in addition to the original eth0, Ubuntu has named the new Nic eth1.
Ubuntu saves the nic mac address and device name configuration file in
The network configuration of the/etc/udev/rules. d/70-persistent-net.rules Nic is saved in
/Etc/Network/interfaces this configuration file only contains the original eth0 configuration information.
Solution 1
Move/Delete the Rules file. (Not verified)
After the restart, UBUNTU will create a new rules file.
Identify the new Nic as eth0 and use the network configuration of the original eth0.
If the network configuration is to automatically obtain the IP address, no additional modifications are required.
Sudo mV/etc/udev/rules. d/70-persistent-net.rules
/Etc/udev/rules. d/70-persistent-net.rules.old solution 2
Modify the Rules file. (Not verified)
The original content of sudo Pico/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 {type }= "1", name = "eth0"
# PCI device 0x1022: 0x2000 (pcnet32)
Subsystem = "Net", Action = "add", drivers = "? *",
ATTR {address} = "00: 0C: 29: 36: XX", ATTR {type} = "1", name = "eth1" delete eth1 configuration, replace the MAC address of eth0 with the MAC address of eth1.
# PCI device 0x1022: 0x2000 (pcnet32)
Subsystem = "Net", Action = "add", drivers = "? *",
ATTR {address} = "00: 0C: 29: 36: XX", ATTR {type} = "1 ", after name = "eth0" is restarted, UBUNTU identifies the new Nic as eth0, which follows the network configuration of the original eth0.
If the network configuration is to automatically obtain the IP address, no additional modifications are required.
Solution 3
Modify the interfaces file. (Verified)
Sudo Pico/etc/Network/interfaces replace all eth0 with eth1.
If it is a static address, modify the corresponding settings at the same time.
Source: http://humblepg.com/chs/2008/11/ubuntu-no-such-device-eth0-after-vmware-cloning.html
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/dctfjy/archive/2009/06/01/4233284.aspx