Hide Forgot
Fixing summary to clarify. Description asks libvirt to add possibility to enable sparsification of the regions of the image containing only zero blocks so that they are actually unmapped. Note that this comes with a performance penalty thus it should not be enabled by default. Also note that qemu already keeps the unmaped regions unmapped when copying, so this is useful only when the regions were not unmapped before for some reasons.
So unfortunately it looks like qemu will not provide the required interface (https://bugzilla.redhat.com/show_bug.cgi?id=1533975) which will allow to skip zero-writes when doing a block-copy operation into a raw file. Closing as CANTFIX It is possible to do a workaround with a few manual/external steps: 1) create a snapshot on top of the raw file on the local filesystem or NFS (virsh snapshot-create --no-metadata ...) 2) manually copy over the original file and sparsify it since it's no longer written to 3) manually create an empty qcow2 file with a backing file which points to the new file copied in step 2 4) use block copy operation to switch to the new file: (virsh blockcopy --reuse-external --transient-job --shallow --pivot ...) and wait for it to finish 5) use block-commit to remove the temporary snapshot and start using the copied file (virsh blockcommit --active --pivot ...)