How to restore vm and xo metadata from backups?
-
I have experienced a catastrophic disaster while I tried to upgrade my rack servers. At first it worked very well by using the migration of VMs to the new server then assigning the new server as the master. Then, I decided that it was time to change the DHCP assigned address to take the place of the static ip , replacing the old server. Then all hell broke loose.
the xsconsole no longer saw the pms, yet the vms were still running!
decided to reboot the server to see if it's xsconsole not reading something and a reboot would solved it.
That's when I realized that all my metadata were gone! the vms were gone. the storage repositories were gone.
Yet, I know that the iSCSI repository, which stores all the vms, was still intact by looking at the mount of free vs. total space as presented in TrueNAS Core.
After many tries, I was able to reattach the iSCSI repository to the new server running, of course, xcp-ng. But there were no VMs presented in presented in a new instance of Xen Orchestra (CE). I thought that if there's a way to restore the meta-data for XO config and XO backup, I would be able to restore everything. The data has been downloaded off TrueNAS and into my MacBook Pro. It seems that these strategies aren't working.
I googled around to find out best practice or solutions to no avail.
I hope that you can help me please! These VMs are business critical. If someone can help me, the business won't be burning come Monday morning.
-
I don't have experience with something like this, but I can do a mini lab with something like this, to test the steps below .
What would I do.
0. Do you have metadata backup for XCP-ng?-
If YES
1.1. I would reinstall the server from scratch, before make a backup with Clonezilla with the boot disk of XCP-ng ;
1.2. I would reconnect iSCSI, without formatting it - reinitialize, only reconnecting (to not delete the data on it);
1.3. I would restore the metadata;
1.4. The result should be all the info about the VM that was on XPC-ng, and hopefully it also attaches the iSCSI disks. -
If NO
2.2. I would reinstall the server from scratch, before make a backup with Clonezilla with the boot disk of XCP-ng;
2.2. I would reconnect iSCSI, without formatting it - reinitialize, only reconnecting (to not delete the data on it);
2.3. I would redone the VMs from scratch and start attaching the disks to identify which and to which VMs they were attached before;
2.4. The result should be functional VMs
In principle, if you have the disks intact, the data is there, you just have to restore the VMs (RAM, CPU, attached the correct disks, etc.)
This is the menu for XCP-ng metadata backup, Backup/New.
-