File Formats
  • Audio
  • Video
  • Images
  • 3D & CAD
  • Documents
  • Data
  • Code
  • System
System
  • Disk & VM images
  • Floppy & tape images
  • Keys & certificates
  • Network captures
  • Shortcuts & settings
  • Logs
  1. Home
  2. System
  3. Disk & VM images
  4. VHD
.VHD
  • Overview

.VHD

Virtual Hard Disk

Introduction

VHD is a file that acts as the hard disk of a virtual machine. It was created by Connectix for Virtual PC, which Microsoft bought in 2003, and Microsoft later published the specification. VHD files are used by Hyper-V and Azure, and Windows can attach one as an ordinary drive.

A VHD can be at most about 2 TB. Its successor, VHDX, lifts that limit and is more resilient to power failures, but VHD remains widely supported.

Software

  • Hyper-V, built into Windows and Windows Server
  • Windows Disk Management, which attaches VHD files as drives
  • VirtualBox (Windows, macOS, Linux)
  • QEMU and qemu-img, which run and convert VHD files (Windows, macOS, Linux)
  • 7-Zip, which opens VHD files like an archive (Windows)

Structure

Every VHD ends with a 512-byte footer that starts with the cookie conectix. Its fields are big-endian and include the creator application, the size of the disk, its geometry, a checksum, a unique ID and the disk type: 2 for a fixed disk, 3 for a dynamic disk and 4 for a differencing disk.

A fixed disk is simple: the raw contents of the disk, sector by sector, followed by the footer. A dynamic disk only stores the parts that have been written. It starts with a copy of the footer, then a 1024-byte dynamic disk header beginning cxsparse, then a block allocation table that maps each block of the disk, 2 MB by default, to its place in the file. Each stored block begins with a bitmap of which sectors in it hold data. A differencing disk has the same layout and records only the changes from a parent disk.

  1. 0Footer copy cookie conectix, sizes, disk type512 bytes
  2. 512Dynamic disk header cookie cxsparse, table offset, block size1,024 bytes
  3. 1536Block allocation table one entry per block of the diskvaries
  4. …Data blocks each a sector bitmap then the block’s sectorsrepeated
  5. endFooter the last 512 bytes of the file512 bytes
The layout of a dynamic VHD.
© 2026 fileformats.org About Contact Made by Lewpen