VMFS (VMware Virtual Machine File System)

VMFS is VMware’s clustered file system for ESX and ESXi datastores, versions 3, 5 and 6, holding virtual disks and machine configuration. It is the target of virtual machine recovery from failed hosts, and the format is not officially published.

Overview

VMFS is a clustered file system: several hosts can mount one datastore at the same time and coordinate with on-disk locks. A logical volume manager header sits near 1 MiB into the partition, followed by file system metadata: the file descriptor cluster, resource clusters for blocks, sub-blocks and pointer blocks, and a heartbeat region. Files, mostly virtual disk (.vmdk) and virtual machine configuration files, are addressed by file descriptors that reference blocks through pointer blocks.

Versions 3, 5 and 6 differ in block size handling, maximum sizes and partitioning (VMFS 5 uses GPT).

History

  • VMFS 1 and 2 shipped with ESX 1.x and 2.x; VMFS 3 with ESX 3 (2006).
  • VMFS 5 arrived with vSphere 5.0 (2011) and VMFS 6 with vSphere 6.5 (2016).

Structures

Offsets are in bytes from the start of the structure named in each heading. Field names are descriptive and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.

Entries V5

OffsetSizeTypeFieldNotes
p4u32 LE–
p + 44u32 LE–

Entries V6

OffsetSizeTypeFieldNotes
0x04u32 LE–
0xC4u32 LEAp Blocks
e4u32 LE–
(int)blockAt + 42u16 LESlots
0x10 + m * 44u32 LEAp At
e + 44u32 LE–

Open Resource

OffsetSizeTypeFieldNotes
0x04u32 LEPer Cluster
0x44u32 LEClusters Per Group
0x84u32 LEGroup Offset
0xC4u32 LEResource Size
0x104u32 LEGroup Size
0x344u32 LEChild Offset

Resolve

OffsetSizeTypeFieldNotes
index * 44u32 LE–
index * 88u64 LE–

System Descriptor

OffsetSizeTypeFieldNotes
0xD14u32 LEGroup
0xD14u32 LEAt
0xD54u32 LEAt
0xE18u64 LEAt
0xE94u32 LE–
0x1058u64 LEAt
0x10D4u32 LE–

Vmfs File System

OffsetSizeTypeFieldNotes
0x194u32 LEDense
0xA18u64 LEFile Block Size
0xE94u32 LEPb2
0x1344u32 LED
0x1382u16 LELarge Block Shift

Volume Details

OffsetSizeTypeFieldNotes
at4u32 LE–
at8u64 LE–

Mount

OffsetSizeTypeFieldNotes
0x04u32 LELvm
0x04u32 LE–

Probe

OffsetSizeTypeFieldNotes
0x04u32 LELvm
0x04u32 LEAgic
0xA58u64 LEBlock Size
0xAD4u32 LECreated

Version

OffsetSizeTypeFieldNotes
0x44u32 LEVolume
0x81u8–

Other fields read

Read inOffsetSizeTypeFieldNotes
Vmfs File System0x04u32 LE–

Constants

Vmfs Module

NameValueTypeNotes
LvmMagic0xC001D00D, FsMagic5 = 0x2FABF15E, FsMagic6 = 0x2FABF15Fuint

Vmfs File System

NameValueTypeNotes
ZlaDouble0x10D0, ZlaResident = 0x10D1, DirHeaderBlock = 0x10000int

Vmfs Lvm Module

NameValueTypeNotes
LvmMagic0xC001D00Duint
HeaderAt0x100000long
Structures and constants were extracted from the implementation. Prose sections are a summary from public sources; verify details before relying on them.