Vmware: “SIOCSIFADDR: No such device eth0″ after cloning | Comments (12)
Posted in Code, Linux/Unix on 13th July 2008, 2:38 pm by Stuart
After cloning a vmware image to copy to my local machine I had an issue with eth0 not coming up on an Ubuntu VM.
After a bit of googling I found a solution that required editing /etc/ftab to remove an incorrect generated mac address. Hardy Heron doesn’t have this file though so I did a bit more searching around the filesystem and found a reference to the mac address stored in the vmx (vmware config) file found in /etc/udev/rules.d/70-persistent-net.rules. Note: For Debian the file can be found at /etc/udev/rules.d/z25_persistent-net.rules
Method One - delete the rules file
Quickest way to solve this is to move/delete the rules file. (Thanks to the comment from SonniesEdge.)
# Ubuntu
sudo mv /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.old
#Debian
sudo mv /etc/udev/rules.d/z25_persistent-net.rules /etc/udev/rules.d/z25_persistent-net.rules.old
Method Two - edit the rules file
The second way is to comment out the line relating to eth0 which had the wrong mac address and replaced “eth1″ with “eth0″. After rebooting eth0 should be working properly and normality will be restored.
Here’s an example carried out on Ubuntu.
The old /etc/udev/rules.d/70-persistent-net.rules looked like this:
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:50:xx:xx", ATTR{type}=="1", NAME="eth0"
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:36:xx:xx", ATTR{type}=="1", NAME="eth1"
Was edited to look like this:
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:36:xx:xx", ATTR{type}=="1", NAME="eth0"

I’ve found that it’s a lot easier to just delete 70-persistant-net.rules and then reboot the newly-cloned machine. Ubuntu will recreate the file with no problem.
I think this may also help if you transfer a VM from OSX fusion to windows VMware player. I haven’t testing it yet, but I had trouble with eth0 when trying an debian VM on windows.
@SonniesEdge: Thanks I’ve updated the post
@AlastairC: Yep indeed this does work for VMWare Fusion I’ve jsut had exactly that error with Debian.
Thanks! Saved me a lot of trouble. I had the same problem after cloning one machine.
You’re a lifesaver.
Thanks a bunch. Great and precise post that saved me a lot of trouble. I encountered this problem after moving a Virtual Machine from a Windows VMWARE Server 2 environment to a Ubuntu Linux environment.
Thanks so much! Tip #1 Saved my image as I am about to … good thing you had it here! will link this to my site
Thank you, the Deb mv saved my day
Many thanks for this, I owe you a beer!
Thanks !!!!!
Any tips on what to do if you remove/move the file and it does NOT rebuild it?
In my case, I installed a new VA-LAMP from virtualappliances.net. I did some config and customization
- installed rcconf
- disabled apache, lighthttpd, mysql, php
- changed root password
- shutdown
then I used vmware converter to create a new .OVF locally on my PC. Then I used vmware converter to re-upload the .OVF and create a new image with a new name.
now there’s no eth0. I tried uninstalling/reinstalling vmware tools, removing the persistent-net.rules file, rebooting, removing and re-adding the network card from ESXi and I still can’t get any network on the box.
dmesg shows no eth0 or eth1 lines.
I wonder if it’s a MAC address problem because it came from and went to the same ESXi box, but I’m not sure how to troubleshoot that.
This really helped me! Thanks thousandtimes. For others, my configuration: Windows XP running on AMD Athlon 64, Ubuntu server 7.10 running on vmware player.
Thank you, thank you, thank you! My configuration: Ubuntu 8.04 Server LTS running on VMWare Desktop 6.0.