This article explains how to convert VHD to VHDX, or VHDX to VHD in Hyper-V Manager. Windows Server 2012 Client and Windows Server 2022 Hyper-V onward VHDX is the new and default format of the Hyper-V VHD virtual hard disk.
The VHDX files can be used for virtualization with Windows Server 2012 and Windows 8. You might be wondering what to do with your old VHD files now that you want to use the new features of VHDX.
Yes, Microsoft has a solution for this issue as well. You can change your VHD file to a VHDX file. So, you’ll be able to use all of the VHDX file format’s features. But the most important question is how to convert a VHD file to a VHDX file.
Table of Contents
Convert VHD to VHDX
Using Hyper-V Manager
Using PowerShell
Convert VHD to VHDX via Hyper-V Manager
The Hyper-V team has presented an easy way to convert existing VHDs into VHDX via Hyper-V Manager
Open Hyper-V Manager, select Hyper-V server (HYPERV22-01), and then right-click on a VM (virtual machine) whose disk you wish to convert from VHD to VHDX and choose settings.

In the virtual machine properties, click on the disk you want to convert, and then click on the edit button.

Edit the virtual hard disk wizard. Locate the virtual hard disk and choose Next.

Convert vhd to vhds, choose action to convert, and then select next.

Select the box for VHDX format, and then choose Next.

Choose the virtual disk type you wish to convert, and then choose Next.

Select the directory where you wish to save the name of the new converted VHDX file, and then click next.

Review the virtual hard disk summary and then choose the finish.

The VHD conversion will take time based on the virtual disk size and storage.

How to Import VHDX to Hyper V
Now open the virtual machine settings and replace the virtual hard disk with the VHDX. Click on the browse button and go to the location of the newly created VHDX disk.

Select your VHDX disk to open.

After choosing the VHDX disk, click Apply or OK to start and test the virtual machine.

Convert VHD to VHDX via PowerShell Command
You can use the Windows PowerShell command to convert VHD to VHDX.
Convert-VHD –Path “Source vhd file” –DestinationPath “Destination vhdx file”
Example
Convert-VHD –Path C:\ClusterStorage\Volume1\VHD\SRVdisk.vhd –DestinationPath C:\ClusterStorage\Volume1\VHD\SRVdisk.vhdx

Start converting the virtual disk.

Change the Disk Physical Sector Size
The virtual machine (VHDx) supports 4 K blocks; after completing the VHD conversion, the default block size of 512 will not change. We need to change it manually. Follow the steps below to check the converted disk sector size and how to modify it to 4K.
Check the Disk Sector Size
Get-vhd “VHDX File Name with Location”
Example
Get-VHD –Path “C:\ClusterStorage\Volume1\VHDX\SRVdisk.vhdx"

Set the Disk Sector Size
set-vhd “VHDX File Name with Location” -PhysicalSectorSizeBytes 4096
Set-vhd –Path "C:\ClusterStorage\Volume1\VHDX\SRVdisk.vhdx” -PhysicalSectorSizeBytes 4096

Refer to this article to find out more about converting VHD to VHDX.
Refer to this article to learn: how to Convert VMDK to VHDX With StarWind V2V