How to create a qcow2 file that is not thin provisioned?
Solution 1:
You can use the preallocation
option.
qemu-img create -o preallocation=full -f qcow2 /var/lib/libvirt/images/urb-dat0.qcow2 10G
Reference: https://linux.die.net/man/1/qemu-img
Preallocation mode (allowed values: off, metadata, full). An image with preallocated metadata is initially larger but can improve performance when the image needs to grow. Full preallocation additionally writes zeros to the whole image in order to preallocate lower layers (e.g. the file system containing the image file) as well. Note that full preallocation writes to every byte of the virtual disk, so it can take a long time for large images.
Solution 2:
An existing thin-provisioned qcow2 file can be converted to a fully allocated one like this:
qemu-img convert -p -f qcow2 -O qcow2 -S 0 original-file.qcow2 new-file.qcow2
(This is not an answer to the question but might still be of interest.)