Greetings,

I am running a test automation service which makes use of QEMU/KVM. As the tests run for few minutes, the time spent booting the OS (Windows) is quite a waste of resources so I decided to play a bit around the idea of hot cloning running VMs.

Following an old discussion I found, I proceeded with saving the VM state through virsh save, edit its XML file with virsh save-image-edit and restore it through virsh restore.

The problem comes when I try to change some specific fields in the XML. As I run several instances on the same server, I need to provide different names and UUIDs to avoid collisions. Unfortunately, libvirt forbids this operation issuing the following error message:

error: unsupported configuration: Target domain uuid 7c85e288-88fe-43d2-8b9c-89af4c83c10a does not match source 62f28517-8601-4d2e-942c-a20d087f9f4a

Same thing applies with the name field.

Is this a limitation of the API or it is a designed protection mechanism? Would it be possible to overcome this limit?

Thank you.