0

I would like to back up the disks of a VM following the Live-disk-backup-with-active-blockcommit procedure at Libvirt Wiki.

  1. 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
    
  2. Copy the base disk to the remote location.

  3. Commit the disk with

    virsh blockcommit vm_name vda --active --verbose --pivot
    
  4. 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, vba and vdb, 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?

0

I had the exact same problem, which I tried to share with additional information about the symptom. But my contribution was deleted by the moderator. Anyway, I have since found the problem. The version of qemu-kvm that was included in the Ubuntu packages for 18.04 is 2.11 which is really old and apparently did not have the ability to handle multiple disks in this manner. I did a wipe and reload to 20.04 which includes qemu-kvm version 4.2. The symptom is no more.

1
  • Unfortunately I haven't had a chance to try yet (considering that this is a delicate operation). You think it is possible to upgrade only qemu without reinstall the OS?
    – Michele
    Oct 13 '20 at 13:43

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.