Baremetal Restore of Xen Servers

Baremetal restore of Xen servers may fail at times if you are performing the disk creation manually. At times it may work, but most of the times this will give an issue. This is because, Xenservers requires something called its metadata backup to restore the server properly. We can perform the metadata backup on a domain host, but the same backup will not work on another Xenserver host. Due to this reason, it is imperative that we need to have a method to backup Xenserver metadata. The Xackup utility provided by Fungusware is used to backup every Xenserver VMs every two to three days and we can use it when we require a baremetal restoration using R1Soft. We don't use Xackup to store backups daily and to do baremetal restore due to the following reasons:

Due to the above reason, we can do the below when baremetal restore Xen VMs are required.

Note: You will not require to change the mode of the VM between Paravirtualised (PV) and Hardware Virtual Machine (HVM) if going through the above method. But in case you need to restore the VM directly without any Xackup backups, you may need to perform the below to get the VM booting:

http:wiki.r1soft.com/display/kb3/BMR+of+a+Citrix+Xen+6.0+paravirtualized+VM

Usually, you will only require to execute:

For HVM to PV conversion:

xe vm-param-set uuid=[vm uuid] HVM-boot-policy=
xe vm-param-set uuid=[vm uuid] PV-bootloader=pygrub

For PV to HVM conversion:

xe vm-param-set uuid=[vm uuid] HVM-boot-policy="BIOS Order"
xe vm-param-set uuid=[vm uuid] PV-bootloader=

This is equally applicable to Xen 7 VMs too. For CentOS 6, it should be PV mode. For CentOS 7, it should be HVM mode. You may need to check the Xenserver provided templates or Google to see what is the preferred mode for other Operating Systems.