Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:VDI (VirtualBox disk image)

From ReverseEngineering.wiki
Format
On this wiki Facts · Code · Notes · Topics

VirtualBox's native disk format: a 512-byte little-endian header with a human-readable text banner, signature 0xBEDA107F, version 0x00010001, image type 1 dynamic or 2 fixed, then a block map of 32-bit entries and data blocks (1 MiB default).

Header (512 bytes, little endian; qemu block/vdi.c VdiHeader)

Offset Size Field
0 0x40 text banner
0x40 4 signature 0xBEDA107F (bytes 7F 10 DA BE)
0x44 4 version (0x00010001 = 1.1; QEMU rejects others)
0x48 4 header_size
0x4C 4 image_type: 1 dynamic, 2 static (fixed)
0x50 4 image_flags
0x54 256 description
0x154 4 offset_bmap
0x158 4 offset_data
0x15C 12 CHS geometry (cylinders, heads, sectors)
0x168 4 sector_size (512)
0x16C 4 unused
0x170 8 disk_size (bytes)
0x178 4 block_size (default 1048576)
0x17C 4 block_extra
0x180 4 blocks_in_image
0x184 4 blocks_allocated
0x188 4 x 16 UUIDs: image, last snapshot, link, parent
0x1C8 56 unused

Offsets above are computed from the struct order read in qemu; the sizes sum to 512.

Innotek and Sun era images carry banners such as <<< innotek VirtualBox Disk Image >>>\n, <<< Sun xVM VirtualBox Disk Image >>>\n and <<< Sun VirtualBox Disk Image >>>\n (qemu comment); QEMU writes <<< QEMU VM Virtual Disk Image >>>\n. Unverified: the later <<< Oracle VM VirtualBox Disk Image >>> banner; it was not seen in the sources read, so identify by the signature, not the text.

Block map

At offset_bmap, blocks_in_image little-endian u32 entries giving the block index in the data area: 0xFFFFFFFF VDI_UNALLOCATED, 0xFFFFFFFE VDI_DISCARDED (reads as zero); values below 0xFFFFFFFE are allocated. Data byte offset of block n = offset_data + index x block_size. Unverified: a static image has the map pre-filled sequentially.

Code & repositories

  • qemu block/vdi.c (GPL-2.0).
  • https://github.com/qemu/qemu @ a19f59a72d96056d9a8f48cf6c77f5787491e414 · license: GPL-2.0-only (declared by the contributor; GitHub's detector did not recognize COPYING)
    block/qcow2.h, vpc.c, vhdx.h/.c, vmdk.c, vdi.c: on-disk structures of the virtual disk formats (COPYING is GPL-2.0; individual files carry GPL/MIT headers)
    Tested on: source read, not run: source read only · checked 2026-10-19; last activity 2026-10-17