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

33 Comments

  1. Mark Said,

    April 27, 2007 @ 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 Said,

    July 4, 2007 @ 1:40 am

    Thank you (both), it solved my problem!

  3. links for 2007-08-21 @ BVLog Said,

    August 21, 2007 @ 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 Said,

    September 18, 2007 @ 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 Said,

    September 4, 2008 @ 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 Said,

    October 23, 2008 @ 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 Said,

    October 31, 2008 @ 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 Said,

    December 2, 2008 @ 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 Said,

    March 4, 2009 @ 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. Tjoa Said,

    August 28, 2011 @ 7:22 pm

    thanks, works for me.. 🙂

  11. Nicholas Lee Said,

    March 6, 2009 @ 4:37 pm

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

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

  12. The case of the disappearing eth0 @ BVLog Said,

    March 12, 2009 @ 3:51 am

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

  13. — Somewhere out there! Said,

    March 16, 2009 @ 8:59 am

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

  14. Josep Said,

    March 20, 2009 @ 12:53 am

    Thanks.
    Your post saved my day!
    🙂

  15. Alex Said,

    April 27, 2009 @ 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.

  16. Tom Said,

    January 13, 2010 @ 8:00 am

    thanks!

  17. Chris Said,

    August 29, 2010 @ 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?????

  18. Mustafa Said,

    February 8, 2011 @ 6:18 pm

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

  19. Nicholas_Lee Said,

    February 21, 2011 @ 1:36 pm

    Guest OS.

  20. Jan Said,

    May 21, 2009 @ 9:55 pm

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

  21. Thomas Said,

    June 4, 2009 @ 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.

  22. mischa Said,

    January 9, 2010 @ 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

  23. Wolfgang Said,

    February 10, 2010 @ 8:33 am

    Thx Alex, that works!

  24. Napsty Said,

    June 5, 2010 @ 11:58 pm

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

  25. BoobaSkaya Said,

    July 22, 2010 @ 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/

  26. Pietro Said,

    September 1, 2010 @ 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.

  27. nick Said,

    August 18, 2010 @ 3:43 pm

    yes it worked for me as well.

  28. Hussain Said,

    September 9, 2010 @ 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.

  29. echessier Said,

    October 3, 2010 @ 2:12 am

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

  30. ubuntufun Said,

    May 31, 2011 @ 5:23 am

    great post check out flash flicker

  31. ViperBR Said,

    June 23, 2011 @ 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.

  32. huso Said,

    May 9, 2012 @ 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….

  33. fatihhayri Said,

    July 26, 2012 @ 8:42 pm

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

    thanx

RSS feed for comments on this post