Todays post will show you how to use Windows Powershell to convert a VHD into a VHDX ?
The issue:
In this particular case, we have a Linux VM running on Windows that has gone over its original base size, we want to make this bigger but we are restricted by the 2tb limit.
We want to change the Linux machine to a Gen2 and use GPT rather than MBR, which will mitigate the 2tb disk limit, converting the disks to VHDX in the process.
Converting to the newer standard gives many benefits including:
Some of the VHDX improvements:
Support up to 64TB size
Supports larger block file size
Improved performance
Improved corruption resistance
The ability to add meta data
The resolution:
A nice and simple one, no converters needed, you can do with via Windows powershell!
To convert you can use this PowerShell command:
Convert-VHD OldVHD.vhd -VHDFormat VHDX -DestinationPath C:\Hyper-V\VHDs\NewVHDX.vhdx -DeleteSource
If needed for any reason, you can also change the VHDX back to a VHD using the following command:
Convert-VHD OldVHDX.vhdx -VHDFormat VHD -DestinationPath C:\temp\VHDs\NewVHD.vhd -DeleteSource
For any more help with converting VHD’s please see the official Microsoft page here for anything else, please feel free to get in touch.