VMware Communities > VMTN > Desktop Products > VMware Player > Discussions
Actions

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
1 2 Previous Next
20 Replies Last post: Aug 23, 2007 3:12 AM by burke3gd
Reply

lost eth0 when using a copied ubuntu-server vm

Jun 22, 2006 7:06 PM

Click to view adamsi's profile Lurker adamsi 5 posts since
Jun 14, 2006
Hi,

I installed an ubuntu-server 6.06 as guest os and every thing is fine. But when I copy the vm to another location on disk, the guest os were not able to find the network adapter and lost its eth0. I ran ifup eth0 but got a "No such device". copy it back to the original directory then everything is ok. I tried changing default vlance to intel pro/1000 and changing NAT to bridged networking, none of them worked. WinXP or Xubuntu desktop don't have this problem. What's wrong? Vmplayer's problem or ubuntu-server's ? Host os is ubuntu-desktop 6.06

Adam
Reply Re: lost eth0 when using a copied ubuntu-server vm Jun 23, 2006 2:00 PM
Click to view kingneutron's profile Master kingneutron 1,190 posts since
Apr 16, 2005
When vmplayer complained that the VM's location changed, did you click Keep or Create?

After moving/cloning a VM, you should Create a new MAC address for it. Also:
' less /var/log/messages ' and see if any errors come up with network drivers, eth0, etc.
Reply Re: lost eth0 when using a copied ubuntu-server vm Jun 25, 2006 5:14 PM
in response to: kingneutron
Click to view adamsi's profile Lurker adamsi 5 posts since
Jun 14, 2006
Thank you for your reply :)

vmplayer didn't ask the "location changed" question. I've expected it to ask but nothing happened, the vm just started up.
Reply Re: lost eth0 when using a copied ubuntu-server vm Jun 26, 2006 6:47 AM
in response to: adamsi
Click to view nick.couchman's profile Virtuoso nick.couchman 3,820 posts since
Jan 13, 2006
On the guest, try "dmesg | grep eth0" and see if there are any messages about the Ethernet device. If not, try running "modprobe e1000" or "modprobe pcnet32" to see if you can manually load the driver. Finally, try "ifconfig -a" and see if eth0 is listed in the list of all available network interfaces on the machine.
Reply Re: lost eth0 when using a copied ubuntu-server vm Jun 27, 2006 4:35 AM
in response to: nick.couchman
Click to view nome's profile Lurker nome 1 posts since
Jun 27, 2006
I probably have the same issue.
Copied the guest to a new directory, opened it, created new uuid, and started the new guest.
Dmesg looks ok, eth0 is there (pcnet-something), it is in ifconfig, but can not ifup it.
I thought it could macaddress problem, changed it in the .vmx file, rebooted, and it came up as eth1.
I made another copy of the original, and changing eth0 to eth1 in /etc/network/interfaces made it work after ifup eth1. (probably with the same mac as original guest, if mac isnt changed at the same time as uuid.

host and guests are ubuntu 6.06 server.

host is standard install , but upgraded (current) yesterday
Reply Re: lost eth0 when using a copied ubuntu-server vm Jun 27, 2006 7:42 AM
in response to: nome
Click to view nick.couchman's profile Virtuoso nick.couchman 3,820 posts since
Jan 13, 2006
Some of the newer Linux distributions have a tendency to tie ethernet devices to MAC addresses. When you generate a new UUID, the MAC address changes, and the distribution doesn't know where to find the interface because the eth0 device that is loaded by the driver differs in MAC address from the device listed in the configuration. You can try going to /etc/sysconfig/network or /etc/sysconfig/network-scripts and editing the eth0 configuration file. If a MAC address is listed, compare the MAC address listed in the configuration with the one listed in the ifconfig output. If they differ, try changing the one in the configuration to match the ifconfig output and reboot.
Reply Re: lost eth0 when using a copied ubuntu-server vm Jul 14, 2006 5:13 AM
in response to: nick.couchman
Click to view Stonekeeper's profile Lurker Stonekeeper 1 posts since
Jul 14, 2006
Here is a script that should sort you out. I ran into the same problem and this was my way of fixing it. I'm sure it's not the best, but it works. Save it (I called it "fixmac") and put into /usr/sbin/ on your "base machine". Then, after shutting down and copying your base machine, boot the new machine, log in, and execute "fixmac" as root. Reboot and your interface should start working.

---- Start Script ----

mac=`ifconfig -a | grep "HWaddr" | cut -d " " -f 11`
echo "eth0 mac $mac arp 1" > /etc/iftab

---- End Script ----

I hope that helps!
Reply Re: lost eth0 when using a copied ubuntu-server vm Jul 31, 2006 12:44 PM
in response to: Stonekeeper
Click to view Eric_B's profile Lurker Eric_B 1 posts since
Jul 31, 2006
I ran into the same problem after copying a Linux vmware image to another location. When I tried to enable the NIC, I received an error message like device eth0 has a different MAC address than expected. The fix was to edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file to update the HWADDR line to match the MAC address found in the image's VMX file (the MAC address can be found on the line ethernet0.address=XX:XX:XX:XX:XX:XX).
Reply Re: lost eth0 when using a copied ubuntu-server vm Oct 18, 2006 5:00 PM
in response to: Stonekeeper
Click to view AndyTakacs's profile Lurker AndyTakacs 4 posts since
Aug 31, 2006
Here is a script that should sort you out. I ran into
the same problem and this was my way of fixing it.
I'm sure it's not the best, but it works. Save it (I
called it "fixmac") and put into /usr/sbin/ on your
"base machine". Then, after shutting down and copying
your base machine, boot the new machine, log in, and
execute "fixmac" as root. Reboot and your interface
should start working.

        • Start Script ----

mac=`ifconfig -a | grep "HWaddr" | cut -d " " -f 11`
echo "eth0 mac $mac arp 1" > /etc/iftab

        • End Script ----

I hope that helps!

Quoted because this solution fixed a cold migration of an Ubuntu 6.06 (LAMP) server from ESX 2.52 --> ESX 3.0.1. Initially the server showed no known interfaces even after upgrading VMTools. After this script ran and the VM was rebooted eth0 was back up and running normally.

It did help, thank you!

Reply Re: lost eth0 when using a copied ubuntu-server vm Oct 28, 2006 1:16 PM
in response to: AndyTakacs
Click to view pjgi4d's profile Lurker pjgi4d 1 posts since
Oct 28, 2006
I had this same problem after I downloaded and tried to start this appliance:
http://www.young-technologies.com/Software/Subversion-Virtual-Machine/

ifconfig only reported lo
ifconfig -a reported a eth1 and lo, but no eth0

By changing the MAC in /etc/iftab to match the new one generated when I opened the appliance (Stored as ethernet0.generatedAddress in the .vmx file), it worked after reboot.

Thanks so much for a concise and accurate solution.

pjgi4d
Reply Re: lost eth0 when using a copied ubuntu-server vm Nov 28, 2006 8:30 AM
Click to view RainerLfBS's profile Lurker RainerLfBS 2 posts since
Nov 28, 2006
Hi,

your problems sound exactly like the problem we ran into when cloning a Debian installation.

The root of the problem at our site was udev's handling of devices. Udev keeps a history of devices attached to the computer. What makes sense for i.e. USB sticks (that is, each USB stick you attach will be recorded and mounted to the same point when attached again at a later point in time), causes problems when systems are cloned.

There is a file /etc/udev/rules.d/z25_persistent-net.rules, where udev memorises, which hardware device should get named eth0. Here it looks like this:
# PCI device 14xx:16xx (tg3)
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", SYSFS{address}=="00:11:xx:xx:xx:xx", NAME="eth0"

When you run the image on another computer, the new network adapter is recognised on the PCI bus and a new entry in the above mentioned file is generated. "eth0" is already given to device 14xx:16xx, so the new device gets named "eth1".

If you delete this file, it will be rebuilt during the next system startup and your problem should go away.

Regards,
Rainer
Reply Re: lost eth0 when using a copied ubuntu-server vm Nov 28, 2006 10:13 AM
in response to: adamsi
Click to view jjmateu's profile Novice jjmateu 17 posts since
Nov 20, 2006
Hi:

Yoy need create a new mac address and the answer is here:

http://www.vmware.com/support/ws55/doc/ws_net_advanced_mac_address.html

After that, probably you must delete and create again the ethernet adapter in the guest and configure it using the hardware tool that provide by the Operating System.
Reply Re: lost eth0 when using a copied ubuntu-server vm Dec 22, 2006 2:44 AM
in response to: jjmateu
Click to view roeschu's profile Novice roeschu 25 posts since
Nov 16, 2006
just want to add that i had the same problem migrating a ubuntu guest from a vmware server to a esx server.

After migration the eth0 device was not present.

Solution was for me too, to see after the HW Adress in the new vmx file and write this HW Adress in /etc/iftab.

hope this helps other people too.

thx a lot + greets
Reply Re: lost eth0 when using a copied ubuntu-server vm Jan 1, 2007 9:42 PM
in response to: roeschu
Click to view lilboy716's profile Lurker lilboy716 1 posts since
Jan 1, 2007
I have read through some of the previous posts and provided a step by step way to fix this.

I'm running Ubuntu, as guest & host
The Fix:

ifconfig -a
the "new" ethernet adapter may show up as eth1

write down the mac address: xx:xx:xx:xx:xx

cd /etc/
sudo vim iftab

change the existing mac address to your "new" ethernet adapter MAC address...

crossing my finger (I am writing this while I am making the changes)....

...

ping google.com

GREAT SUCCESS!

here are some other solutions to problem I've faced using VMWare Player
http://www.google.com/notebook/public/06509517885347462852/BDSrpIgoQ2vrxhvwh

Message was edited by:
lilboy716

Reply Re: lost eth0 when using a copied ubuntu-server vm Apr 3, 2007 6:49 AM
in response to: RainerLfBS
Click to view einjen's profile Novice einjen 14 posts since
Mar 30, 2007
Thank you!

this is infact the REAL solution...... for debian at least
1 2 Previous Next