Virtual Hard Disk Specification

The Virtual Hard Disk Image Format Specification (VHD Spec) has been available from Microsoft since October 2006.  You can bypass registration and download straight from here.

The document is only seventeen pages long but manages to capture how it is set up.

The specification was originally created by Connectix and was gained by Microsoft from the acquisition in 2003.  Since then VHD has become more and more successful.  It is used by all Microsoft virtualization products (VirtualPC, Virtual Server, Hyper-V) and is gaining support from Citrix products as well (PVS and XenServer).  VHD looks to be the rising star for Windows based virtual machines.

Strangely, I had the opportunity to meet the creator of the original VHD specification at a BriForum 2008 dinner.  Unfortunately I did not get his business card.  His career path took some strange turns based on working at Connectix, being acquired by Microsoft, working for Microsoft, leaving to work at Calista, and then being acquired yet again by Microsoft.  He was part of the Calista contingent at BriForum 2008 in Chicago along with Nelly Porter.

The VHD format has some tricks up its sleeve.  Two of these are related to disk types.  There are three basic disk types.  They are:

·         Fixed hard disk image

·         Dynamic hard disk image

·         Differencing hard disk image

Fixed disk is pre-allocated to the size specified at creation.  Dynamic disk allocates on the fly based on a certain chunk size (for example 2MB).  Differencing disk is where two or more images are combined to form one virtual disk image.  Differencing would allow for a primitive cloning to take place.  It is similar in concept to linked clones but without the protection of the base not changing.

Being a virtual disk, it has no concept of files.  File interpretation is based solely on the file system code in Windows (NTFS).  This is another way of saying it is a block-based model.

Given the momentum of VHD within Citrix and Microsoft, there is a good chance that VHD will be used for more tasks.  Microsoft has acquired Kidaro, for example, which would imply that VHD will get a major push for transporting VMs around the extended enterprise (read mobile and home workers).  Given the nature of the Kidaro TrimTransfer technology, it should be possible to make this as painless as possible.

There is a competing model at Microsoft under the banner of Windows Imaging Format.  Instead of focusing on disks, it focuses on files.  It uses Single Instance Store (SIS) and is being used for Vista deployment.  It is an excellent model for deploying large sets of files especially with small variations between copies (instances).

Both of these formats allow for mounting (VHDMount and ImageX) into Windows.  VHDMount comes from Virtual Server 2005.

The hope is that VHD will become the standard over time.  There is another format called Open Virtualization Format (OVF) that is set to work across all platforms in the future.  This new format is intended to supercede all existing formats and make it easier to transport workloads between vendors.

6 responses to “Virtual Hard Disk Specification

  1. Pingback: Blocks Versus Files « Citrix Blogger

  2. Pingback: Dynamic VHD Walkthrough « Citrix Blogger

  3. Bai,Dengfeng

    For the bitmap of VHD, is bit 0 is the least significant bit or the most significant bit?
    For example, I want to check the bitmap of sector 0, I need to check which bit? (& 0×01 or & 0×80)

  4. Pingback: - Cliff Davies