QCOW2 metadata recovery

QCOW2 metadata corruption can disconnect guest data clusters without erasing every allocated block.

QCOW2 maps guest offsets through L1 and L2 tables, reference counts, snapshots, and optional backing files. Host crashes, full storage, unsafe writes, or damaged sectors can make those structures inconsistent.

Understand the symptom

Allocation tables locate data; refcounts track which clusters remain in use.

WHY

What is happening

QEMU documents that qemu-img check can report corruption and leaked clusters, while repair modes write metadata and may choose the wrong fix or hide existing damage. Backing and external data files must remain paired with the image.

What you may see

Symptoms that change the recovery path.

01

Refcount mismatch

Cluster ownership metadata disagrees with allocation references.

02

L1 or L2 table error

Guest offsets cannot be mapped reliably to host clusters.

03

Image has leaked clusters

Allocated clusters are not reachable through current metadata.

04

Guest file system shows new corruption

Virtual metadata damage may be presenting wrong or missing blocks.

Protect the source

Actions that can make the situation worse.

01

qemu-img -r all changes evidence

Repair may make one interpretation permanent.

02

Flattening can omit unreachable data

Conversion copies only what the current mapping exposes.

03

Missing backing files return stale or zero data

The overlay alone may not contain unchanged guest sectors.

Do this now

Safe steps before evaluation.

01

Stop the VM and snapshot jobs

Prevent guest, backup, and hypervisor writes.

02

Copy the complete chain

Keep overlays, bases, external data files, XML/configuration, and logs.

03

Record qemu-img info and check output

Capture topology and reported errors without repair flags.

04

Prioritize guest workloads

List virtual disks, partitions, databases, and paths required first.

NEPFOSYS process

How a data-first evaluation proceeds.

01

QCOW2 structure review

NEPFOSYS maps headers, tables, refcounts, snapshots, backing references, and readable clusters.

02

Alternative read-only assemblies

Candidate mappings are tested from copies without altering originals.

03

Guest-level validation

File systems, databases, known files, timestamps, and application consistency determine the safest result.

A clear next step

Preserve the original device before another repair or recovery attempt.

Start a case with the exact symptoms, incident timeline, prior attempts, encryption details, and the files that matter most. NEPFOSYS will route the case to the appropriate DFW intake or nationwide mail-in path.

Start with a case review

Questions, answered

What customers ask before starting.

Does a leaked cluster mean lost data?

Not always. It means allocation exists without a current reference; its contents may still warrant analysis.

Is qemu-img check safe?

A check without repair flags is diagnostic. Repair flags write metadata and require protected copies.

Can conversion repair the image?

Conversion may produce a usable copy, but it can omit data not reachable through damaged metadata.

DFW local · Nationwide mail-in

Protect the device. Start with the facts.

Start my recovery case