Yes, in two layers. The image file has its own header: a VHD records the second it was created, a creator code and a unique ID, and an overlay disk stores the full path to its parent, user folder included. Then there's the file system inside, with a volume name, serial number, dates, owner IDs and, in our tests, every byte of a file we had deleted.
We built images on Debian 12 with qemu-img 7.2.22, mkfs.fat 4.2, mtools 4.0.32 and e2fsprogs 1.47.0, then parsed the bytes. For other tools we read 7 sample images from the QEMU project's test suite, meant to come from each format's native tool, per its README. ISO images are in our gzip, bzip2 and ISO guide.
| Format | Creator | Date | Unique ID | Paths and names |
|---|---|---|---|---|
| VHD | Code, version, host OS | Creation second, UTC | Yes, random | Parent name and path in differencing disks (spec, not tested) |
| VHDX | Program name and version | None found | Three | Parent paths in differencing disks (spec, not tested) |
| VMDK | Two version numbers | None found | 8-digit content ID | Its first file name. Parent path in an overlay |
| QCOW2 | None found | Only on snapshots | None | Parent path in an overlay. Snapshot names |
| VDI | Program name as text | None found | Two | None in ours |
| Raw .img | No header | None | None | Only what the file system holds |
| DMG (one sample) | None in the trailer | None in the trailer | All zeros | Partition names in the maker's language |
QCOW2 was the quiet one: two conversions of the same disk came out byte for byte identical. Two VHDs made a second apart differed in timestamp and ID.
A VHD ends with a 512-byte footer. Microsoft's spec gives it a creation time in seconds since January 1, 2000 UTC, a creator code, a version, a host OS code and an ID.
| Image | Creator code | Version | Created (UTC) |
|---|---|---|---|
| Ours, qemu-img on Linux | qemu | 5.3 | The second we ran it |
| Virtual PC sample | vpc | 1.0 | 2016-02-17 09:28:36 |
| Hyper-V 2012 R2 sample | win | 6.3 | 2016-02-19 08:29:43 |
| Disk2vhd sample | d2v | 1.0 | 2016-02-25 16:51:27 |
All four said Wi2k, the Windows code, in the host OS field. Ours was made on Linux, so don't trust it.
VHDX says more about software. Ours began with "QEMU v7.2.22". A Hyper-V sample said "Microsoft Windows 6.2.9200.16384", a full build number, and a Disk2vhd sample said "d2v". We found no date in the VHDX structures we parsed, but 3 random IDs.
Yes. An overlay (differencing) disk holds changes and points at a parent image. We made QCOW2 and VMDK overlays over a parent in a test account's folder. Each stored the path as typed, in plain text, ending home/jsmith/VMs/win11-base.qcow2.
qemu-img refused to create a differencing VHD or VHDX, so this part is read, not measured. Microsoft's VHD spec stores the parent's file name plus locators, with c:\directory\parent.vhd as its absolute-path example. The VHDX spec lists relative_path, volume_path and absolute_win32_path entries.
Names travel too. We copied c.vmdk to renamed-holiday.vmdk and the text inside still said c.vmdk. A QCOW2 snapshot named before-tax-upload was stored with that name and the second we took it.
We formatted two 16 MB raw images and copied files in.
| Field | FAT image (mkfs.fat) | ext4 image (mke2fs) |
|---|---|---|
| Formatting program | "mkfs.fat" in the boot sector | OS type: Linux |
| Volume name | NO NAME unless you set one | Blank unless you set one |
| Serial or UUID | 8 hex digits, new on each image | Random UUID, plus a second as a hash seed |
| Format time | On the label entry, local clock | Created, written and checked times |
| File dates | Local clock time, no zone | UTC seconds, plus created and last-read times |
| Owner | None | User 1000, group 1000 on every file |
FAT dates follow the maker's clock, which can expose a time zone. Our FAT label entry read 11 hours ahead of the UTC second in the VHD footer around it, and our machine runs at UTC+11.
In every test. We copied a 3,400-byte file, one marker line repeated 100 times, into the FAT and ext4 images, then deleted it with mdel and debugfs's rm. A byte search still found all 100 lines in each image.
The FAT directory entry survived too, minus its first letter, with size and date intact. The ext4 record kept the size and gained a deletion time.
Converting cleaned nothing. We turned the FAT image into VHD, VHDX, VMDK, QCOW2 and VDI, and found 100 lines in each. A compressed QCOW2 hid them from a plain search, but all 100 came back on converting to raw.
We couldn't build one: that takes a Mac. So nothing here was created on our machine. It rests on one published sample from 2019, which we parsed, and Apple's documentation.
The 512-byte "koly" trailer was nearly empty: no date, no program name, and an ID of all zeros. The XML list after the data named its 8 sections with full-width brackets, the kind used in Chinese and Japanese text, which hints at the maker's language.
The HFS+ volume inside said more. Apple's Technical Note TN1150 says the volume creation date is stored in local time and other dates in GMT. The sample's read 15:45:38 and 07:45:38, exactly 28,800 seconds apart, so the Mac's clock was at UTC+8. The one file inside carried owner 501, group 20 and a last-opened time.
Start a new image; don't tidy an old one.
| What we did | What we saw after |
|---|---|
| Made a fresh image and copied in only the files to share | 0 copies of the deleted file |
mkfs.fat -i 00000000 -n SHARE | Serial 0000-0000, label SHARE |
qemu-img convert on an overlay | Parent path gone. The parent's data, deleted file included, merged in |
qemu-img snapshot -d | Snapshot name no longer in the file |
mke2fs -U and -E root_owner=0:0 | UUID fixed, top folder owned by 0. Files still said user 1000 |
An image doesn't change the files in it. A photo with GPS tags went into a FAT image, through all 5 container formats and back out with the same SHA-256. So clean files before you copy them in. Our Image Metadata Remover takes JPEG and PNG, the Document Metadata Remover takes Word, Excel, PowerPoint and PDF, the PDF Metadata Editor edits PDF fields and the EXIF Viewer shows what a photo holds. None of them open a disk image. Archives have their own fields: see our ZIP guide and 7z, RAR and tar guide.
Windows Disk Management, Hyper-V and Disk2vhd beyond those old samples, VirtualBox, VMware's own apps, macOS Disk Utility and hdiutil, APFS, NTFS, exFAT, encrypted images, and tools that wipe free space inside an existing image. Other programs may fill these fields differently.
Yes. The 512-byte footer holds a creation time in UTC seconds, next to a creator code, a version and a random ID.
It can if it is an overlay or differencing disk. Our QCOW2 and VMDK overlays stored the full path to the parent image, user folder included.
In our tests, yes. A 3,400-byte file deleted from FAT and ext4 images was still there in full, and it survived conversion to five other formats.
The one sample we read had no name, date or ID in its trailer. The HFS+ volume inside held user ID 501, a last-opened time and dates that gave away a UTC+8 clock.
It swaps the outer header and leaves the inside alone. Converting an overlay dropped the parent path, but deleted data carried over.