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
- Here, 'qemu-img info /path/to/snap3' shows its backing file correctly as snap1.
But not
'virsh snapshot-list $domain --tree' . Any hints?
Detail:
#=========================================#
[root@moon ~]# virsh domblklist daisy --details
Type Device Target Source
------------------------------------------------
file disk vda /export/vmimgs/daisy.qcow2
[root@moon ~]#
#=========================================#
[root@moon ~]# virsh snapshot-create-as daisy snap1-daisy "snap1 description"
--diskspec
vda,file=/export/vmimgs/snap1-daisy.qcow2 --disk-only --atomic
Domain snapshot snap1-daisy created
[root@moon ~]#
#=========================================#
[root@moon ~]# virsh snapshot-create-as daisy snap2-daisy "snap2 description"
--diskspec
vda,file=/export/vmimgs/snap2-daisy.qcow2 --disk-only --atomic
Domain snapshot snap2-daisy created
[root@moon ~]#
#=========================================#
[root@moon ~]# virsh snapshot-create-as daisy snap3-daisy "snap3 description"
--diskspec
vda,file=/export/vmimgs/snap3-daisy.qcow2 --disk-only --atomic
Domain snapshot snap3-daisy created
#=========================================#
[root@moon libvirt-0.10.1-3]# virsh snapshot-list daisy
Name Creation Time State
------------------------------------------------------------
clean-rawhide-f17 2011-12-08 14:34:55 +0530 shutoff
snap1-daisy 2012-09-12 14:58:18 +0530 disk-snapshot
snap2-daisy 2012-09-12 14:59:30 +0530 disk-snapshot
snap3-daisy 2012-09-12 15:00:36 +0530 disk-snapshot
#=========================================#
[root@moon libvirt-0.10.1-3]# virsh snapshot-list daisy --tree
clean-rawhide-f17
snap1-daisy
|
+- snap2-daisy
|
+- snap3-daisy
[root@moon libvirt-0.10.1-3]#
#=========================================#
=> For clarity, listing out the backing files of each image.
#=========================================#
[root@moon libvirt-0.10.1-3]# qemu-img info /export/vmimgs/snap3-daisy.qcow2
image: /export/vmimgs/snap3-daisy.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 129M
cluster_size: 65536
backing file: /export/vmimgs/snap2-daisy.qcow2
#=========================================#
[root@moon libvirt-0.10.1-3]# qemu-img info /export/vmimgs/snap2-daisy.qcow2
image: /export/vmimgs/snap2-daisy.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 3.6M
cluster_size: 65536
backing file: /export/vmimgs/snap1-daisy.qcow2
#=========================================#
[root@moon libvirt-0.10.1-3]# qemu-img info /export/vmimgs/snap1-daisy.qcow2
image: /export/vmimgs/snap1-daisy.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 2.5M
cluster_size: 65536
backing file: /export/vmimgs/daisy.qcow2
[root@moon libvirt-0.10.1-3]#
#=========================================#
=> NOTE: we're pulling snap2 data into snap3, by doing a 'virsh blockpull'
<=
#=========================================#
[root@moon libvirt-0.10.1-3]# virsh blockpull --domain daisy --path
/export/vmimgs/snap3-daisy.qcow2 --base /export/vmimgs/snap2-daisy.qcow2 --wait --verbose
Block Pull: [100 %]
Pull complete
[root@moon libvirt-0.10.1-3]#
#=========================================#
[root@moon libvirt-0.10.1-3]# qemu-img info /export/vmimgs/snap3-daisy.qcow2
image: /export/vmimgs/snap3-daisy.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 143M
cluster_size: 65536
backing file: /export/vmimgs/snap2-daisy.qcow2
[root@moon libvirt-0.10.1-3]#
#=========================================#
[root@moon libvirt-0.10.1-3]# virsh snapshot-list daisy --tree
clean-rawhide-f17
snap1-daisy
|
+- snap2-daisy
|
+- snap3-daisy
[root@moon libvirt-0.10.1-3]#
#=========================================#
=> Now, let's pull the data from 'snap1' into 'snap3' (so that we
can make 'snap2'
redundant, and reduce the snapshot chain.
#=========================================#
[root@moon libvirt-0.10.1-3]# virsh blockpull --domain daisy --path
/export/vmimgs/snap3-daisy.qcow2 --base /export/vmimgs/snap1-daisy.qcow2 --wait --verbose
Block Pull: [100 %]
Pull complete
#=========================================#
NOTE: now the snapshot-tree should flattened (as we pulled the data from snap1 into
snap3).
Let's check by running 'qemu-img' . (so the backing-file is now pointing to
snap1, as
expected)
#=========================================#
[root@moon libvirt-0.10.1-3]# qemu-img info /export/vmimgs/snap3-daisy.qcow2
image: /export/vmimgs/snap3-daisy.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 145M
cluster_size: 65536
backing file: /export/vmimgs/snap1-daisy.qcow2
[root@moon libvirt-0.10.1-3]#
#=========================================#
Here, shouldn't 'virsh snapshot-list' --tree be updated as well ?(since
'snap2' is no more
the backing file for 'snap3' ?)
#=========================================#
[root@moon libvirt-0.10.1-3]# virsh snapshot-list daisy --tree
clean-rawhide-f17
snap1-daisy
|
+- snap2-daisy
|
+- snap3-daisy
[root@moon libvirt-0.10.1-3]#
#=========================================#
Version Details:
#=========================================#
[root@moon ~]# rpm -q qemu-kvm libvirt; uname -r
qemu-kvm-1.2-0.2.20120806git3e430569.fc17.x86_64
libvirt-0.10.1-3.fc17.x86_64
3.5.2-3.fc17.x86_64
[root@moon ~]#
#=========================================#
Any ideas why the 'tree' isn't updated yet?
--
/kashyap