VHD vs. VHDX: Hmm….What’s the Difference

Estimated reading time: 5 minutes

Thank you for reading this post, don't forget to subscribe! Happy New Year 2024!

I get asked this all the time….and here is my answer. Microsoft’s virtual hard disk format, VHDX, has some important advantages over the legacy VHD format, as this VHD vs. VHDX comparison shows.

The release of Windows Server 2012 brought many new virtualization improvements, but one that caught the eye of many IT pros was the introduction of the VHDX file format. Windows Server 2012 supports the new format but also lets Hyper-V administrators use the legacy VHD format. With two virtual hard disk formats to choose from, let’s take a minute to talk about VHD vs. VHDX.

A look at VHD vs. VHDX

One of the biggest advantages of VHDX compared with the legacy VHD format is virtual disk storage capacity. Before Windows Server 2012, Hyper-V virtual hard disks had a 2 TB limit. VHDX files have a 64 TB capacity. The advantages of VHDX aren’t limited to improved capacity, however; VHDX files were designed to work with today’s modern hardware and have a 4 KB logical sector size that improves performance compared with VHD files.

The VHDX format also provides protection against file corruption related to power failures by continuously keeping track of updates in the metadata, a feature not available with the VHD format. Larger block sizes for dynamic and differencing disks, as well as the ability to store custom metadata, also give the new format the edge in the VHD vs. VHDX comparison.

Now let’s look at different storage types with VHDVHDX. Hyper-V allows you to create 2 primary hard disk storage types, fixed or dynamic.
Dynamic size drives are allocated with the minimum space needed and space is expanded as you write additional drive to the volume. There is performance loss on disk writes that require storage to be expanded. For example, if you create a dynamic volume with 10 GB and as you write data and use up the entire 10GB allocation then the volume needs to be expanded first then your data will be written to the volume. This expansion adds overhead and can slow down data writes by 25% or more.

Fixed drive sizes presets the size for your storage. Since the file is preallocated on the Hyper-V host there is no loss in performance due to the need for expansion of space.
The big difference between VHD and VHDX is the way this expansion is handled. In tests performed by others, they have seen negligible difference in overhead with Dynamic VHDX volumes when they expand to accommodate additional data.
You can easily convert your VHD volumes to VHDX and vise visa. As always, make a backup and make sure you have enough time allocated for the conversion. The larger the volume, the longer the conversion will take.

Converting VHD to VHDX with Hyper-V
If you want to convert VHD files into VHDX file format, Hyper-V Manager console provides an easy way to do it. The way it works is it will create a new VHDX disk and copy the data from the existing VHD to the new disk. After it copies the data, you have two disks such as original VHD disk and new VHDX disk exactly with the same content. Once you confirm the newly generated VHDX disk is fully functional, you can opt for deleting old original VHD disk.

Now let’s see how we can convert VHD to VHDX.

  1. You cant convert a disk which is in use, so make sure you don’t have any virtual machines accessing the disk.
  2. Next step is to open the Hyper-V VM settings, go to the hard drive you want to convert. After selecting the disk which you want to convert, confirm it again. After confirming press Edit button.
  3. Go to the Locate Disk tab and select or enter the name and location of the existing VHD file.
  4. Then select a Choose Action tab and select Convert option as shown in the screenshot below
    .
  5. 5. In next step as shown in the screenshot below select the VHDX file format and click Next
    .
  6. Next step is to choose a disk type the new disk should be fixed size or dynamically expanding. Press Next to select the name and location of the new VHDX file format.
  7. Review the configuration in Summary Tab. And to finish, it will start operation for creating new VHDX file. This makes an exact copy of VHD file format as a new VHDX file. Now you can mount the new VHDX disk to the Hyper-V VM.
  8. Once you are satisfied with the operation of new VM with the new VHDX disk, then you can safely delete old VHD disk.
  9. You can use the same process to convert VHDX to VHD as converting VHD to VHDX disk.

First, it’s important to note that while you can create and use both formats with Windows Server 2012/R2, VHDX files are not compatible with Windows Server 2008. Microsoft recommends that most Windows Server 2012/R2 users upgrade VHD files to VHDX to take advantage of these benefits. However, if you expect you might want to move a VM to a previous version of Windows Server or Azure, it could be easier to keep your VHD files.

It is important to note, that the VHDX format is not supported in Microsoft Azure.  Hopefully, that will change soon, ya, you Hyper-V & Azure Team……. because building Hybrid clouds with VHDX is the way to go   🙂

Until next time, Rob…

Leave a Reply

Your email address will not be published. Required fields are marked *