I would like to back up the disks of a VM following the Live-disk-backup-with-active-blockcommit procedure at Libvirt Wiki.
I create an external snapshot with
virsh snapshot-create-as --domain vm_name snap_name \ --diskspec vda,file=snapshot_folder/snap.qcow2 \ --disk-only --atomic --quiesce
Copy the base disk to the remote location.
Commit the disk with
virsh blockcommit vm_name vda --active --verbose --pivot
Delete the snapshot with
virsh snapshot-delete vm_name --metadata snap_name
This procedure seems to work, but only with a VM with a single disk. If I try to create a snapshot for machines with two disks, the procedure fails. For instance: if a VM has two disks,
and I try to run the exact same command as shown in step 1 above,
the command returns
error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied
I tried with two
--diskspec parameters, one for
vda and one for
vdb, but the result is the same.
How can I get this to work?