<div dir="ltr">well, not *that* recently, I guess...</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 15, 2015 at 10:51 PM, Marcus <span dir="ltr"><<a href="mailto:shadowsor@gmail.com" target="_blank">shadowsor@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I tracked it down. Found it was introduced in 1.7.0 and patched recently in qemu-kvm. Your version might have the fix backported, qemu-kvm-ev 2.1.2 from redhat/centos/fedora doesn't.<div><br></div><div>Libvirt sends a 'delvm <snapshotid>' to the qemu monitor via HMP, and Qemu, instead of looping over all disks, repeatedly looped over the first one.</div><div><br></div><div>Thanks for looking at it.<br><div><br></div><div><a href="https://bugzilla.redhat.com/show_bug.cgi?id=1243102" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1243102</a><br></div><div><br></div><div><pre style="white-space:pre-wrap;word-wrap:break-word;width:50em;color:rgb(0,0,0)">commit af957387547b05ed6dc4d84c10cca42700a7aeda
Author: Zhang Haoyu <<a href="mailto:zhanghy@sangfor.com" style="color:rgb(102,153,204);text-decoration:none" target="_blank">zhanghy@sangfor.com</a>>
Date:   Mon Sep 29 16:38:02 2014 +0800

    snapshot: fix referencing wrong variable in while loop in do_delvm
    
    The while loop variabal is "bs1",
    but "bs" is always passed to bdrv_snapshot_delete_by_id_or_name.
    Broken in commit a89d89d, v1.7.0.</pre></div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 15, 2015 at 7:26 PM, Chun Yan Liu <span dir="ltr"><<a href="mailto:cyliu@suse.com" target="_blank">cyliu@suse.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
>>> On 7/14/2015 at 05:42 AM, in message<br>
<CALFpzo551ioR=<a href="mailto:w5ASF7JXmtP8EgQSP2au_O6awmyofz9MfG3vg@mail.gmail.com" target="_blank">w5ASF7JXmtP8EgQSP2au_O6awmyofz9MfG3vg@mail.gmail.com</a>>, Marcus<br>
<span><<a href="mailto:shadowsor@gmail.com" target="_blank">shadowsor@gmail.com</a>> wrote:<br>
> Oh, I almost forgot to mention the versions:<br>
><br>
> libvirt 1.2.8-16.0.1.el7_1.2.x86_64<br>
><br>
> qemu 2.1.2-23.el7_1.1.x86_64<br>
<br>
</span>Just FYI, tested on my machine, libvirt 1.2.5, qemu 2.0.0, didn't see this problem.<br>
Both disk snapshots are deleted.<br>
<br>
><br>
><br>
> Also, I'm unclear if the domain snapshot feature is orchestralted by<br>
<div><div>> libvirt, or something that is simply called into qemu to take care of.<br>
> Please forgive me if this is a qemu issue.<br>
><br>
> On Mon, Jul 13, 2015 at 2:35 PM, Marcus <<a href="mailto:shadowsor@gmail.com" target="_blank">shadowsor@gmail.com</a>> wrote:<br>
><br>
> > Hi all,<br>
> ><br>
> >     I've recently been toying with VM snapshots, and have ran into an<br>
> > issue. Given a VM with multiple disks, it seems a snapshot-create followed<br>
> > by a snapshot-delete will only remove the qcow2 snapshot for the first disk<br>
> > (or perhaps just the disk that contains the memory), not all of the disk<br>
> > snapshots it created. Is this something people are aware of?<br>
> ><br>
> >     In searching around, I found a bug report where snapshot-creates would<br>
> > fail due to the qcow2 snapshot ids being inconsistent. That looks like it<br>
> > is patched for 2.4 qemu (<br>
> > <a href="http://lists.nongnu.org/archive/html/qemu-devel/2015-03/msg04963.html" rel="noreferrer" target="_blank">http://lists.nongnu.org/archive/html/qemu-devel/2015-03/msg04963.html</a>),<br>
> > this bug would trigger that one by leaving IDs around that are inconsistent<br>
> > between member disks, but is not the same.<br>
> ><br>
> > # virsh snapshot-create 7<br>
> ><br>
> > Domain snapshot 1436792720 created<br>
> ><br>
> ><br>
> > # virsh snapshot-list 7<br>
> ><br>
> >  Name                 Creation Time             State<br>
> ><br>
> > ------------------------------------------------------------<br>
> ><br>
> >  1436792720           2015-07-13 06:05:20 -0700 running<br>
> ><br>
> ><br>
> > # virsh domblklist 7<br>
> ><br>
> > Target     Source<br>
> ><br>
> > ------------------------------------------------<br>
> ><br>
> > vda<br>
> ><br>
> /mnt/2a270ef3-f389-37a4-942f-380bed9f70aa/e4d6e885-1382-40bc-890b-ad9c8b51a7a<br>
> 5<br>
> ><br>
> > vdb<br>
> ><br>
> /mnt/2a270ef3-f389-37a4-942f-380bed9f70aa/7033e4c6-5f59-4325-b7e0-ae191e12e86<br>
> c<br>
> ><br>
> ><br>
> > # qemu-img snapshot -l<br>
> ><br>
> /mnt/2a270ef3-f389-37a4-942f-380bed9f70aa/e4d6e885-1382-40bc-890b-ad9c8b51a7a<br>
> 5<br>
> ><br>
> > Snapshot list:<br>
> ><br>
> > ID        TAG                 VM SIZE                DATE       VM CLOCK<br>
> ><br>
> > 1         1436792720             173M 2015-07-13 06:05:20   00:01:10.938<br>
> ><br>
> ><br>
> > # qemu-img snapshot -l<br>
> ><br>
> /mnt/2a270ef3-f389-37a4-942f-380bed9f70aa/7033e4c6-5f59-4325-b7e0-ae191e12e86<br>
> c<br>
> ><br>
> > Snapshot list:<br>
> ><br>
> > ID        TAG                 VM SIZE                DATE       VM CLOCK<br>
> ><br>
> > 1         1436792720                0 2015-07-13 06:05:20   00:01:10.938<br>
> ><br>
> ><br>
> > # virsh snapshot-delete 7 1436792720<br>
> ><br>
> > Domain snapshot 1436792720 deleted<br>
> ><br>
> ><br>
> > # qemu-img snapshot -l<br>
> ><br>
> /mnt/2a270ef3-f389-37a4-942f-380bed9f70aa/e4d6e885-1382-40bc-890b-ad9c8b51a7a<br>
> 5<br>
> ><br>
> > # qemu-img snapshot -l<br>
> ><br>
> /mnt/2a270ef3-f389-37a4-942f-380bed9f70aa/7033e4c6-5f59-4325-b7e0-ae191e12e86<br>
> c<br>
> ><br>
> > Snapshot list:<br>
> ><br>
> > ID        TAG                 VM SIZE                DATE       VM CLOCK<br>
> ><br>
> > 1         1436792720                0 2015-07-13 06:05:20   00:01:10.938<br>
> ><br>
><br>
<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>