I’m running Fedora Server 41 and created a VM in KVM. My crude way of backup was to shutdown the VM weekly, make a copy of the .qcow2 file (located on /var/lib/libvirt/images) and the xml definition (located in /etc/libvirt/qemu).
I have copied these two files to another server but for some strange reason I can’t find the .xml file. I have the copy of the image .qcow2 but not the definition. The disk on the server is damaged so can’t access it anymore.
Is there a way for me to recreate the .xml file using qemu-img on the .qcow2 file or other commands? It’s a big lesson in backup management but I first need to get this VM up and running again.
Create a new VM and tell it to use your existing .qcow2 file.
Of course you will have to get the hardware options right to support your VM.
You should be able to interate the options to get that right.
Make sure you have a copy of the .qcow2 image incase you have to start again.