Cloning Or Converting Linux VM From VMWare Workstation To ESX Server: ETH0 Gone. ETH1 Available?

I ran into a fun situation yesterday. I downloaded a virtual appliance for the Agilo Trac Plugin (which, if you’re a Trac user and trying to do sprints or iterations with it, you need to get this. It’s free and it rocks.) Turns out this VM is a Debian distribution. (I’m certainly no linux guru, but I can usually find my way around.)

Starting up the VM on my local VMWare Workstation worked fine. The distro is configured for DHCP, and my VM network bridged to my box, found the company network and found an IP for the VM. You can see the IP show up in the screen shot below:


After playing with the Agilo app for a few minutes, I wanted to share it with my coworkers and get their opinions. Fortunately for me, I’ve been helping the company grow a rather nice VMWare ESX Server infrastructure for our development needs. So, I thought the easy thing to do would be to migrate the VM up to a server and make it available.

I go through the “Export” process from VMWare Workstation and send it up to a server with no problems. I configured a static IP address in the /etc/network/interfaces file, as described in this article. However, when I get the server based VM up and running again, I run into a problem:


Note the first error circled: “eth0: error fetching interface information: Device not found”. And the second error circled: no ip address!!! That’s not good… how am I supposed to get to the box without an IP address… so, I check the network adapters through ifconfig to see if I can get eth0 back up.

No luck – “eth0: ERROR while getting interface flags: No such device”


Checking ifconfig, i see that there’s only an “eth1” configured in the vm.


After some serious hair-pulling-out frustration, several coworkers not having any clue, and a general sense of doom and gloom; I managed to pull some serious google-fu out, and found this post. The information provided looked like what I needed:


- the kernel in Lenny is newer and has a driver that is missing (or not
  fully functional for your hardware) on the other system


- the new card was assigned eth1 because the previous card’s mac address
  is still listed in the database of persistent ethernet device names

Boot the problematic system and run "/sbin/ifconfig". If you see the
3Com NIC listed as eth1 then you can edit the file


to assign eth0 to it. (Remove or comment out the entry for the old NIC.)

As it turned out, the conversion process from local VMWare workstation up to VMWare ESX Server caused the virtual NIC’s MAC Address to change. So I go hunting for the file they talk about, and it’s not there. Fortunately, it was only a few characters off from my debian box:


looking at the contents of this file, I found the system’s configuration for all of the network adapters, and noticed that there are two of them in my file:


but I know that the VM only has one virtual NIC. so, following the advice from the post above, I comment out the current “eth0” and rename “eth1” to “eth0”.


Reboot the box and it works!


About Derick Bailey

Derick Bailey is an entrepreneur, problem solver (and creator? :P ), software developer, screecaster, writer, blogger, speaker and technology leader in central Texas (north of Austin). He runs - the amazingly awesome podcast audio hosting service that everyone should be using, and where he throws down the JavaScript gauntlets to get you up to speed. He has been a professional software developer since the late 90's, and has been writing code since the late 80's. Find me on twitter: @derickbailey, @mutedsolutions, @backbonejsclass Find me on the web: SignalLeaf, WatchMeCode, Kendo UI blog, MarionetteJS, My Github profile, On Google+.
This entry was posted in Linux, Networking. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • This is a product of the last few versions of udev and has bitten me equally on both Debian and Fedora (Fedora perhaps even the more so cos it’s hit more machines). Both in the case where you change one interface card and in the case where you change the entire platform, I would think it more useful to enumerate new network cards into the places of those which are no longer present, rather than continuing from eth2, eth3 etc.

  • Christian Jensen

    Thanks a ton – I had never found out this myself :-)

    Uploaded from Workstation 8 directly to ESX 4 and had this problem.

  • Ike

    Thanks Derick, I had same error after restoring a vmware virtual vCenter appliance (vcsa) 5.0. VM powered up ok, but had no NIC. After much searching came across your article, I applied above, and voila! I have a working vm.