Xen-Orchestra - automatic backap tests

 

 

Today I will be talking about Xen Orchestra. Ways and types of backups of virtual machines running on XCP-NG servers with a special focus on automatic backup testing. That an untested backup will work may turn out to be just a false assumption.

 

Admittedly, I have already done an episode on how to manage XCP-NG xen orchestra servers , where I talked about the types of backups, but at the end of May 2022, Xen Orchestra version 5.71 came out, which includes some interesting facts. From my point of view, a useful thing is the automatic disconnection of virtual USBs to first take a snapshot and then bacup. This comes in handy when, when we are forced to connect some physical USB. Generally it is some license key or something similar. Then we redirect such usb physically connected to the server, to a specific VM. However, then there is a problem with backups, because it is unfortunately impossible to take a snapshot of a VM with a virtual USB connected. Since all Xen Orchestra backups use snapshots, a backup with a connected USB simply doesn't work.

 

Until now, it had to be done with scripts: turn off the VM, disconnect the virtual USB, make a backup, actually snapshot then backup, connect the virtual USB, turn on the VM. A lot of this combining, you'll admit it yourself. In THIS version, this problem has been solved. The most important thing, however, is the functionality of automatic testing of created backups, which, after creating a backup, recreates it on a designated other server, waits until the VM boots and if everything is fine, closes it, deletes it and marks the backup as successful. GENIAL!

 

Of the important details: first of all, it starts the VM in an isolated network, so we don't have to worry that when the VM gets up, something starts working, something starts synchronizing with something. This problem has been solved. It will not introduce disruption to our network. Secondly, as a test of whether the VM is working, it is considered to establish Xen Tools communication, ozaaza that such a test will be effective only with VMs that have Xen Tools installed . Although, in principle, it should always be done, because they significantly improve the performance of VMs. However, it is worth knowing that this is the determinant of proper performance during the test. Let's also note that it won't check anything more than that; it won't check if a web server is running, for example? It will not check if the sSQL server is running? or anything else.

 

It is also worth mentioning that the server on which we will perform the tests cannot be the same server on which the VM originally runs. At least I was not able to fire up in this way. Probably, due to the fact that the VM played for testing would have the same UUID, which probably causes a conflict.

 

And now let's move on to the configuration. With that, I invite you, to watch the video 🙂