Hyper-V Files, Formats, Snapshots, and Checkpoints Explained
The main files used by Hyper-V are:
- XML files contain VM configuration details
- BIN files store the memory of a VM when a snapshot was taken
- VSV file is the VM’s saved state
- AVHD and AVHDX files are differencing virtual disks, commonly used for snapshots and Hyper-V checkpoints
- VHD and VHDX are virtual disks that hold the parent disk (when snapshots were taken) or the current virtual disk data, including partitions and file systems.
Virtual Disk Formats
VHD (Virtual Hard Disk) is a file format that represents a virtual hard disk drive (HDD) using a file. It contains 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 but may also serve as a container for backups or as a virtual boot partition.
The format was created by Connectix for Connectix Virtual PC product, which was later acquired by Microsoft in 2003, for what is now known as Microsoft Virtual PC.
Since June 2005, Microsoft has made the VHD Image Format Specification available to third parties under the Microsoft Open Specification Promise.
The latest VHDX specification is available here: http://www.microsoft.com/en-us/download/details.aspx?id=34750
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 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
- Permits uninterrupted, live Hyper-V backup
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. Fixed VHDs consist of a raw disk image followed by a VHD footer (512 or formerly 511 bytes).
- 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. Dynamic and differencing VHDs begin with a copy of the VHD footer (padded to 512 bytes), and for dynamic or differencing VHDs created by Microsoft products this results in a VHD-cookie string conectix at the beginning of the VHD file.
- 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. 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. Different child images based on the same parent image also allow “cloning” of VHDs; at least the globally unique identifier (GUID) must be different.
- Linked to a hard disk: a file which contains a link to a physical hard drive or partition of a physical hard drive.
Advantages
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.
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.
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. 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. About 127 GiB is also the limit for VHDs in Windows Virtual PC. For less 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. 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 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.
The Vista (or later) drive manager GUI supports a subset of the functions in the diskpart command line tool. 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.
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. VMware ESX Server and VMware Workstation also support the VHD file format as an alternative to its proprietary VMDK format. The VHD file format is also adopted by XenSource for what is now the Citrix XenServer hypervisor. BackupChain supports VHD and VHDX in its Granular Backup and Granular Restore functions.
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. 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.
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. 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. Other virtual machine software such as VMWare Workstation and VMware Player can mount raw floppy images in the same way.
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.
Sources
Wikipedia and company websites
Backup Software Overview
Server Backup SoftwareDownload BackupChain
Cloud Backup
Backup VMware Workstation
Backup FTP
Backup VirtualBox
Backup File Server
Hyper-V Backup
Backup Hyper-VPopular
- Hyper-V Links, Guides, Tutorials & Comparisons
- Veeam Alternative
- How to Back up Cluster Shared Volumes
- DriveMaker: Map FTP, SFTP, S3 Site to a Drive Letter (Freeware)
Resources
- Free Hyper-V Server
- Remote Desktop Services Blog
- SCDPM Blog
- SCOM Blog
- V4 Articles
- Knowledge Base
- FAQ
- Sitemap
- Backup Education
- Archive 2024
- Archive 2022
- Archive 2021
- Archive 2020
- Archive 2018
- Archive 2017
- Archive 2016
- Archive 2015
- Archive 2014
- Archive 2013
- Hyper-V Scripts in PowerShell
- FastNeuron
- BackupChain (Greek)
- BackupChain (Deutsch)
- BackupChain (Spanish)
- BackupChain (French)
- BackupChain (Dutch)
- BackupChain (Italian)
Backup Software List
BackupChain
Veeam
Unitrends
Symantec Backup Exec
BackupAssist
Acronis
Zetta
Altaro
Windows Server Backup
Microsoft DPM
Ahsay
CommVault
IBM
Other Backup How-To Guides
- How to Fix: Folder name too long to delete
- 0x800705aa How to Fix ERROR NO SYSTEM RESOURCES
- Resolving VSS_WS_FAILED_AT_FREEZE Backup Errors
- Windows Server 2016 Download Location ISO File
- Fix for Hyper-V Backup Error 0x80780049 (ID 517)
- How to Backup a Virtual Server While Running
- Hyper-V Backup Pulls Windows Server 2012 into Saved State
- VssDiag Volume Shadow Copy Service Diagnostic Software with Hyper-V Support
- Hyper-V Backup and Secure DMZ Servers: A How-to Guide
- How to Fix VSS Errors (Volume Shadow Copy Service Errors)
- Hyper-V VHD or VHDX? Advantages, Limitations, and Disadvantages
- Hyper-V Best Practices You Must Know
- How to fix: could not create backup checkpoint for virtual machine
- Backup Software Rewards for Users and MSPs
- 2 Reasons Why Continuous Data Protection (CDP) Isn’t Always A Good Idea for Backups
- 11 Things to Know About Hyper-V Snapshots / Checkpoints
- KB 2885541 Packet sniffing tool does not sniff all network traffic through port mirroring on Windows 2012 Server VMs
- Fixed vs. Dynamic VHD and VHDX Performance
- Helpful Hyper-V Links
- Hyper-V Manager: Scheduled Snapshot and Checkpoint Creation