Restoring Virtual Machine from backup = not working network interfaces.


Every time we try to restore VM from backup both with cloudmin interface the network interfaces do not start.

It appears that Cloudmin attach interface with different hardware address and then udev on the VM create new interfaces like eth2, eth3 but they do not have network scripts so the machine is left with not connection. The simplest way to make it work again is to login from the graphical console, login and delete /etc/udev/rules.d/70-persistent-net.rules and reboot.

In this file on the first boot after the restore there are additional lines added from udev.

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="XX:XX:XX:XX:XX:XX", ATTR{type}=="1", KERNEL=="eth", NAME="eth0" < normal

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="YY:YY:YY:YY:YY:YY", ATTR{type}=="1", KERNEL=="eth", NAME="eth1" < normal

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="X1:X1:X1:X1:X1:X1", ATTR{type}=="1", KERNEL=="eth", NAME="eth2" < not normal

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="Y1:Y1:Y1:Y1:Y1:Y1", ATTR{type}=="1", KERNEL=="eth", NAME="eth3" < not normal

The last 2 lines are added when the new interfaces (with different MAC addresses) are attached to the system in the restore.

When restoring machine from backup it should be created with the same hardware address (MAC) as it is in the backup.



That's interesting - we delete that file when creating a system from an image, but not when restoring because we assume that the MAC won't change.

Are you restoring a backup onto a different host system or Cloudmin install?

Yes we are restoring on a different machine. But I remember long time ago restoring on the same Host and the result was the same. I assume that the different machine it is not related. I see in the .serv file there are the MAC addresses of the interfaces but it didn't use it.

Actually, even on a different machine the MAC address within the VM should remain the same after a restore. Which means that the cached mapping from MAC address to Linux ethernet device name should be unchanged.

Thank you for saving me lot of time.

Just as you did, I restored the machine from backup and there was no network. Deleted /etc/udev/rules.d/70-persistent-net.rules and problem was solved.

Jamie, can you please fix the issue.

nminkov2 - do you know if the VM got a different MAC address on restore?