Debian networking stopped working after cloning VM image (virtualbox)

3

After I cloned a VirtualBox VM image, either original nor cloned Debian 6 (squeeze) image have networking works anymore.

I've read A TON of articles online describing modifying the /etc/udev/rules.d/70-persistent-net.rules and /etc/udev/rules.d/75-persistent-net-generator.rules files but none of those "fixes" worked for me.

(Apparently this is a "feature" of UDEV that causes all kinds of problems if you are using Debian/Ubuntu in a virtualized environment for development and want to clone images because it changes your MAC address of your virtual NIC).

Can someone please described exactly what I need to do in order to have networking working again in my VM debian images. Thanks

Note: networking stopped in BOTH (all) debian virtual images now. Essentially, 1 how do I fix my MAC address since I don't even know what MAC address should now be used, [2] how do I prevent this from happening in the future when I clone VM images?

UPDATE: My problem was filed as a bug with both VirtualBox and VMWare but both companies closed the tickets stating this is a "feature" of Debian. Some people suggests ways to fix the problem but none have worked.

Jason7

Posted 2011-06-01T05:36:54.263

Reputation: 31

Happens when cloning fedora machines too as of Virtualbox 4.2.8. I thought updating Virtualbox would fix the dns but it doesn't. I have yet to try @raydos answer because doing the same operation on fedora is different. – Trevor Boyd Smith – 2013-03-04T14:41:05.207

The MAC address of your virtual nettwork cards can be found and changed in the settings of your virtual machine. For virtualbox, shut down the guest, right click the guest and go into the network settings. – Lennart Rolland – 2014-01-22T10:59:30.870

Answers

2

I don't know if you are still tracking this problem but, I have encountered this problem too and the solution that works consistently for me when I do clone a Debian guest is as follows:

  1. Prior to cloning, shutdown the VM to be cloned.
  2. Clone the VM (make sure you select "Reinitialize the MAC address of all network cards")
  3. Boot the clone VM and edit the /etc/udev/rules.d/70-persistent-net.rules as root. Remove all references to interfaces. These will be rebuild automatically the next time you boot.

raydos

Posted 2011-06-01T05:36:54.263

Reputation: 21

With Debian Jessie the directory /etc/udev/rules.d is empty. – Ortomala Lokni – 2016-02-05T20:58:43.303

Excellent, fixed my problem. – andynormancx – 2014-05-23T10:42:07.123