<p dir="ltr"></p>
<p dir="ltr">On Jun 30, 2017 6:22 AM, "Peter Krempa" <<a href="mailto:pkrempa@redhat.com">pkrempa@redhat.com</a>> wrote:<br>
</p>
<blockquote><p dir="ltr">><br>
</p>
</blockquote>
<p dir="ltr">> On Fri, Jun 30, 2017 at 12:05:47 +0200, Peter Krempa wrote:<br>
> > On Thu, Jun 22, 2017 at 11:02:41 -0400, Doug Hughes wrote:<br>
> ><br>
> > [...]<br>
> ><br>
> > >  virsh blockcommit $vm $DISK --active --pivot<br>
> > ><br>
> > > Normally this works fine, though something went wrong on the 20th.<br>
> > > something happened to make the blockcommit fail, but the -snap file got<br>
> > > deleted (note to self - check return code from blockcommit command!)<br>
> > ><br>
> > > So now I'm in a state. The domain i still running. but it's running off<br>
> > > the -snapshot that is in the xml. I googled around for how to recover a<br>
> > > blockcommit from a deleted snapshot, but didn't find anything. (pointers<br>
> > > welcome)<br>
><br>
> In fact, it's way simpler. If libvirt still knows about the overlay<br>
> image (this is necessary only so that it can say the proper things to<br>
> qemu) you can re-do the block commit:<br>
><br>
> $ virsh list<br>
>  Id    Name                           State<br>
> ----------------------------------------------------<br>
>  3     fedora23                       running<br>
><br>
> $ virsh snapshot-create-as --disk-only --no-metadata fedora23<br>
> Domain snapshot 1498817916 created<br>
> $ virsh domblklist fedora23<br>
> Target     Source<br>
> ------------------------------------------------<br>
> vda        /var/lib/libvirt/images/fedora23.1498817916<br>
> hda        -<br>
><br>
> $ rm /var/lib/libvirt/images/fedora23.1498817916<br>
> $ ls /var/lib/libvirt/images/fedora23.1498817916<br>
> ls: cannot access '/var/lib/libvirt/images/fedora23.1498817916': No such file or directory<br>
> $ virsh blockcommit --active --pivot fedora23 vda<br>
><br>
> Successfully pivoted<br>
> $ virsh domblklist fedora23<br>
> Target     Source<br>
> ------------------------------------------------<br>
> vda        /var/lib/libvirt/images/fedora23.qcow2<br>
> hda        -<br>
></p>
<p dir="ltr">Thanks for the reply! The original image is still there. Only the 1st and only top-level snapshot is deleted.<br>
the blockcommit fails though:<br>
[root@vm1 ~]# virsh blockcommit serv1r2 vda --active --pivot<br>
error: block copy still active: disk 'vda' already in active block job<br>
</p>