
On 09/13/2012 08:56 PM, Eric Blake wrote:
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,
OK.
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),
Um, till 'revert' is implemented, I'd assume, the existing use-cases with 'external-disk/live' snapshots would be the ability to manage/manipulate the backing chain. Or take the guest offline and do the snapshot-manipulation with 'qemu-img'
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.)
Agreed. As is, the differentiation between 'snapshot chain' and 'backing chain' can be easily missed(like I did) if not closely observed.
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.
This is the point, I should have had more clarity about.
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...)
Noted. Thanks, for your lucid responses(as usual). Also, when you have a moment, can you please differentiate between 'blockcopy' and 'blockpull' /me is reading the 'virsh' man page for the details, but a bit more explanation about what scenarios it'd be useful will help clarify things while I'm experimenting with them.
-- /kashyap