What file extension is VHDX?

The VHDX file extension stands for Virtual Hard Disk (version 2). VHDX files are used by Microsoft’s Hyper-V virtualization software as virtual hard drive containers for virtual machines. VHDX offers several improvements over the older VHD format, including larger storage capacity, data corruption protection, and support for larger virtual hard drives.

Quick Overview

Here is a quick overview of key facts about the VHDX file extension:

  • Extension: .vhdx
  • Introduced: Windows Server 2012
  • Used by: Microsoft Hyper-V virtualization software
  • File type: Virtual hard drive container
  • Maximum size: 64 TB
  • Improves on: VHD format

What is a VHDX File?

A VHDX file is a virtual hard drive used by Microsoft’s Hyper-V virtualization platform. It allows you to create a virtual hard disk that can be mounted as a storage drive within a virtual machine running on Hyper-V.

VHDX is the successor to the older VHD format, first introduced in Windows Server 2008. VHDX improves on VHD in a few key ways:

  • Supports virtual hard drives up to 64 TB in size, compared to 2 TB for VHD.
  • Uses 4 KB logical sector sizes instead of 512 byte, improving performance.
  • Implements checksums to prevent against data corruption.
  • Supports TRIM command to improve SSD performance in virtual machines.

When you create a new virtual machine in Hyper-V, you have the option to create a new VHDX virtual hard drive for it. This VHDX file will store the virtual machine’s operating system, applications, and data. It provides the virtual equivalent of a physical hard drive for your VM.

What Can Open VHDX Files?

VHDX files are designed to be used by Microsoft’s Hyper-V virtualization platform. There are a few programs that can open and interact with VHDX files:

  • Hyper-V Manager – Hyper-V’s management interface used to create, configure, and manage VMs and their VHDX files.
  • Disk Management – The built-in Microsoft tool for managing disks and volumes can mount, inspect, and convert VHDX files.
  • File Explorer – Windows 10 and Windows 11 add native VHDX support to File Explorer for mounting and interacting with VHDX contents.
  • Disk2vhd – Microsoft’s free VHD/VHDX converter tool can be used to convert physical disks to VHDX files.
  • Third-party tools – Such as StarWind V2V Converter, which can convert between VHDX and other virtual disk formats like VMDK.

VHD vs. VHDX Format Comparison

Here is a comparison of the key differences between the older VHD format and the newer VHDX format used in Hyper-V:

Feature VHD VHDX
Maximum disk size 2 TB 64 TB
Block size 512 bytes 4 KB
Resize support No Yes
Protection against corruption None Checksum
TRIM command support No Yes

As you can see, VHDX provides significantly larger storage capacity per virtual disk, as well as important features for performance and data integrity.

VHDX Technical Details

Under the hood, VHDX utilizes the following technologies and capabilities:

  • Logical sector size of 4 KB – Up from 512 bytes in VHD. This matches modern physical hard drives and improves performance.
  • GUID Partition Table (GPT) – More flexible than VHD’s MBR partitioning scheme. Supports large drive sizes.
  • Virtual disk storage – The actual virtual disk data is stored in a separate “block” file that the main VHDX references.
  • Checksum – 64-bit checksum is used to detect data corruption and prevent further corruption.
  • Sparse storage – Unallocated space doesn’t take up actual storage space.
  • Microsoft Logical Disk Manager metadata – Stores information like partitions and filesystems.

Microsoft provides full technical specifications for VHDX format in their Virtual Hard Disk Specification documents.

Creating VHDX Files

There are a couple different ways to go about creating new VHDX files:

  • Hyper-V Manager – You can use Hyper-V Manager to create a new VHDX when making a new virtual machine.
  • Disk Management – Microsoft’s disk management utility can create new dynamic or fixed VHDX files.
  • PowerShell – Scripts can use PowerShell cmdlets like New-VHD to create new dynamic or fixed VHDX files.
  • Conversion – Existing drives/disks can be converted to VHDX format using Microsoft’s Disk2vhd tool.

Dynamic VHDX files start small and grow as needed. Fixed VHDX reserve the maximum storage space right away. Either one can be used for VM virtual drives in Hyper-V.

Using VHDX with Hyper-V

The primary use case for VHDX files is providing virtual hard drive storage for Hyper-V virtual machines. When you create a new VM in Hyper-V, you have the option to create a new VHDX file for it or use an existing one.

Some ways VHDX virtual drives can be used with Hyper-V VMs:

  • As the primary virtual hard drive storing the OS and applications
  • As additional data drives
  • To boot different operating systems (multi-boot)
  • To run certain OS installations natively via mount
  • To migrate and move VMs between hosts
  • To back up and replicate VMs

VHDX allows Hyper-V to provide full virtualized storage capabilities for virtual machines. Features like TRIM, checksums, and large capacities enable optimal VM performance.

Mounting VHDX Files

In Windows 10 and Windows 11, you can directly mount VHDX files using File Explorer for access like a physical disk. To mount a VHDX:

  1. Open File Explorer and locate the VHDX file
  2. Right click on the VHDX and select “Mount”
  3. The VHDX will appear as a new drive letter in File Explorer
  4. You can now interact with the mounted VHDX just like a regular disk
  5. To unmount, right click the drive and select “Eject”

This allows you to directly inspect, modify, copy files, etc. in a VHDX virtual disk without needing to boot it in Hyper-V.

VHDX File Contents

When mounted and accessible, VHDX files contain whatever operating system, data, applications, and files were stored in them by the VM. This could include:

  • Hard drive partitions and volumes formatted with file systems like NTFS or ReFS
  • System files necessary to boot an OS like Windows
  • The Windows registry hive containing configuration information
  • Installed applications and executable programs
  • Any data files generated and saved by software and users

Essentially, the contents of a VHDX look just like the internal drive of a physical computer. This provides a virtually identical experience when it is mounted as a drive by the virtual machine.

Conclusion

In summary, VHDX is the current virtual hard disk format used by Microsoft’s Hyper-V platform. It offers improvements over VHD like larger drive sizes, better performance, TRIM support, and data corruption protection. VHDX files contain full operating systems, installed software, and data that provide virtual machines with virtualized hard drives.

VHDX allows for robust and flexible storage options for Hyper-V VMs. Features like mountability, backups, portability, and disk conversion give admins and users powerful tools to leverage virtual hard disks. The VHDX extension indicates a modern and capable virtual drive container perfectly suited for virtualization in Hyper-V environments.