Ubuntu missing eth0 after copying image in VMware

I was running an Ubuntu in Windows XP. And for reason, I needed to move that virtual machine to Windows 2003 Server. During this kinds of migration process, I noticed that eth0 device was missing on the new copied image. I found that the reason is caused by ‘/etc/udev/rules.d/70-persistent-net.rules’ file which looks like the following:

# This file was automatically generated by the /lib/udev/write_net_rules

# program, run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single

# line, and change only the value of the NAME= key.

# PCI device 0×1022:0×2000 (pcnet32)

SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:0c:29:20:27:4

c”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″


# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="*",ATTR{address}=="00:0c:29:20:27:4c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

As you can see there is a mismatch between device and its MAC address. VMware changes the MAC address of its local virtual network interface due to the change of hardware. So just delete this file and then reboot the system.

source: http://2computing.com/techblog/2010/01/21/ubuntu-missing-eth0-after-copying-image-in-vmware/

cuongk6t – Nguyen Quoc Cuong

Advertisements