XCP-NG Failed Host

Thank god this is just a what if question. I am using XCP-NG and Freenas in my lab (works great), I am also using it at a few customers in the same format. My question is, and I may be thinking about this too in depth but how would you recover from a failed host? My VMs are all stored on the freenas box except for XOA, idk why but I like to run it on whatever little local storage I have on the host.

So my question is really, if the host fails is it just a matter of

  1. Installing xcp again,
  2. Mounting the ISCSI volume (without formatting, oh jeeze don’t format it James! baddd)
  3. Import the VM???
  4. Create new vm and attach storage from the old VM?

Do I need to be backing up the metadata from the host?

I have been using BackupNG to backup production VMs to an NFS share on the freenas box, so i assume i could also just

  1. Install xcp again
  2. Install XOA
  3. Re map the nfs share with the backups
  4. use BackupNG to restore the VMs

I hope this makes sense.

Yes, using BackupNG to backup production VMs to an NFS share on the freenas box is the excellent way to go. And then if tragedy would strike, you would be able to safely restore.

  1. Installing xcp again
  2. Mount Storage volumes
  3. Import VM’s

I have not done a video yet, (but it is on my to do list) to talk about the backup / restore methods to recover the server. It’s not as simple as I would like it to be, or maybe I don’t understand a simpler way to restore the metadata back to the server.

Previously in the my lab I remember trying to backup the host metadata and restoring it to a new server i had laying around I don’t remember it going well. I believe I was running one of the earlier XCP versions maybe from late 2017.

I would think there has to be a way to get the VM back up and running with just the virtual hard disks. Hyper-v I know that as long as you have that VHD/VHDX you can just go to a new host create vm and add the vhd as the drive and away you go.

For now I will go with the xoa restore method. Hope to never use it!

Yes, you can re-attach a virtual hard disk no problem, but you will have to recreate the CPU/RAM/NETWORK settings first in XCP-NG as that is not stored into the VHD itself.

thanks tom! I will play around with this and firm up my process.