Jump to content

VHD (file format)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 63.239.65.10 (talk) at 13:20, 14 January 2010 (See also: VHDL). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Virtual Hard Disk
File:Vhdfile.png
Filename extension
.vhd
Internet media type
?
Magic numberconectix
Developed byConnectix / Microsoft
Type of formatDisk image
Container forVirtual machine disk images

A Virtual Hard Disk (VHD) is a file formatted to be structurally identical to a physical Hard Disk Drive. It is typically used in various virtualization packages, and can be used to install a wide variety of operating systems (various versions of Microsoft Windows and Linux).[1] The format was created by Connectix which was later acquired by Microsoft for Virtual PC. Since June 2005 Microsoft has made the VHD Image Format Specification available to third parties under the Microsoft Open Specification Promise.[2]

Uses

A Virtual Hard Disk allows multiple operating systems to reside on a single host machine. This method enables developers to test software on different operating systems without the cost or hassle of installing a second hard disk or creating a separate partition on a single hard disk. The ability to directly modify a virtual machine’s hard disk from a host server supports many applications, including:

  • Moving files between a VHD and the host file system
  • Backup and recovery
  • Antivirus and security
  • Image management and patching
  • Disk conversion (physical to virtual, and so on)
  • Life-cycle management and provisioning

Software using the VHD file format

The format is used for Microsoft Virtual PC and was also adopted by XenSource for what is now the Citrix XenServer hypervisor. The VHD format is used by Microsoft Windows Server 2008 which includes a hypervisor-based virtualization technology called Hyper-V.

The VHD format is used by Windows Vista's Complete PC Backup feature found in the Business, Enterprise and Ultimate editions.

VirtualBox, part of Sun Microsystem's Sun xVM line supports VHD in versions 2 and newer, and can read VHD format files on a wide variety of operating systems.

VMware ESX Server supports the format as an alternative to its proprietary VMDK format.

Windows 7 and Windows Server 2008 R2 include support for creating, mounting, and booting from VHD files.[3]

Offline modification

It is sometimes useful to modify a VHD file without booting an operating system. Hyper-V features offline VHD manipulation — providing administrators with the ability to securely access files within a VHD without having to instantiate a virtual machine. This provides administrators with granular access to VHDs and the ability to perform some management tasks offline.[4] For situations where mounting a VHD within the operating system is undesirable, several programs enable software developers to inspect and modify VHD files, including .NET DiscUtils and WinImage.

Supported formats

VHDs are implemented as files that reside on the native host file system. The following types of VHD formats are supported by Microsoft Virtual PC and Virtual Server:

  • Fixed hard disk image - a file that is allocated to the size of the virtual disk.
  • Dynamic hard disk image - a file that at any given time is as large as the actual data written to it, plus the size of the header and footer.
  • Differencing hard disk image - a set of modified blocks (maintained in a separate file referred to as the "child image") in comparison to a parent image.
  • Linked to a hard disk - a file which contains a link to a physical hard drive or partition of a physical hard drive.

The "Undo Changes" feature

The Differencing hard disk image format allows the concept of Undo Changes—when enabled, all changes to a hard drive contained within a VHD (the parent image) are stored in a separate file (the child image). Options are available to undo the changes to the VHD, or to merge them permanently into the VHD.

Windows 7 support for native VHD boot

Native VHD Boot refers to the ability of a physical computer to mount and boot from an operating system contained within a VHD. Windows 7 Enterprise and Ultimate editions support this ability, both with and without a host operating system to be present. Windows Server 2008 R2 is also compatible with this feature.

Advantages of VHDs

Significant benefits result from the ability to boot a physical computer from a virtual hard drive:

  • Ease of deployment: IT organizations can deploy standardized, 'pre-built' configurations on a single VHD. As an example, software engineering organizations which need a specific set of tools for a particular project could simply 'pull' the appropriately-configured VHD from a network location.
  • Backup-and-Restore: Changes to the contents of a VHD (such as infection by a virus, or accidental deletion of critical files) are easily undone.
  • Multi-User Isolation: Many current operating systems support having multiple users, but offer varying degrees of protection between them (e.g., one user of the OS could become infected by a virus which infects other users, or make changes to the OS which affect other users). By giving each user their own version of the operating system -- say, by creating for each of them a differencing VHD based on a base installation of the OS -- changes to any particular child image would have no effect on any of the other child images. However, a virus can be programmed to search for VHDs and infect it - it's more a matter of securing file permissions and using the appropriate accounts (restricted user always, administrator or super user only when installing software or configuring the operating system).

See also

References

  1. ^ "Microsoft Virtual Hard Disk Overview". Microsoft. November 6, 2006.
  2. ^ "Virtual Hard Disk Image Format Specification". Microsoft. February 27, 2009.
  3. ^ http://blogs.msdn.com/chkoenig/archive/2008/10/28/pdc-day-2-windows-7-windows-live-mesh-and-office-online.aspx
  4. ^ "Windows Server 2008 Reviewers Guide". Microsoft. February 4, 2008.