|
|
This Question is
Possibly Answered
1 "correct" answer available (10 pts)
2 "helpful" answers available (6 pts)
20 Replies
Last post:
Aug 23, 2007 3:12 AM by
burke3gd
lost eth0 when using a copied ubuntu-server vm
Jun 22, 2006 7:06 PM
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
1.
Re: lost eth0 when using a copied ubuntu-server vm Jun 23, 2006 2:00 PM
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.
|
adamsi 5 posts since Jun 14, 2006
Reply
2.
Re: lost eth0 when using a copied ubuntu-server vm Jun 25, 2006 5:14 PM

in response to: kingneutron
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
3.
Re: lost eth0 when using a copied ubuntu-server vm Jun 26, 2006 6:47 AM

in response to: adamsi
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.
|
nome 1 posts since Jun 27, 2006
Reply
4.
Re: lost eth0 when using a copied ubuntu-server vm Jun 27, 2006 4:35 AM

in response to: nick.couchman
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
5.
Re: lost eth0 when using a copied ubuntu-server vm Jun 27, 2006 7:42 AM

in response to: nome
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
6.
Re: lost eth0 when using a copied ubuntu-server vm Jul 14, 2006 5:13 AM

in response to: nick.couchman
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!
|
Eric_B 1 posts since Jul 31, 2006
Reply
7.
Re: lost eth0 when using a copied ubuntu-server vm Jul 31, 2006 12:44 PM

in response to: Stonekeeper
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
8.
Re: lost eth0 when using a copied ubuntu-server vm Oct 18, 2006 5:00 PM

in response to: Stonekeeper
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.
mac=`ifconfig -a | grep "HWaddr" | cut -d " " -f 11`
echo "eth0 mac $mac arp 1" > /etc/iftab
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!
|
pjgi4d 1 posts since Oct 28, 2006
Reply
9.
Re: lost eth0 when using a copied ubuntu-server vm Oct 28, 2006 1:16 PM

in response to: AndyTakacs
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
10.
Re: lost eth0 when using a copied ubuntu-server vm Nov 28, 2006 8:30 AM
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
|
jjmateu 17 posts since Nov 20, 2006
Reply
11.
Re: lost eth0 when using a copied ubuntu-server vm Nov 28, 2006 10:13 AM

in response to: adamsi
|
roeschu 25 posts since Nov 16, 2006
Reply
12.
Re: lost eth0 when using a copied ubuntu-server vm Dec 22, 2006 2:44 AM

in response to: jjmateu
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
13.
Re: lost eth0 when using a copied ubuntu-server vm Jan 1, 2007 9:42 PM

in response to: roeschu
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
|
einjen 14 posts since Mar 30, 2007
Reply
14.
Re: lost eth0 when using a copied ubuntu-server vm Apr 3, 2007 6:49 AM

in response to: RainerLfBS
Thank you!
this is infact the REAL solution...... for debian at least
|
|