Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

QCOW2 · KVM / QEMU

Direct answer

Separate guest logical blocks from QCOW2 metadata/allocation and the host filesystem or storage backend. Backing-file chains add another dependency layer between guest writes and base data.

When to use this

Use this topic when the symptom or planned change has been narrowed to KVM / QEMU → QCOW2. Establish effective host/runtime state before changing configuration.

First 30 seconds

1. qcow2: thin, snapshots, backing files.

2. preallocation=metadata improves performance.

3. Check after host crashes.

4. Short backing chains.

5. Compress for templates.

Operational verification

qcow2 → QEMU block → guest

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

A readable QCOW2 file shows only file access, but it does not show backing files, metadata integrity, free capacity or guest filesystem health.

Platform / version applicability
kvm-qemu
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformkvm-qemu
Scope / prerequisiteUse this topic when the symptom or planned change has been narrowed to KVM / QEMU → QCOW2. Establish effective host/run…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 qcow2 features and checks Verify boundary
FeatureNote
Thin provisioningGrows with written data
SnapshotsInternal (qemu-img snapshot) or external overlays
Backing filesTemplates / linked clones
Compression / encryptionOptional (LUKS encryption)
qemu-img info --backing-chain disk.qcow2
qemu-img check disk.qcow2
qemu-img resize disk.qcow2 +20G

Documented example, not captured output. Never open a qcow2 file used by a running VM with another process.

Step 2 Verification path Verify boundary

Guest block I/O → virtual controller/VirtIO → QEMU block layer → QCOW2 metadata/backing chain → host filesystem/storage → physical media

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • QCOW2 virtual size ≠ host allocated size.
  • Guest free space ≠ host filesystem/datastore free space.
  • Image file exists ≠ metadata/backing chain healthy.
  • Internal snapshot capability ≠ independent backup.
Key checks
  • qemu-img info <disk.qcow2> — format and backing
  • qemu-img check <disk.qcow2> — consistency
  • qemu-img convert -O qcow2 -o preallocation=metadata src dst — optimise
ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

A readable QCOW2 file shows only file access, but it does not show backing files, metadata integrity, free capacity or guest filesystem health.

In depth

qcow2 on KVM hosts: create, inspect, snapshot and convert.

qemu-img create -f qcow2 -b base.qcow2 -F qcow2 web01.qcow2      # overlay on a base image
qemu-img info --backing-chain web01.qcow2
qemu-img snapshot -l web01.qcow2
qemu-img commit web01.qcow2                                       # merge overlay into base
qemu-img convert -O qcow2 -c web01.qcow2 web01-compact.qcow2
virt-sparsify --in-place web01.qcow2                              # reclaim zeroed space (VM off)

Never run qemu-img write operations on an image used by a running VM; use virsh blockcommit/blockpull for live operations.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor dockvm-qemu current

Authoritative/upstream documentation reviewed for bounded claims in KVM / QEMU → QCOW2. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.qemu.org/docs/master/ · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
qcow2 imageqemu qcow2copy on write imageqcow2 backing file
Embedded reference data

Quick lookup tables

KVM / QEMU → QCOW2 reference map

Fast operational boundaries and evidence limits for KVM / QEMU → QCOW2.

BoundaryWhat to verifyEvidence limit
Definition/configExpected KVM / QEMU → QCOW2 definition or configuration is presentConfigured state does not prove runtime behavior
RuntimeRelevant KVM/QEMU/libvirt object or process is active without matching errorsRuntime state does not prove dependencies or guest outcome
DependencyHost CPU/memory, storage, network or device backend required by this path is healthyLocal success does not prove the next boundary
AcceptanceOriginal guest/application test succeeds after the change or observationRequired for end-to-end closure
Confirmation

Confirm action

Continue?