Muffinresearch Labs by Stuart Colville

Vmware: “SIOCSIFADDR: No such device eth0″ after cloning | Comments (4)

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"

Post Tools

Comments: Add yours

1. On August 5th, 2008 at 9:12 am SonniesEdge said:

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.

2. On August 9th, 2008 at 10:37 am AlastairC said:

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.

3. On October 1st, 2008 at 9:11 am Stuart Colville said:

@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.

4. On October 5th, 2008 at 5:07 pm arab said:

Thanks! Saved me a lot of trouble. I had the same problem after cloning one machine.

You’re a lifesaver.







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



VMware Server: Convert Fixed Disk-images to Growable|(0)

Quick tip if you ever want to convert from a fixed disk image to an expandable one then the following command should do it:

sudo vmware-vdiskmanager -r source.vmdk -t 0 expandable.vmdk

Just replace “source” and “expandable” with your disk image file names. For more on what vmware-vdiskmanager can do for you type vmware-vdiskmanager -h

SVN Tip: Get List of Files Changed Between Revisions|(0)

svn diff -r REVNO:HEAD --summarize

Just replace REVNO with the start revision and HEAD with the end revision if you don’t want it to be the latest revision.

Photos on Flickr

© Copyright 2004-08 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by 1&1 This page was baked in 1.122s.