qemu-img create with preallocation=full and compression_type=zlib

Richard Taubo
2021-11-30T13:51:22Z

Hi!

When running this command on Fedora 35 I get:
[#] qemu-img create -o preallocation=full -f qcow2 /var/vm_mail/mytest.qcow2
10GB
=> Formatting '/var/vm_mail//mytest.qcow2', fmt=qcow2 . . .
preallocation=full compression_type=zlib . . . ."

Question:
When using 'preallocation=full? I was surprised that the resulting qcow2
image includes the 'compression_type=zlib? part.
Why/when is this compression used when the qcow2 image is fully preallocated?

Thanks for input on this! :-)

Best regards
Richard Taubo