VHD (file format)

Last updated

Virtual Hard Disk
VHD File.png
Filename extensions
.vhd, .vhdx (Virtual Hard Disk v2)
Internet media type application/x-vhd, application/x-vhd-disk, application/x-virtualbox-vhd
Magic number
  • vhdxfile (VHDX) [1]
Developed by Connectix / Microsoft
Type of format Virtual machine disk image

VHD (Virtual Hard Disk) and its successor VHDX are file formats representing a virtual hard disk drive (HDD). They 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. They are typically used as the hard disk of a virtual machine, are built into modern versions of Windows, and are the native file format for Microsoft's hypervisor (virtual machine system), Hyper-V.

Contents

The format was created by Connectix for their Virtual PC product, known as Microsoft Virtual PC since Microsoft acquired Connectix in 2003. VHDX was introduced in Windows 8/Windows Server 2012 to add features and flexibility missing in VHD that had become apparent over time.

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

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. [3]

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. [4] [5]

Limitations

The VHD format has a built-in limitation of just under 2 TiB (2048 GiB) for the size of any dynamic or differencing VHDs. [6] [7] [8] 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. [2] About 127 GiB is also the limit for VHDs in Windows Virtual PC. [9] 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. [2] 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 [10] 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. [11]

The Vista (or later) drive managerGUI 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[ citation needed ]. 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. In 2017 Red Gate Software and Windocks introduced VHD based support for SQL Server database cloning. [14] [15]

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. [16] The Windows Disk Management MMC plugin can directly mount a VHD file as a drive letter in Windows 7/Server 2008 and newer.

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. [17] [18] [19] 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. [17] [19] [20] Other virtual machine software such as VMWare Workstation and VMware Player can mount raw floppy images in the same way. [21]

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. [22] Under Hyper-V, VFD files are usable through the VM settings for Generation 1 virtual machines. Generation 2 virtual machines do not emulate a floppy controller and do not support floppy disk images.

Virtual Hard Disk (VHDX)

VHDX (Virtual Hard Disk v2) is the successor format to VHD. Where VHD has a capacity limit of 2040 GB, VHDX has a capacity limit of 64 TB. For disk images with this newer format the filename extension vhdx is used instead of vhd. VHDX protects against power failures and is used by Hyper-V. [23] VHDX format is optimized for both HDD and SSD.

See also

Related Research Articles

<span class="mw-page-title-main">Drive letter assignment</span> Alphabetical assignment to logical drives on computers (e.g., C:\)

In computer data storage, drive letter assignment is the process of assigning alphabetical identifiers to volumes. Unlike the concept of UNIX mount points, where volumes are named and located arbitrarily in a single hierarchical namespace, drive letter assignment allows multiple highest-level namespaces. Drive letter assignment is thus a process of using letters to name the roots of the "forest" representing the file system; each volume holds an independent "tree".

A disk image is a snapshot of a storage device's structure and data typically stored in one or more computer files on another storage device. Traditionally, disk images were bit-by-bit copies of every sector on a hard disk often created for digital forensic purposes, but it is now common to only copy allocated data to reduce storage space. Compression and deduplication are commonly used to reduce the size of the image file set. Disk imaging is done for a variety of purposes including digital forensics, cloud computing, system administration, as part of a backup strategy, and legacy emulation as part of a digital preservation strategy. Disk images can be made in a variety of formats depending on the purpose. Virtual disk images are intended to be used for cloud computing, ISO images are intended to emulate optical media and raw disk images are used for forensic purposes. Proprietary formats are typically used by disk imaging software. Despite the benefits of disk imaging the storage costs can be high, management can be difficult and they can be time consuming to create.

Virtual PC is an x86 emulator for PowerPC Mac hosts and a virtualization app for Microsoft Windows hosts. It was created by Connectix in 1997 and acquired by Microsoft in 2003. The Mac version was discontinued in 2006 following the Mac transition to Intel, while the Windows version was discontinued in 2011 in favour of Hyper-V.

<span class="mw-page-title-main">Connectix</span> Software and hardware company

Connectix Corporation was a software and hardware company, noted for having released innovative products that were either made obsolete as Apple Computer incorporated the ideas into system software, or were sold to other companies once they became popular. It was formed in October 1988 by Jon Garber; dominant board members and co-founders were Garber, Bonnie Fought, and close friend Roy McDonald. McDonald was still Chief Executive Officer and president when Connectix finally closed in August 2003.

Bare-metal restore is a technique in the field of data recovery and restoration where the backed up data is available in a form that allows one to restore a computer system from "bare metal", i.e. without any requirements as to previously installed software or operating system.

<span class="mw-page-title-main">Diskless node</span> Computer workstation operated without disk drives

A diskless node is a workstation or personal computer without disk drives, which employs network booting to load its operating system from a server.

In computer data storage, a volume or logical drive is a single accessible storage area with a single file system, typically resident on a single partition of a hard disk. Although a volume might be different from a physical disk drive, it can still be accessed with an operating system's logical interface. However, a volume differs from a partition.

Microsoft Virtual Server was a virtualization solution that facilitated the creation of virtual machines on the Windows XP, Windows Vista and Windows Server 2003 operating systems. Originally developed by Connectix, it was acquired by Microsoft prior to release. Virtual PC is Microsoft's related desktop virtualization software package.

In Unix-like operating systems, a loop device, vnd, or lofi is a pseudo-device that makes a computer file accessible as a block device.

<span class="mw-page-title-main">VirtualBox</span> Open-source x86 virtualization application

Oracle VM VirtualBox is a hosted hypervisor for x86 virtualization developed by Oracle Corporation. VirtualBox was originally created by InnoTek Systemberatung GmbH, which was acquired by Sun Microsystems in 2008, which was in turn acquired by Oracle in 2010.

NTBackup is the first built-in backup utility of the Windows NT family. It was introduced with Windows NT 3.51. NTBackup comprises a GUI (wizard-style) and a command-line utility to create, customize, and manage backups. It takes advantage of Shadow Copy and Task Scheduler. NTBackup stores backups in the BKF file format on external sources, e.g., floppy disks, hard drives, tape drives, and Zip drives. When used with tape drives, NTBackup uses the Microsoft Tape Format (MTF), which is also used by BackupAssist, Backup Exec, and Veeam Backup & Replication and is compatible with BKF.

<span class="mw-page-title-main">Hyper-V</span> Native hypervisor by Microsoft

Microsoft Hyper-V, codenamed Viridian, and briefly known before its release as Windows Server Virtualization, is a native hypervisor; it can create virtual machines on x86-64 systems running Windows. Starting with Windows 8, Hyper-V superseded Windows Virtual PC as the hardware virtualization component of the client editions of Windows NT. A server computer running Hyper-V can be configured to expose individual virtual machines to one or more networks. Hyper-V was first released with Windows Server 2008, and has been available without additional charge since Windows Server 2012 and Windows 8. A standalone Windows Hyper-V Server is free, but has a command-line interface only. The last version of free Hyper-V Server is Hyper-V Server 2019, which is based on Windows Server 2019.

<span class="mw-page-title-main">Backup and Restore</span> Primary backup component of Windows Vista and Windows 7

Backup and Restore is the primary backup component of Windows Vista and Windows 7. It can create file and folder backups, as well as system images backups, to be used for recovery in the event of data corruption, hard disk drive failure, or malware infection. It replaces NTBackup, which has been part of Windows since Windows NT 3.51. Unlike its predecessor, it supports CDs, DVDs, and Blu-rays discs as backup media.

Windows Deployment Services (WDS) is a deprecated component of the Windows Server operating system that enables centralized, network-based deployment of operating systems to bare-metal computers. It is the successor to Remote Installation Services (RIS). WDS officially supports remote deployment of Windows Vista and later, as well as Windows Server 2008 and later. However, because WDS uses disk imaging, in particular the Windows Imaging Format (WIM), it could deploy virtually any operating system. This is in contrast with its predecessor, RIS, which was a method of automating the installation process.

Windows Assessment and Deployment Kit, formerly Windows Automated Installation Kit, is a collection of tools and technologies produced by Microsoft designed to help deploy Microsoft Windows operating system images to target computers or to a virtual hard disk image in VHD format. It was first introduced with Windows Vista. WAIK is a required component of Microsoft Deployment Toolkit.

diskpart Command line program

In computing, diskpart is a command-line disk partitioning utility included in Windows 2000 and later Microsoft operating systems, replacing its predecessor, fdisk. The command is also available in ReactOS.

<span class="mw-page-title-main">StarWind Software</span> American computer storage company

StarWind Software, Inc. is a privately held Beverly, Massachusetts-based computer software and hardware appliance company specializing in storage virtualization and software-defined storage.

<span class="mw-page-title-main">Windows Server 2012</span> Sixth version of Windows Server, released in 2012

Windows Server 2012, codenamed "Windows Server 8", is the sixth version of the Windows Server operating system by Microsoft, as part of the Windows NT family of operating systems. It is the server version of Windows based on Windows 8 and succeeds Windows Server 2008 R2, which is derived from the Windows 7 codebase, released nearly three years earlier. Two pre-release versions, a developer preview and a beta version, were released during development. The software was officially launched on September 4, 2012, which was the month before the release of Windows 8. It was succeeded by Windows Server 2012 R2 in 2013. Mainstream support for Windows Server 2012 ended on October 9, 2018, and extended support ended on October 10, 2023. Windows Server 2012 is eligible for the paid Extended Security Updates (ESU) program, which offers continued security updates until October 13, 2026.

<span class="mw-page-title-main">Windows Server 2012 R2</span> Seventh version of Windows Server, released in 2013

Windows Server 2012 R2, codenamed "Windows Server Blue", is the seventh version of the Windows Server operating system by Microsoft, as part of the Windows NT family of operating systems. It was unveiled on June 3, 2013, at TechEd North America, and released on October 18 of the same year. It is the successor to Windows Server 2012, and is based on the Windows 8.1 codebase.

<span class="mw-page-title-main">Windows Server 2016</span> Eighth version of Windows Server, released in 2016

Windows Server 2016 is the eighth release of the Windows Server operating system developed by Microsoft as part of the Windows NT family of operating systems. It was developed alongside Windows 10 and is the successor to the Windows 8.1-based Windows Server 2012 R2. The first early preview version became available on October 1, 2014 together with the first technical preview of System Center. Windows Server 2016 was released on September 26, 2016 at Microsoft's Ignite conference and broadly released for retail sale on October 12, 2016. It was succeeded by Windows Server 2019 and the Windows Server Semi-Annual Channel.

References

  1. "Virtual Hard Disk v2 (VHDX) File Format" (PDF). Microsoft Corporation. 12 September 2018. Retrieved 3 November 2018.
  2. 1 2 3 4 5 "Virtual Hard Disk Image Format Specification". Microsoft TechNet . Microsoft Corporation. 27 February 2009. Archived from the original on 2 February 2012. Retrieved 2 December 2018.
  3. "Hyper-V Virtual Hard Disk Format Overview". Microsoft TechNet. Microsoft. 25 October 2016. Retrieved 1 December 2016.
  4. "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.
  5. "Walkthrough: Deploy a Virtual Hard Disk for Native Boot". Microsoft TechNet. Microsoft corporation. 8 July 2010. Retrieved 12 November 2010.
  6. "Requirements and Limits for Virtual Machines and Hyper-V in Windows Server 2008 R2". Microsoft TechNet. Microsoft Corporation. 2009. Retrieved 12 April 2010.
  7. "About VHD". MSDN . Microsoft Corporation. 2009. Retrieved 12 April 2010.
  8. Jain, Ranjana (23 March 2010). "Virtual Hard Disk (VHD) Architecture Explained". Microsoft TechNet Blogs. Microsoft Corporation. Retrieved 13 April 2010.
  9. "Disk2vhd v1.63". Microsoft SysInternals. 2010. Retrieved 14 July 2011.
  10. Vanover, Rick. "The anatomy of a Hyper-V 2012 R2 VM: A breakdown of the key files". hyperv.veeam.com. Veeam Software. Retrieved 5 March 2015.
  11. Koenig, Chris (28 October 2008). "PDC Day 2 – Windows 7, Windows Live, Mesh and Office Online". MSDN Blogs. Microsoft Corporation. Retrieved 17 December 2010.
  12. "DiskPart". Windows Server 2008 and Windows Server 2008 R2. Microsoft Technet. 25 October 2010. Retrieved 15 July 2011.
  13. "Modify a virtual hard disk". Windows 7 Technical Library. Microsoft Technet. 25 June 2009. Retrieved 15 July 2011.
  14. "Red-Gate SQL Clone". Red Gate. March 2017.
  15. "Windocks Now Supports Database Cloning for SQL Server". IT Pro Today. 18 April 2017.
  16. "Windows Server 2008 Reviewers Guide". Microsoft. 4 February 2008.
  17. 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.
  18. "Virtual floppy disk overview". ADS Administrator's Guide. Microsoft Corporation. Retrieved 26 June 2011.
  19. 1 2 "Creating virtual floppy disks in Virtual Server". TechNet Library. Microsoft Corporation. Retrieved 26 June 2011.
  20. Armstrong, Ben (5 January 2007). "Floppy disk image formats supported by Virtual PC and Virtual Server". Virtual PC Guy's Blog. Microsoft Corporation. Retrieved 3 July 2011.
  21. "Virtual Floppy Disks with VMware". Petri.co.il. 8 January 2009. Retrieved 10 December 2011.
  22. Armstrong, Ben (1 October 2009). "Using Floppy Disks with Windows Virtual PC". Virtual PC Guy's Blog. Microsoft Corporation. Retrieved 26 June 2011.
  23. "Hyper-V Virtual Hard Disk Format Overview". 25 October 2016.