# Testing Bigger Merge
inaddy@(kvm02):~$ sudo qemu-img info --backing-chain /var/lib/libvirt/images/guest.1487880011 image: /var/lib/libvirt/images/guest.1487880011 file format: qcow2 virtual size: 30G (32212254720 bytes) disk size: 196K cluster_size: 65536 backing file: /var/lib/libvirt/images/guest.1487879972 backing file format: qcow2 Format specific information: compat: 1.1 lazy refcounts: false
image: /var/lib/libvirt/images/guest.1487879972 file format: qcow2 virtual size: 30G (32212254720 bytes) disk size: 466M cluster_size: 65536 backing file: /var/lib/libvirt/images/guest.1487879587 backing file format: qcow2 Format specific information: compat: 1.1 lazy refcounts: false
image: /var/lib/libvirt/images/guest.1487879587 file format: qcow2 virtual size: 30G (32212254720 bytes) disk size: 3.6M cluster_size: 65536 backing file: /var/lib/libvirt/images/guest.1487877813 backing file format: qcow2 Format specific information: compat: 1.1 lazy refcounts: false
image: /var/lib/libvirt/images/guest.1487877813 file format: qcow2 virtual size: 30G (32212254720 bytes) disk size: 2.9M cluster_size: 65536 backing file: /var/lib/libvirt/images/guest.qcow2 backing file format: qcow2 Format specific information: compat: 1.1 lazy refcounts: false
image: /var/lib/libvirt/images/guest.qcow2 file format: qcow2 virtual size: 30G (32212254720 bytes) disk size: 5.0G cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false
# Writing to guest
inaddy@(guest):~$ dd if=/dev/zero of=./teste bs=1M count=1024 ^C465+0 records in 465+0 records out 487587840 bytes (488 MB) copied, 8.74541 s, 55.8 MB/s
# Testing a bigger merge (several snapshots at once)
inaddy@(kvm02):~$ virsh blockcommit --domain=guest --path=/var/lib/libvirt/images/guest.1487880011 --base /var/lib/libvirt/images/guest.qcow2 --top /var/lib/libvirt/images/guest.1487879972 --wait --verbose Block Commit: [100 %] Commit complete
# There are only 2 snapshots at the end:
inaddy@(kvm02):~$ sudo qemu-img info --backing-chain /var/lib/libvirt/images/guest.1487880011 image: /var/lib/libvirt/images/guest.1487880011 file format: qcow2 virtual size: 30G (32212254720 bytes) disk size: 1.1M cluster_size: 65536 backing file: /var/lib/libvirt/images/guest.qcow2 backing file format: qcow2 Format specific information: compat: 1.1 lazy refcounts: false
image: /var/lib/libvirt/images/guest.qcow2 file format: qcow2 virtual size: 30G (32212254720 bytes) disk size: 5.4G cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false
# Testing Bigger Merge
inaddy@(kvm02):~$ sudo qemu-img info --backing-chain /var/lib/ libvirt/ images/ guest.148788001 1 libvirt/ images/ guest.148788001 1 libvirt/ images/ guest.148787997 2
image: /var/lib/
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 196K
cluster_size: 65536
backing file: /var/lib/
backing file format: qcow2
Format specific information:
compat: 1.1
lazy refcounts: false
image: /var/lib/ libvirt/ images/ guest.148787997 2 libvirt/ images/ guest.148787958 7
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 466M
cluster_size: 65536
backing file: /var/lib/
backing file format: qcow2
Format specific information:
compat: 1.1
lazy refcounts: false
image: /var/lib/ libvirt/ images/ guest.148787958 7 libvirt/ images/ guest.148787781 3
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 3.6M
cluster_size: 65536
backing file: /var/lib/
backing file format: qcow2
Format specific information:
compat: 1.1
lazy refcounts: false
image: /var/lib/ libvirt/ images/ guest.148787781 3 libvirt/ images/ guest.qcow2
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 2.9M
cluster_size: 65536
backing file: /var/lib/
backing file format: qcow2
Format specific information:
compat: 1.1
lazy refcounts: false
image: /var/lib/ libvirt/ images/ guest.qcow2
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 5.0G
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
# Writing to guest
inaddy@(guest):~$ dd if=/dev/zero of=./teste bs=1M count=1024
^C465+0 records in
465+0 records out
487587840 bytes (488 MB) copied, 8.74541 s, 55.8 MB/s
# Testing a bigger merge (several snapshots at once)
inaddy@(kvm02):~$ virsh blockcommit --domain=guest --path= /var/lib/ libvirt/ images/ guest.148788001 1 --base /var/lib/ libvirt/ images/ guest.qcow2 --top /var/lib/ libvirt/ images/ guest.148787997 2 --wait --verbose
Block Commit: [100 %]
Commit complete
# There are only 2 snapshots at the end:
inaddy@(kvm02):~$ sudo qemu-img info --backing-chain /var/lib/ libvirt/ images/ guest.148788001 1 libvirt/ images/ guest.148788001 1 libvirt/ images/ guest.qcow2
image: /var/lib/
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 1.1M
cluster_size: 65536
backing file: /var/lib/
backing file format: qcow2
Format specific information:
compat: 1.1
lazy refcounts: false
image: /var/lib/ libvirt/ images/ guest.qcow2
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 5.4G
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false