qcow2, raw, and allocation behavior
Disk format affects allocation, snapshot support, portability, and failure behavior. The filesystem, storage backend, and caching mode matter as much as the filename suffix. Inspect image truth qcow2 supports sparse allo
Disk format affects allocation, snapshot support, portability, and failure behavior. The filesystem, storage backend, and caching mode matter as much as the filename suffix.
Inspect image truth
qemu-img info --backing-chain /var/lib/libvirt/images/guest01.qcow2
du -h /var/lib/libvirt/images/guest01.qcow2
du -h --apparent-size /var/lib/libvirt/images/guest01.qcow2qcow2 supports sparse allocation and internal features such as snapshots and compression. raw is structurally simple and can perform well, especially on storage that already supplies snapshots and thin provisioning.
Create explicitly
qemu-img create -f qcow2 -o preallocation=metadata /var/lib/libvirt/images/guest01.qcow2 80G
qemu-img check /var/lib/libvirt/images/guest01.qcow2Never run modifying qemu-img operations against an image actively owned by QEMU unless the operation is specifically documented as safe through the running block layer.