I had similar issues on Ubuntu 15.10. I’ve downgraded Qemu to 2.1. Now it works like a
charm.
Van: libvirt-users-bounces(a)redhat.com [mailto:libvirt-users-bounces@redhat.com] Namens
Keyur Bhalerao
Verzonden: maandag 7 december 2015 21:53
Aan: libvirt-users(a)redhat.com
Onderwerp: [libvirt-users] Efficient live disk backup with active blockcommit : Failed
'block-commit': Could not reopen file: Permission denied
Hi ,
Working on the simple POC : Advanced snapshot using libvirt and qemu . Following are the
exact steps which are followed .
1. Created as base VM - Ubuntu 15.10 with following libvirt and qemu versions
Using library: libvirt 1.2.16
Using API: QEMU 1.2.16
Running hypervisor: QEMU 2.3.0
QEMU emulator version 2.3.0 (Debian 1:2.3+dfsg-5ubuntu9.1), Copyright (c) 2003-2008
Fabrice
Bellard
2.Created nested VM (vm-01) using VirtManager on base VM.
3.Used following commands to take the multiple snapshots -
virsh # list
Id Name State
----------------------------------------------------
7 vm-01 running
virsh # domblklist vm-01
Target Source
------------------------------------------------
vda /home/ubuntu/vm-01.img
hda /dev/sr0
snapshot-create-as --domain vm-01 snap1 --diskspec vda,file=/var/lib/libvirt/sn1.qcow2
--disk-only --atomic
snapshot-create-as --domain vm-01 snap2 --diskspec vda,file=/var/lib/libvirt/sn2.qcow2
--disk-only --atomic
virsh #snapshot-list vm-01
------------------------------------------------------------
snap1 2015-12-07 11:51:51 -0800 disk-snapshot
snap2 2015-12-07 11:52:28 -0800 disk-snapshot
virsh # snapshot-list vm-01 --tree
snap1
|
+- snap2
List the current block device in use, again. It can be noticed, the new overlay
'sn2.qcow2' is the current disk in use:
virsh # domblklist vm-01
Target Source
------------------------------------------------
vda /var/lib/libvirt/sn2.qcow2
hda /dev/sr0
Now that the backup is finished, perform active blockcommit by live mergning contents of
sn2 into base:
ubuntu@keyurubuntu:~$ virsh blockcommit vm-01 vda --active --verbose --pivot
error: internal error: unable to execute QEMU command 'block-commit': Could not
reopen file: Permission denied
I am not sure why this is getting as permission denied. I have tried couple of times
reinstalling and creating new VMs . Every time when i have tried to block-commit getting
landed into same error.
Is there any troubleshooting or solution to this issue. Stuck on this issue for last 2
days.
Quick help much appreciated.
Thanks,
Keyur Bhalerao
Reference used -
http://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit
-
http://kashyapc.com/2012/09/14/externaland-live-snapshots-with-libvirt/