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 columnsMetadata / 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.
| Case | Check exit | Compare exit | Overlay unchanged? | Changed guest bytes |
|---|---|---|---|---|
| intact | 0 | 0 | Yes | 0 |
| base-replaced | 0 | 1 | Yes | 131072 |
| base-missing | 1 | 2 | Yes | - |
| overlay-only-relocated | 1 | 2 | Yes | - |
| chain-relocated | 0 | 0 | Yes | 0 |
| payload-byte-flip | 0 | 1 | No | 1 |
| safe-rebase | 0 | 0 | No | 0 |
| unsafe-rebase | 0 | 1 | No | 131072 |
| base-truncated | 0 | 1 | Yes | 131072 |
| 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 devDownload 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
- Synthetic bytes and controlled file mutations, not a VM restore, power-loss test, performance benchmark or failure-rate sample.
- One Ubuntu QEMU 8.2.2 package; other versions, options and formats can differ.
- Uncompressed, unencrypted images with standard clusters and one raw base; no internal snapshots, external data files or dirty bitmaps.
- Successful guest-byte export does not establish guest filesystem, application or multi-disk consistency.
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.
- QEMU 8.2.2: qemu-img check, compare and rebase
- QEMU 8.2.2: QCOW2 image file format, cluster mapping and zero clusters
- QEMU 8.2.2: qcow2_check_refcounts implementation
- 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/