Xen-Orchestra - automatic backap tests

 

 

Xen-Orchestra - ways and types of backups of virtual machines running on xcp-ng servers with special emphasis on automatic backup testing.

 

Because the fact that an untested security copy will work may be just a false assumption.

 

Admittedly, I've already done an episode on how to manage XCP-NG servers through Xen-Orchestra https://eonea.pl/xen-orchestra-xoa-zarzadzaj-backup-snapshot-migracje/ I'm talking about it about backup types but in late may 2022 version 5.71 came out https://xen-orchestra.com/blog/xen-orchestra-5-71/ Which contains some interesting facts. From my point of view, a useful thing is the automatic disconnection of vUSB to take a snapshot and then backup.

 

This comes in handy if it is a VM that we are forced to connect some USB, generally some license key or something like that. Then we redirect such USB connected to the server to a specific VM. Then there is a problem with backup because it is impossible to snapshot such a VM. Since all forms of backup in Xen-Orchestra use snapshots this backup of a VM with a USB connected simply did not work. Until now, you had to use scripts to turn off the VM, disconnect the vUSB, make a backup, connect the vUSB, turn on the VM ... A lot of combining. In this version, this problem has been solved.

 

The most interesting, however, is the function of automatic testing of created backups, which after creating a backup plays it on the indicated server waits until it starts and if everything is it closes deletes and marks the backup as successful. GENIAL!!!

 

Of the important details, firstly it starts the VM isolated from the network so we don't have to worry that the VM under test will introduce some interference in the network. Secondly, as a test whether the VM is running, it treats the establishment of communication with xen-tools. This means that such a test will only be effective with a VM with vm-tools installed. Although in principle this should always be done because they significantly improve performance, it is worth knowing that this is the determinant of proper operation during the test.

 

Please note that it will not check anything else. It won't check whether n.e.g. the web server or SQL or anything else is working.

 

It is also worth mentioning that the server we will use for testing does not have to be the same server as the one on which the original of our VM is. More pleasantly, it did not want to work for me. Probably due to the fact that the VM being recreated for testing would have the same UUID, which would cause a conflict.

 

And now click by click I invite you to watch .