Skip to download

Measured tool behavior / synthetic byte patterns

QCOW2 dependency and verification observations

Ten controlled cases separate overlay identity, backing dependencies, image consistency and guest-byte comparison.

Download CSV30 runs / 9 columns

Metadata / Raw commands and hashes / Python harness / Analysis and interpretation

Method

Nine offline QCOW2 scenarios use four 65536-byte clusters and a known full-byte oracle. A tenth raw-image control compares unequal virtual sizes with a zero tail. 3 repetitions on one host; explicit formats, closed writers, no live VM. Every successful raw export is checked byte for byte against a separately constructed expectation. Outcomes matched across all three repetitions. These repeats are not a sample of operational failures.

First repetition. A dash means unavailable or not applicable, not a passing check. In the final raw-size control, default compare returns 0 while strict compare returns 1.
CaseCheck exitCompare exitOverlay unchanged?Changed guest bytes
intact00Yes0
base-replaced01Yes131072
base-missing12Yes-
overlay-only-relocated12Yes-
chain-relocated00Yes0
payload-byte-flip01No1
safe-rebase00No0
unsafe-rebase01No131072
base-truncated01Yes131072
zero-tail-size-0--

How to interpret the result

Base replacement changed 131,072 guest-visible bytes while the overlay hash and consistency check still passed. The explicit-zero cluster stayed zero. Shortening the base to 128 KiB also passed check, but the inherited tail became zeros: an existing short base is different from an absent base. A separate one-byte payload change also passed check. Missing dependencies instead prevented opening; the dataset does not describe those cases as silent corruption.

For these commands, check exit 1 is an opening failure. Compare exit 1 means a completed difference result, while compare exit 2 is an opening failure. Do not merge these into a single generic failure label. Raw JSON retains standard output, standard error, tool versions and executable hashes.

Reproduce

Measured package: qemu-img version 8.2.2 (Debian 1:8.2.2+ds-0ubuntu1.18); Python 3.12.3; Linux 6.8.0-146-generic. The tools were extracted from the Ubuntu package without installing a service or running a VM. Use the named package for closest reproduction; the harness records other supplied executable versions rather than claiming they are equivalent.

python3 qcow2-dependencies.py --repetitions 3 > observations.json
python3 build-qcow2.py --input observations.json \
  --harness qcow2-dependencies.py --site replay --surface dev

Download the harness and generator. Both use the Python standard library; the experiment additionally needs qemu-img and qemu-io. Optional executable-path arguments and --temp-dir are supported. Only private temporary fixtures are manipulated. Each subprocess has a timeout. Generated CSV represents null values as empty cells; JSON preserves null and boolean types.

The generator rejects missing or duplicated scenarios, changed harness identity, unexpected exit codes, summary/command-receipt disagreement and incorrect payload hashes. It preserves the observation timestamp rather than substituting build time. The raw file and metadata carry SHA-256 provenance for the actual downloaded serialization. These checks detect inconsistencies; they are not authentication of an untrusted log. Upstream source review was pinned to QEMU v8.2.2; the tested binary additionally includes Ubuntu packaging patches.

Limits

Column definitions

repetition
Repeat number on one host, not an independent reliability trial.
case
Controlled fixture manipulation.
checkExit
qemu-img check status: 0 completed consistently; 1 could not open the missing dependency. Null for raw size control.
compareExit
qemu-img compare: 0 equal under default rules; 1 differs; 2 opening error.
exportExit
Full raw export: 0 success; 1 opening failure; null for size control.
topHashUnchanged
Overlay SHA-256 equals its own pre-manipulation hash; null for size control.
guestMatchesBaseline
Every exported byte equals the independent baseline; null when unreadable or not applicable.
changedGuestBytes
Differing byte positions against the equal-length baseline; null when unavailable.
strictCompareExit
Strict compare status in the zero-tail control; null elsewhere.

Sources and reuse

CC0-1.0 for original Hesela code and observations; QEMU and upstream documentation retain their own licenses.

  1. QEMU 8.2.2: qemu-img check, compare and rebase
  2. QEMU 8.2.2: QCOW2 image file format, cluster mapping and zero clusters
  3. QEMU 8.2.2: qcow2_check_refcounts implementation
  4. libvirt: disk image chains, backing formats and relocation

Related definitions: QCOW2, QCOW2 backing chain, copy-on-write and backup verification.

Published by Hesela team

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. QCOW2 dependency and verification observations. Hesela. https://hesela.dev/datasets/qcow2-dependency-observations/