You are not Logged in
Would you like to Login or Register

Today is: 10 February 2012
Check this months hot topics

Fixing Networking Problems with a Cloned Linux VM

Often when cloning virtual Linux boxes (or using VMWare converter to deploy a virtual appliance) I find that the networking simply doesn't work. eth0 will exist but will not find a network even after checking and double checking /etc/networking/interfaces. The problem is that Linux has associated eth0 with the previous machines mac address for that interface.

/etc/udev/rules.d/70-persistent-net.rules (on ubuntu anyway)

This file will contain the associations such as...

# 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"

The first (eth0) will be from the original machine, and the second (currently eth1) is from the new VM.

To Fix

First stop udev and networking...

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

Edit /etc/udev/rules.d/70-persistent-net.rules, remove the original interface and rename the new interface from eth1 to eth0. Restart networking...

/etc/init.d/udev start
/etc/init.d/networking start

All being well, your Linux box should now have networking back

Hope this help

Chris

kick it on DotNetKicks.com del.icio.us digg Mister Wong YahooMyWeb Reddit Furl Spurl blogmarks
Chris Pont
Author : Chris Pont
Published : 10 August 2010

Add Comment

Enter your comment below and it will be submitted for moderation.

Your Name

Add Tag

Please enter tags for this article, seperated by semi-colon ;

View Tag's by : # articles | # views

More Publications

Increase your Virtual machine's disk size
Paul Marshall - 05/06/2007
How To Create A Virtual Machine from a Physical Disk
Mark Page - 15/06/2006
How to convert a physical computer to Virtual Machine
Greg Duffield - 14/07/2006
Resize VMware virtual disk
Barrington Haynes - 16/07/2007
Unsupported resolutions
Barrington Haynes - 20/06/2006