<div dir="ltr">Hi ,<div><br></div><div>Working on the simple POC : Advanced snapshot using libvirt and qemu . Following are the exact steps which are followed . </div><div><br></div><div>1. Created as base VM - Ubuntu 15.10 with following libvirt and qemu versions</div><div><div>   Using library: libvirt 1.2.16</div><div>   Using API: QEMU 1.2.16</div><div>   Running hypervisor: QEMU 2.3.0</div></div><div><br></div><div>   QEMU emulator version 2.3.0 (Debian 1:2.3+dfsg-5ubuntu9.1), Copyright (c) 2003-2008 Fabrice </div><div>   Bellard<br></div><div><br></div><div>2.Created nested VM (vm-01) using VirtManager on base VM.</div><div>3.Used following commands to take the multiple snapshots - </div><div><br></div><div><div>virsh # list</div><div> Id    Name                           State</div><div>----------------------------------------------------</div><div> 7     vm-01                          running</div><div><br></div><div>virsh # domblklist vm-01</div><div>Target     Source</div><div>------------------------------------------------</div><div>vda        /home/ubuntu/vm-01.img</div><div>hda        /dev/sr0</div><div><br></div><div>snapshot-create-as --domain vm-01 snap1 --diskspec vda,file=/var/lib/libvirt/sn1.qcow2 --disk-only --atomic<br></div><div>snapshot-create-as --domain vm-01 snap2 --diskspec vda,file=/var/lib/libvirt/sn2.qcow2 --disk-only --atomic<br></div><div><br></div><div>virsh #snapshot-list vm-01</div></div><div><br></div><div><div>------------------------------------------------------------</div><div> snap1                2015-12-07 11:51:51 -0800 disk-snapshot</div><div> snap2                2015-12-07 11:52:28 -0800 disk-snapshot</div><div><br></div><div>virsh # snapshot-list vm-01 --tree</div><div>snap1</div><div>  |</div><div>  +- snap2</div></div><div><br></div><div><span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13.3333px">List the current block device in use, again. It can be noticed, the new overlay 'sn2.qcow2' is the current disk in use:</span><br></div><div><div><br></div><div>virsh # domblklist vm-01</div><div><br></div><div>Target     Source</div><div>------------------------------------------------</div><div>vda        /var/lib/libvirt/sn2.qcow2</div><div>hda        /dev/sr0</div><div><br></div></div><div><span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13.3333px">Now that the backup is finished, perform active blockcommit by live mergning contents of sn2 into base:</span><br></div><div><br></div><div><div>ubuntu@keyurubuntu:~$ virsh blockcommit vm-01 vda --active --verbose --pivot</div><div>error: internal error: unable to execute QEMU command 'block-commit': Could not reopen file: Permission denied</div></div><div><br></div><div>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. </div><div><br></div><div>Is there any troubleshooting or solution to this issue. Stuck on this issue for last 2 days.</div><div>Quick help much appreciated. </div><div><br></div><div>Thanks, </div><div>Keyur Bhalerao</div><div><br></div><div>Reference used - <a href="http://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit">http://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit</a></div><div>                        - <a href="http://kashyapc.com/2012/09/14/externaland-live-snapshots-with-libvirt/">http://kashyapc.com/2012/09/14/externaland-live-snapshots-with-libvirt/</a><br></div><div><br></div><div>   </div></div>