From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "magic" |
|---|
| subject | "Format:VHD (Virtual Hard Disk)" |
|---|
| claim | "A VHD footer is 512 bytes starting with the ASCII cookie conectix. Dynamic and differencing VHDs have a copy of the footer at file offset 0 (QEMU reads offset 0 first); a fixed VHD has the footer only in the last 512 bytes of the file, so no conectix at offset 0. A dynamic or differencing VHD carries a 1024-byte header with cookie cxsparse (header version 0x00010000, default block size 2 MiB); disk type is the big-endian u32 2 fixed, 3 dynamic, 4 differencing." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:VHD (Virtual Hard Disk)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | bytes | "63 6F 6E 65 63 74 69 78" |
|---|
| offset | 0 |
|---|
| meaning | "conectix footer cookie; at file offset 0 only for dynamic/differencing VHDs (a copy), always in the last 512 bytes (offset -512 from the end); a fixed VHD has it only there. cxsparse = 63 78 73 70 61 72 73 65 in the dynamic header" |
|---|
| alternatives | | "63 78 73 70 61 72 73 65" |
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "enum vhd_type 2/3/4; vhd_dyndisk_header magic cxsparse and check; creation writes version 0x00010000" |
|---|
| repo | "qemu/qemu" |
|---|
| commit | "a19f59a72d96056d9a8f48cf6c77f5787491e414" |
|---|
| path | "block/vpc.c" |
|---|
| lines | "45-49, 103, 362, 870-879" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "conectix and cxsparse" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T06:03:50.158Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T12:42:13.487Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read QEMU vpc.c at a19f59a: vhd_type 2/3/4 (45-49), dyndisk header magic[8] 'cxsparse' checked with strncmp (103, 362), footer cookie read at offset 0 first and, if absent, the last sizeof(footer) bytes and then only accepted for VHD_FIXED (285-322), default block_size 0x200000 and version 0x00010000 on creation (841, 878). That every VHD also has a footer copy at the end is the spec, not shown by these lines." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T08:26:46.590Z" |
|---|
| summary | "vpc.c 289-322: QEMU reads a footer at offset 0 first, and only if the cookie is absent reads the last 512 bytes ('If a fixed disk, the footer is found only at the end of the file'). So a fixed VHD…" |
|---|
| changed | |
|---|
|
|
|---|