Comment 5 for bug 1681839

Revision history for this message
Christian Ehrhardt  (paelzer) wrote : Re: libvirt - disk not ready for pivot yet

You reported your issue on commit rather than copy as in the RH bug.
So looking into that more specific.

$ virsh snapshot-create-as --domain testguest snap1 --diskspec vda,file=/var/lib/uvtool/libvirt/images/vda-snap1.qcow2 --disk-only --atomic --no-metadata
# touch a file in guest
$ virsh snapshot-create-as --domain testguest snap2 --diskspec vda,file=/var/lib/uvtool/libvirt/images/vda-snap2.qcow2 --disk-only --atomic --no-metadata
# touch a file in guest

This gave me a two stage snapshot list
$ sudo qemu-img info --backing-chain /var/lib/uvtool/libvirt/images/vda-snap2.qcow2
image: /var/lib/uvtool/libvirt/images/vda-snap2.qcow2
[...]
backing file: /var/lib/uvtool/libvirt/images/vda-snap1.qcow2
[...]
image: /var/lib/uvtool/libvirt/images/vda-snap1.qcow2
[...]
backing file: /var/lib/uvtool/libvirt/images/testguest-clone5.qcow
backing file format: qcow2
[...]
image: /var/lib/uvtool/libvirt/images/testguest-clone5.qcow

Committing those onto the base worked as well:

virsh blockcommit testguest vda --active --verbose --pivot
Block commit: [100 %]
Successfully pivoted

In "virsh domblklist testguest" this moved me back from:
vda /var/lib/uvtool/libvirt/images/vda-snap1.qcow2
to
vda /var/lib/uvtool/libvirt/images/testguest-clone5.qcow