Comment 4 for bug 1681839

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

Info to repro I tried:
# create a simple system via uvtool-libvirt
$ uvt-kvm create [...]
$ virsh dumpxml <guest> > t1.xml
$ virsh undefine <guest>

# need to be transient for the blockcopy test
$ virsh create t1.xml

# Now we have a transient domain, and can copy them around:

$ virsh domblklist xenial-zfspool-libvirtTarget Source
------------------------------------------------
vda /var/lib/uvtool/libvirt/images/xenial-zfspool-libvirt.qcow
vdb /var/lib/uvtool/libvirt/images/xenial-zfspool-libvirt-ds-clone.qcow

# Since the referred bug reported that being racy I tried in a loop:
$ for idx in $(seq 1 20); do virsh blockcopy xenial-zfspool-libvirt vdb /var/lib/uvtool/libvirt/images/xenial-zfspool-libvirt-ds-clone${idx}.qcow --pivot --verbose --wait; done

It worked fine in 20/20 cases for me - I also checked on the bigger vda image but it worked as well.
That might only be due to less load, smaller file or whatever else defines the race window.