Recovering eth0 on Debian after VM clone

Tags:

After cloning a working Debian virtual machine, the new system would not bring up its Ethernet interface. This is because I checked VirtualBox's dialog, "Reset MAC address for network card" and got a new hardware Ethernet address.

Trying "ifup eth0" didn't work. I did an "ip addr" and saw that the only configured interface was now called eth1.

This is simple to solve. Edit the file /etc/udev/rules.d/70-persistent-net.rules and move the new MAC address (like "00-0F-35-01..." and so on) from the eth1 line back to eth0, erasing the previous address in the eth0 line. Then delete the remainder of the eth1 line, save, and reboot.

You should now have your eth0 back.