I am running some VMs with libvirt and KVM/QEMU. Now I want to backup them and save the backups into object storage where I can restore them from to another host if the harddrive of my host fails. I researched a bit and I don't really get what I need to save so that I'm able to restore my VMs on another host again. If I do a snapshot with

virsh snapshot-create-as --domain vm02 snapshot-test --diskspec vda,file=/root/vm/vm-snapshots/testsnapshot.qcow2 --disk-only --atomic

the resulting file is only about 1MB in size which is way to low to contain everything. Can I somehow get a single file which contains everything needed to run the VM on another host?

It may also be an option for me to shut down the VM for the backup even though it would be better if I could do it while the VM is running.

I already researched but I don't really get how these qcow2 images work and how libvirt handles snapshots.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.