Skip to navigationSkip to content
libvirtd docs
InteractiveCommands

Manual nav

Search `/` · tty `~` · g top · G bottom

Portal

  • Manual index
  • Interactive lab
  • Command explorer
Foundations5 sections
  • libvirtd Overview1
  • Host & Installation2
  • Architecture & Concepts6
  • Domains2
  • Domain XML2
Subsystems6 sections
  • Daemons3
  • virsh3
  • Virtual Networking5
  • Virtual Storage4
  • Virtualization Security3
  • Remote libvirt1
Operations5 sections
  • Migration2
  • Snapshots & Backup2
  • Performance3
  • Troubleshooting2
  • Reference2
manstorageReviewed July 15, 2026

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

qcow2rawsparseqemu-img

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

BASH
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.qcow2

qcow2 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

BASH
qemu-img create -f qcow2 -o preallocation=metadata /var/lib/libvirt/images/guest01.qcow2 80G
qemu-img check /var/lib/libvirt/images/guest01.qcow2

Never 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.

Related

  • Attach and detach guest disks safely
  • Storage pools and backends
  • External snapshots and block jobs

On this page

  • Inspect image truth
  • Create explicitly