With Windows Server 2012 Microsoft released a new Virtual Disk Format called VHDX. VHDX improves the Virtual Disk in a lot of way.
Back in October I wrote a blog post on the improvements of the VHDX Format in the Windows Server 8 Developer Preview. Back then VHDX supported a size of 16TB, with the release of the Windows Server 8 Beta (Windows Server 2012 beta) the new Maximum size changed to 64TB.
Some of the VHDX improvements:
- Support up to 64TB size
- Supports larger block file size
- improved performance
- improved corruption resistance
- the possibility to add meta data
You can download the VHDX Format Specification.
To use this new features you have to convert your existing VHDs into the new VHDX format. You can this do in two different ways, with the Hyper-V Manager or with Windows PowerShell.
Convert VHD to VHDX via Windows PowerShell
To convert a VHD to a VHDX with Windows PowerShell you can use simple this PowerShell command:
Convert-VHD TestVHD.vhd -VHDFormat VHDX -DestinationPath C:\temp\VHDs\TestVHDX.vhdx -DeleteSource
Of course you can convert the VHDX back to a VHD using the following command:
Convert-VHD TestVHDX.vhdx -VHDFormat VHD -DestinationPath C:\temp\VHDs\TestVHD.vhd -DeleteSource
Convert VHD to VHDX via Hyper-V Manager
- Start the Hyper-V Manager and click on “Edit Disk…”
- Now select the VHD you want to convert
- Select “Convert”
- Select the target format in this case VHDX
- Select the new location for your new VHDX
- Check the summary and click finish
Same as with the PowerShell command, you can also convert a VHDX to a VHD. But you have to make sure that the VHDX is not bigger than 2TB.
Aviraj Ajgekar already did a post on this TechNet blog about how you can convert a VHD to VHDX via Hyper-V Manager.
Tags: convert, Hyper-V, Microsoft, PowerShell, VHD, VHDX, Windows Server, Windows Server 2012, Windows Server 8 Last modified: May 22, 2012
Hi Thomas,
Thanks for the page.
On my Win2012, the -VHDFormat option does not exist. It seems it takes the file extension to determine the format. You might want to correct your page.
BR,
Vincent
i have tried to convert my VHD file to an VHDX file but when i press finish it says:
the server encountered an error trying to edit the virtual disk.
the system failed to convert
C:\Temp\test2003server\test2003.vhd´: the process connot access the file because it is being used by another process. (0x80070020).
i have a sever 2012 instaled with hyper-v on and trying to convert a server 2003 vhd file to vhdx.
I have a large file called DCTemp.vhd, over 200GB.
I also have a file HBB_DC.vhdx, HBB_DC being the name of my Domain controller on a VM.
What is this DCTemp.vhd file, and how do I get rid of it, or should I?
Thanks
TIm