Pcornel
Browse topics
Options
Recent
Favorites
Storage · Technical reference

QCOW2

Direct answer

QCOW2 is QEMU's copy-on-write disk format with thin provisioning, internal and external snapshots, backing files and optional compression. It is flexible, but slightly slower than raw.

When to use this

Use this when using QEMU's qcow2 format.

First 30 seconds

1. qcow2: thin, snapshots, backing files.

2. preallocation=metadata improves write performance.

3. cluster_size 64K default.

4. Check after crashes.

5. Avoid long backing chains.

Operational verification

qcow2 → QEMU block layer → guest

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Internal snapshots on large images slowing I/O; use external snapshots or backup tools.
  • Not preallocating metadata for performance-sensitive disks (-o preallocation=metadata).
  • Copying images while the VM runs.
  • Images not trimmed — enable discard='unmap' and TRIM in the guest.
Platform / version applicability
Hypervisor Storage
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.

PlatformHypervisor Storage
Scope / prerequisiteUse this when using QEMU's qcow2 format.
What next?2 suggested next steps
Evidence1
On this pageJump to a specific section
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
  • Thin, snapshots, backing files.
  • Slower than raw.
  • Check with qemu-img check.
Key checks
  • qemu-img info <disk.qcow2> — format/backing
  • qemu-img check <disk.qcow2> — consistency
  • qemu-img convert -O qcow2 -o preallocation=metadata src dst — preallocated metadata
ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

QCOW2 is QEMU's copy-on-write image format: thin allocation, internal and external snapshots, backing files for linked clones, compression and encryption.

qemu-img create -f qcow2 -o cluster_size=64k,preallocation=metadata vm.qcow2 100G
qemu-img info --backing-chain vm.qcow2
qemu-img check vm.qcow2
qemu-img resize vm.qcow2 +50G
qemu-img convert -O qcow2 -c old.qcow2 compact.qcow2

On CoW storage such as ZFS or Btrfs, qcow2 adds a second CoW layer — raw images or zvols are usually faster there. preallocation=metadata avoids metadata allocation overhead on first writes.

Features

FeatureCommand / option
Backing file (linked clone)qemu-img create -f qcow2 -b base.qcow2 -F qcow2 clone.qcow2
Compressionqemu-img convert -c -O qcow2 in.qcow2 out.qcow2
Encryption (LUKS)-o encrypt.format=luks
Internal snapshotsqemu-img snapshot -c snap1 disk.qcow2
Resizeqemu-img resize disk.qcow2 +20G
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Commands

qemu-img create -f qcow2 vm01.qcow2 100G
qemu-img create -f qcow2 -b base.qcow2 -F qcow2 vm02.qcow2      # backing file
qemu-img snapshot -l vm01.qcow2
qemu-img check vm01.qcow2
qemu-img convert -O qcow2 -c vm01.qcow2 vm01-compact.qcow2

Documented example, not captured output. Pre-allocating metadata (-o preallocation=metadata) improves write performance. Long backing chains slow I/O; commit or flatten them (virsh blockcommit / blockpull).

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 docHypervisor Storage current

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

Basis: https://pve.proxmox.com/pve-docs/chapter-pvesm.html · confidence 94%
Confirmation

Confirm action

Continue?