Ubuntu and VMware – Losing your ethernet device when migrating

VMWare bases the MAC address of interface on it’s internal UUID. If you shift a machine (copy, rename) vmware asks to update the UUID. You might get something like this:

# ifup eth0
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
eth0: ERROR while getting interface flags: No such device

The solution found by hbraga is to check /etc/iftab. Ubuntu on install adds the MAC address for each interface to this file. Either comment out the lines or update them to reflect the correct details.

Technorati Tags: , ,

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

19 comments

#1 Mark on 04.27.07 at 6:58 am

In Debian Etch, it seems to get confused in a similar way.

The solution is slightly different though – you need to remove the old MAC address entry in
/etc/udev/rules.d/z25_persistent-net.rules
and change the entry for the new MAC address to use eth0 (in my case it became eth1).

#2 Claudio on 07.04.07 at 1:40 am

Thank you (both), it solved my problem!

#3 links for 2007-08-21 @ BVLog on 08.21.07 at 4:20 pm

[...] Somewhere out there! » Blog Archive » Ubuntu and VMware – Losing your ethernet device when migrati… Solution to Debian VM losing eth0 after moving to a new host. (see comments) (tags: debian virtualmachine vmware sysadmin networking) no comments yet. « links for 2007-08-12 Leave a Comment [...]

#4 Psymon101 on 09.18.07 at 10:42 am

Thank you!, I have tried to resolve this for a while, I knew it was going to be something small
:)

#5 YeGods! :: eth0: no such device on 09.04.08 at 6:43 am

[...] non ero il primo a ricevere questo errore :-) . Nel post si parla di Ubuntu, ma in uno dei commenti viene indicata anche la soluzione per [...]

#6 dmooney on 10.23.08 at 4:49 am

Ubuntu 8.04 has this setting in /etc/udev/rules.d/70-persistent-net.rules

#7 GiBiLog » Blog Archive eth0: no such device on 10.31.08 at 10:59 am

[...] non ero il primo a ricevere questo errore :-) . Nel post si parla di Ubuntu, ma in uno dei commenti viene indicata anche la soluzione per [...]

#8 felix on 12.02.08 at 11:25 pm

thnks a lot Mark
i’ve a similar issue with my debian-VM (in virtualbox) after moving it to another host
and solved editing /etc/udev/rules.d/z25_persistent-net.rules

#9 pikemon on 03.04.09 at 3:01 am

for me nothing helped except

sudo /etc/init.d/udev restart
sudo /etc/init.d/networking restart

this on 8.04 :)

#10 Nicholas Lee on 03.06.09 at 4:37 pm

This bug [1] ticket has some detail about the fix as well.

[1] https://bugs.launchpad.net/bugs/289921

#11 The case of the disappearing eth0 @ BVLog on 03.12.09 at 3:51 am

[...] A comment on this post pointed me down the path of [...]

#12 — Somewhere out there! on 03.16.09 at 8:59 am

[...] Professional VMware blog, here is another method to fix your lost Ethernet device on [...]

#13 Josep on 03.20.09 at 12:53 am

Thanks.
Your post saved my day!
:-)

#14 Alex on 04.27.09 at 5:35 am

Simplest solution:
1. edit /etc/network/interfaces and change eth0 to eth1
2. reboot
3. VMWare will auto-generate a new virtual hardware NIC and Linux will auto-configure it.

#15 Jan on 05.21.09 at 9:55 pm

Tnx a lot! I was struggling for an hour or so.. while the fix was only 30 secs ;)

#16 Thomas on 06.04.09 at 12:10 am

Editing /etc/udev/rules.d/70-persistent-net.rules in 8.10 worked wonders. I had to update my DHCP Reservation on the network with the new MAC Address, but that’s beside the point.

#17 mischa on 01.09.10 at 2:10 pm

if you have the new virtualbox, you can set the mac address also in the VM settings of the VM in virtualbox.

so i changed the mac address there instead of inside the VM

#18 Tom on 01.13.10 at 8:00 am

thanks!

#19 Wolfgang on 02.10.10 at 8:33 am

Thx Alex, that works!

Leave a Comment