VHD (file format)

"Virtual Hard Disk" redirects here. For other uses, see Virtual drive.
".vhd" redirects here. For hardware description language file, see VHDL.
Virtual Hard Disk
Filename extension .vhd
Developed by Connectix / Microsoft
Type of format Virtual machine disk image

VHD (Virtual Hard Disk) is a file format which represents a virtual hard disk drive (HDD). It may contain what is found on a physical HDD, such as disk partitions and a file system, which in turn can contain files and folders. It is typically used as the hard disk of a virtual machine.

The format was created by Connectix for their Virtual PC product, known as Microsoft Virtual PC since Microsoft acquired Connectix in 2003.

Since June 2005, Microsoft has made the VHD Image Format Specification available to third parties under the Microsoft Open Specification Promise.[1]

Features

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 partitioning a single hard disk into multiple volumes. The ability to directly modify a virtual machine's hard disk from a host server supports many applications, including:

VHDX was added in Hyper-V in Windows Server 2012 to add larger storage capacity, data corruption protection, and optimizations to prevent performance degradation on large-sector physical disks.[2]

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:

Advantages

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

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 present. Windows Server 2008 R2 is also compatible with this feature.[3][4]

Further information: Windows Vista startup process

Limitations

The VHD format has a built-in limitation of just under 2 TiB (2040 GiB) for the size of any dynamic or differencing VHDs.[5][6][7] This is due to a sector offset table that only allows for the maximum of a 32-bit quantity. It is calculated by multiplying 232 by 512 bytes for each sector.

The C×H×S formula in the VHD specification allows a maximum of 65535×16×255 sectors.[1] About 127 GiB is also the limit for VHDs in Windows Virtual PC.[8] For fewer than 65535×16×63 sectors (about 31 GiB) the CHS-value in the VHD footer uses a minimum of H = 4 and a maximum of H = 16 heads with S = 17, 31, or 63 sectors per track. The CHS algorithm then determines C = (T/S)/H.[1] The specification does not discuss cases where the CHS value in the VHD footer does not match the (virtual) CHS geometry in the Master Boot Record of the disk image in the VHD. Microsoft Virtual Server(also Connectix derived) has this limitation using virtual IDE drivers but 2 TiB if virtual RAID or virtual SCSI drivers are used.

Software support

Virtual Hard Disk format was initially used only by Microsoft Virtual PC (and Microsoft Virtual Server). Later however, Microsoft used the VHD format[9] in Hyper-V, the hypervisor-based virtualization technology of Windows Server 2008. Microsoft also used the format in Complete PC Backup, a backup software component included with Windows Vista and Windows 7. In addition, Windows 7 and Windows Server 2008 R2 include support for creating, mounting, and booting from VHD files.[10][11]

The Vista (or later) drive manager GUI supports a subset of the functions in the diskpart command line tool.[12] VHDs known as vdisk in diskpart can be created, formatted, attached (mounted), detached (unmounted), merged (for differencing VHDs), and compacted (for VHDs on an NTFS host file system). Compacting is typically a two step procedure, first unused sectors in the VHD are filled with zeros, and then diskpart can use the NTFS feature of sparse files to eliminate runs of zeros in the VHD. The virtual machine additions in older VPC versions and the virtual machine integration features in Windows Virtual PC contain precompact ISO images for the first step in supported guest systems.[13]

Third-party products also use VHD file format. Oracle VirtualBox, part of Sun xVM line of Sun Microsystems supports VHD in versions 2 and later. The VHD file format is also adopted by XenSource for what is now the Citrix XenServer hypervisor.

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.[14] The Windows Disk Management MMC plugin can directly attach a .vhd as a drive letter in Windows 7, Windows Server 2008 (64 bits) and Windows Server 2008 R2.

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, WinImage and R1soft Hyper-V VHD Explorer. 7-Zip supports extraction and inspection of VHD files.

Virtual Floppy Disk (VFD)

Virtual Floppy Disk (VFD) is a related file format used by Microsoft Virtual PC, Microsoft Automated Deployment Services and Microsoft Virtual Server 2005.[15][16][17] A VFD that contains an image of a 720 KB low-density, 1.44 MB high-density or 1.68 MB DMF 3.5-inch floppy disk can be mounted by Virtual PC.[15][17][18] Other virtual machine software such as VMWare Workstation and VMware Player can mount raw floppy images in the same way.[19]

Windows Virtual PC for Windows 7 (version 6.1) does not offer a user interface for manipulating virtual floppy disks; however, it still supports physical and virtual floppy disks via scripting.[20]

See also

References

  1. 1 2 3 4 5 "Virtual Hard Disk Image Format Specification". Microsoft TechNet. Microsoft Corporation. 27 February 2009.
  2. "Hyper-V Virtual Hard Disk Format Overview". Microsoft TechNet. Microsoft. Retrieved 1 December 2016.
  3. "Frequently Asked Questions: Virtual Hard Disks in Windows 7 and Windows Server 2008 R2". Microsoft TechNet. Microsoft corporation. 15 October 2010. Retrieved 12 November 2010.
  4. "Walkthrough: Deploy a Virtual Hard Disk for Native Boot". Microsoft TechNet. Microsoft corporation. 8 July 2010. Retrieved 12 November 2010.
  5. "Requirements and Limits for Virtual Machines and Hyper-V in Windows Server 2008 R2". Microsoft TechNet. Microsoft Corporation. 2009. Retrieved 12 April 2010.
  6. "About VHD". MSDN. Microsoft Corporation. 2009. Retrieved 12 April 2010.
  7. Jain, Ranjana (23 March 2010). "Virtual Hard Disk (VHD) Architecture Explained". Microsoft TechNet Blogs. Microsoft Corporation. Retrieved 13 April 2010.
  8. "Disk2vhd v1.63". Microsoft SysInternals. 2010. Retrieved 2011-07-14.
  9. Vanover, Rick. "The anatomy of a Hyper-V 2012 R2 VM: A breakdown of the key files". hyperv.veeam.com. Veeam Software. Retrieved March 5, 2015.
  10. Koenig, Chris (28 October 2008). "PDC Day 2 – Windows 7, Windows Live, Mesh and Office Online". MSDN Blogs. Microsoft Corporation. Retrieved 17 December 2010.
  11. "How to make a Virtual Hard Drive in Windows 7" (PDF). 3dhomejoe. Retrieved 22 January 2011.
  12. "DiskPart". Windows Server 2008 and Windows Server 2008 R2. Microsoft Technet. 2010-10-25. Retrieved 2011-07-15.
  13. "Modify a virtual hard disk". Windows 7 Technical Library. Microsoft Technet. 2009-06-25. Retrieved 2011-07-15.
  14. "Windows Server 2008 Reviewers Guide". Microsoft. 4 February 2008.
  15. 1 2 "How to create a floppy disk image in Virtual PC for Windows versions 4.0 to 5.2". Microsoft Support. Microsoft Corporation. Retrieved 26 June 2011.
  16. "Virtual floppy disk overview". ADS Administrator's Guide. Microsoft Corporation. Retrieved 26 June 2011.
  17. 1 2 "Creating virtual floppy disks in Virtual Server". TechNet Library. Microsoft Corporation. Retrieved 26 June 2011.
  18. Armstrong, Ben (2007-01-05). "Floppy disk image formats supported by Virtual PC and Virtual Server". Virtual PC Guy's Blog. Microsoft Corporation. Retrieved 2011-07-03.
  19. "Virtual Floppy Disks with VMware". Petri.co.il. 2009-01-08. Retrieved 2011-12-10.
  20. Armstrong, Ben (1 October 2009). "Using Floppy Disks with Windows Virtual PC". Virtual PC Guy's Blog. Microsoft Corporation. Retrieved 26 June 2011.
This article is issued from Wikipedia - version of the 12/2/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.