Skip to content

Instantly share code, notes, and snippets.

@c4milo
Last active August 2, 2021 11:31
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c4milo/69fd59268474ee900e1a to your computer and use it in GitHub Desktop.
Save c4milo/69fd59268474ee900e1a to your computer and use it in GitHub Desktop.

Digesting VMDK spec

Particularly, virtual disks types are very confusing. This document is an attempt to disentangle that and make easier the design of an implementation.

Flat or preallocated disk

  • Monolithic or one-file: Single flat extent with separate descriptor file. createType: monolithicFlat
  • Split or multiple files: 2gb preallocated extents or smaller, to account for file system limits. createType: 2GbMaxExtentFlat
  • VMFS (managed):
    • Zeroed: Thick (flat) disk on VMFS, with blocks zeroed on first use. createType: vmfsPreallocated
    • Eager zeroed: Pre‐allocated (flat) disk on VMFS, with all blocks zeroed when created. createType: vmfsEagerZeroedThick

Sparse or growable disk

  • Monolithic or one-file: Single sparse extent with embedded descriptor file. createType: monolithicSparse
    • Stream-optimized: Compressed sparse extents with embedded LBA, useful for OVF streaming. createType: streamOptimized
  • Split or multiple files: Sparse extents 2GB or smaller to account for file system limits. createType: 2GbMaxExtentSparse
  • VMFS (managed):
    • Thin: Thin‐provisioned VMFS disks that consume only as much space as needed. createType: vmfsThin
    • Sparse: Sparse disk on VMFS, often a redo log, not to be confused with thin‐provisioned disk. createType: vmfsSparse

Other VMFS types

  • Virtual raw device map (RDM): Virtual compatibility raw device map (RDM) acts like a symbolic link to physical disk. createType: vmfsRDM
  • Physical raw device map (RDMP): Physical compabibility RDM, similar but sends SCSI commands to underlying hardware.createType: vmfsRDMP
  • Special raw disk: Special raw disk for ESXi hosts, passthrough only mode. createType: vmfsRaw

Full device

Disk that takes the properties of, and is backed by, physical disk on the host. createType: fullDevice

Partitioned device

Disk backed by some partitions of physical disk, with other partitions hidden. createType: partitionedDevice

Custom

Descriptor file with arbitrary extents. createType: custom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment