QCOW2
Cheat sheet · https://pcornel.dk/topic.php?topic=3513
Answer
QCOW2 is a QEMU Copy-On-Write virtual disk image format that supports sparse allocation and metadata-driven features such as backing files and snapshots, depending on tooling and usage.
Remember
- QCOW2 logical size can be much larger than its current physical file allocation.
- A QCOW2 backing file chain is a dependency chain; missing or mismatched parents can break access.
- Internal/external snapshot semantics are separate from ordinary filesystem backups.
- QCOW2 feature overhead and performance depend on workload, cache mode, host filesystem and backend.
First checks
qemu-img info <disk.qcow2>— format, snapshots, backingqemu-img check -r leaks <disk.qcow2>— repair leaks (offline)qemu-img snapshot -l <disk.qcow2>— internal snapshots
Verify in this order
qcow2 file → QEMU block layer → guest
Where it usually breaks
First mismatch in guest block/filesystem view → virtual controller/disk → hypervisor mapping → datastore/path → storage backend → durability/read-back; preserve identity/native error/pre-state before mutation.
Virtual Storage → QCOW2 reference map
| Boundary | Meaning | Evidence limit |
|---|---|---|
| Virtual size | guest capacity | Logical |
| Allocation | sparse clusters | Physical use |
| Backing file | optional parent | Dependency |
| Metadata | mapping/features | Image integrity |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3513