I’ve spent a large amount of time today trying to get cloning working within Virtual Box with a copy of Ubuntu 12.04 server with limited success.
Now by default a VM is set to use NAT for it’s network interfaces but I needed bridging and this causes a problem – when the clone starts it comes up with no ethernet interfaces, even though the original vm works fine.
In the end it appears to be udev thats causing the problem. The clone gets a new mac address (correctly) but udev knows the original mac address so disables eth0 hence no networking.
The fix is simple – tell udev to bugger off:
$ sudo rm /etc/udev/rules.d/70-persistent-net.rules $ sudo mkdir /etc/udev/rules.d/70-persisitent-net.rules
Reboot and you should find the network interface reappear. Do this on the original vm and all your clones will work first time.
It’s a bit of a hack but it works – the mkdir simply prevents udev from recreating the rules on startup.