VMware

This Question is Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
5 Replies Last post: Feb 14, 2009 11:11 AM by bernie888  

Eth0 disapears in VMware and Ubuntu Server posted: May 27, 2007 8:33 PM

Click to view tuaris's profile Novice 29 posts since
Apr 4, 2005
I've reproduced this error many times:

1) Download VMWare Server, and Install
2) Download Ubuntu Server 7.04, and install in VMWare
3) Complete the OS installation
4) Networking is functional, eth0 is present
5) Shutdown
6) Copy the virtual machine or rename folder that it's in
7) Launch new copy, VMWare prompts to create a new ID
Networking is no longer functional, eth0 is gone

The problem occurs whether or not you install VMWare tools

Re: Eth0 disapears in VMware and Ubuntu Server

1. May 27, 2007 9:20 PM in response to: tuaris
Click to view KevinG's profile Guru 16,980 posts since
Jan 8, 2004
This is not a VMware issue this is a udev issue. Since the VM has a new MAC address from being moved and a new UUID was created, udev believes there is a new network device.

Check /etc/iftab and /etc/network/interfaces file

You can change this behavior with a udev rule.

You may want to look at /etc/udev/rules.d/z25_persistent-net.rules

Re: Eth0 disapears in VMware and Ubuntu Server

2. Aug 6, 2008 11:55 AM in response to: KevinG
Click to view Lance Rushing's profile Lurker 4 posts since
Aug 6, 2008
For Ubuntu Hardy 8.04 I got eth0 work by doing the following:

sudo rm /etc/udev/rules.d/70-persistent-net.rules
sudo reboot

Also I went back and removed the 70-persistent-net.rules from my gold source used for cloning.

Re: Eth0 disapears in VMware and Ubuntu Server

3. Feb 24, 2009 2:35 AM in response to: Lance Rushing
Click to view Superkikim's profile Novice 30 posts since
Feb 10, 2005
I might be naïve, but from my point of view, if a file exists, it has a good reason to do so... Therefore, I like better to edit the file, and correct the rules rather then to remove it.

Stop networking and udev:

/etc/init.d/udev stop
/etc/init.d/networking stop


Then, edit the persistent-net.rules file:

On Ubuntu: /etc/udev/rules.d/70-persistent-net.rules
On Debian: /etc/udev/rules.d/z25-persistent-net.rules

You will find two instances. The first one is the one from the template virtual machine. The second one is the one attributed when answering "I copied it", on first start:
# PCI device 0x1022:0x2000 (vmxnet)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:36:xx:xx", ATTR{type}=="1", NAME="eth0"

# PCI device 0x1022:0x2000 (vmxnet)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:75:xx:xx", ATTR{type}=="1", NAME="eth1"


Delete the 1st one, and change eth1 to eth0 at the end on the second one. You will end up with:
# PCI device 0x1022:0x2000 (vmxnet)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:75:xx:xx", ATTR{type}=="1", NAME="eth0"


Save the file (obviously), and then restart udev and networking:
/etc/init.d/udev start
/etc/init.d/networking start


And it works. You don't need to reboot your machine or what so ever, and you don't have to delete that rule file.

Re: Eth0 disapears in VMware and Ubuntu Server

4. Jan 26, 2009 3:06 PM in response to: Superkikim
Click to view GuruLeeNyc's profile Novice 13 posts since
Jan 18, 2008

I experienced this problem when converting a ubuntu 8.04appliance to esx 3.5. This fixe d my issue:

sudo rm /etc/udev/rules.d/70-persistent-net.rules
sudo reboot

Re: Eth0 disapears in VMware and Ubuntu Server

5. Feb 14, 2009 11:11 AM in response to: Lance Rushing
Click to view bernie888's profile Lurker 2 posts since
Feb 11, 2009

thanks guys for posting the answers on this one. It was doing my head in when my vmware servers just lost their networking!! Not sure if the original cause was due to cloning as I did have it working after cloning for a considerable period, but no matter, the fix of removing this persistent net rules file and rebooting worked for me!

Excellent stuff guys.

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities