[libvirt-users] After a 'virsh blockpull', 'virsh snapshot-list --tree' o/p does not reflect reality

Eric Blake eblake at redhat.com
Thu Sep 13 15:26:40 UTC 2012


On 09/13/2012 02:59 AM, Kashyap Chamarthy wrote:
> Hi (Eric?),
> 
> A couple of questions while using the 'virsh blockpull'
> 
> 
> 
> Summary:
> 
> 1] Created snapshots this way: base<-snap1<-snap2<-snap3  (online, external snapshot
> --disk-only)
> 2] I did a 'virsh blockpull' from snap2 into snap3
> 3] Next, did another 'virsh blockpull' from snap1 into snap3

You could have also done a 'virsh blockpull' from snap1 into snap3
without the intermediate pull of snap2, but shouldn't make a difference
to your end question.

> 	- Here, 'qemu-img info /path/to/snap3' shows its backing file correctly as snap1. But not
> 'virsh snapshot-list $domain --tree' . Any hints?

virsh snapshot-list is still accurately listing the state of the tree at
the time of the snapshot, not what you have done after the snapshot.  If
you were to revert to snap1 or snap2 (assuming that I ever get
revert-to-disk-snapshots working), you would still be able to do that,
provided you haven't deleted snap1 or snap2 from your file system.  That
is, it is feasible to go from:

base<-snap123        (snap1 and snap2 were pulled into snap3)

and then revert back to:

base<-snap1   (undo the changes that were in snap2 and snap3)

Libvirt does not modify any snapshot information when doing a blockpull
operation, and I'm not yet convinced that it even needs to.  (I'm
dreading if it does, because having a blockpull update the snapshot tree
seems rather complicated.)

> 
> Here, shouldn't 'virsh snapshot-list' --tree be updated as well ?(since 'snap2' is no more
> the backing file for 'snap3' ?)

The snapshot chain is independent of each disk's backing chain.  The
snapshot chain is still correct, because you haven't used 'virsh
snapshot-delete' to shorten the snapshot chain (then again, I still
haven't implemented that for disk snapshots...)

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120913/28c2906e/attachment.sig>


More information about the libvirt-users mailing list