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: , ,

32 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 pm

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!

#20 Napsty on 06.05.10 at 11:58 pm

THANKS for that!!!! Was in urgent problems and this solved it!

#21 BoobaSkaya on 07.22.10 at 8:58 pm

On ubuntu 10.04, removing lines in /etc/udev/rules.d/70-persistent-net.rules and restarting computer saved me.

Thx all for this kind of support o/

#22 nick on 08.18.10 at 3:43 pm

yes it worked for me as well.

#23 Chris on 08.29.10 at 3:02 pm

This was by far the easiest solution to implement. Even the biggest N00b could do it. Thanks. Is there any way to move this solution to the top of the page?????

#24 Pietro on 09.01.10 at 9:26 pm

Thanks! My /etc/udev/rules.d/70-persistent-net.rules had more lines for same network adapter. I deleted wrong lines, rewrite NAME and reboot.

#25 Hussain on 09.09.10 at 12:39 pm

Below solution worked for me too on server 10.04

On ubuntu 10.04, removing lines in /etc/udev/rules.d/70-persistent-net.rules and restarting computer saved me.

#26 echessier on 10.03.10 at 2:12 am

you just rescued me from a night in purgatory kudos!!!!

#27 Mustafa on 02.08.11 at 6:18 pm

talking of noobs .!!! I am one :-( do i need to edit the file on the host OS or guest ?

#28 Nicholas_Lee on 02.21.11 at 1:36 pm

Guest OS.

#29 ubuntufun on 05.31.11 at 5:23 am

great post check out flash flicker

#30 ViperBR on 06.23.11 at 2:29 am

On ubuntu 10.04, removing lines in /etc/udev/rules.d/70-persistent-net.rules and restarting computer saved me too. Nice trick.

#31 Tjoa on 08.28.11 at 7:22 pm

thanks, works for me.. :)

#32 huso on 05.09.12 at 7:26 pm

Below solution worked for me too on server 10.04

On ubuntu 10.04, removing lines in /etc/udev/rules.d/70-persistent-net.rules and restarting computer saved me.

Thanks alot. that solution saved me too. thanks a million….

Leave a Comment