I believe in Hyper-V!

Convert VHD to VHDX with Hyper-V manager in Windows 8

After few turbulent weeks and rehabilitation I finally have a time to write blog post. For the beginning of “my new life” and my second birthday this will be an “light” post Winking smile. For those how don’t know, before eleven days ago I had two heart attacks in one day, luckily without injuries.

So, let’s begin. In this blog post I would like to explain how to convert .vhd to .vhdx with Hyper-V manager in Windows 8.

First, few things about what is .vhdx I what benefits we get.
VHDX is new virtual hard disk format in WS 2012 and Windows 8. In many ways, VHDX disks offer superior performance, capacity and reliability over Hyper-V’s legacy Virtual Hard Disks.
With the VHDX format we able to create much larger virtual hard disks. Old Hyper-V had a 2 TB limit to VHD’s, but VHDX files have up to a 64 TB capacity. Also, protection against data corruption during power failures my logging updates to the VHDX metadata structures as well as improved alignment of the virtual hard disk format to work well on large sector disks.
The VHDX format also provides the few more features such as; large block sizes for dynamic and differencing disks, which allows these disks to attune to the needs of the workload. The ability to store custom metadata about the file that the user might want to record, like operating system version or patches applied, and so on…

Many of us have virtual machines created with old Hyper-V and if we want to use the new features, we need convert .vhd to .vhdx.
How to do that? This is very simple process and we have two ways to doing that. Over Hyper-V manager GUI and with PowerShell.

Convert .vhd to .vhdx with Hyper-V manager GUI:

Step 1.

1

Step 2.
2

Step 3.
3

Step 4.
4

Step 5.
5

Step 6.
6

Step 7.
7

And after few simple steps we have converted .vhdx.

8

Convert .vhd to .vhdx with PoweShell:

If you prefer PowerShell follow this few steps. Open PowerShell as Administrator and enter few commands like in pictures below.

12
13
14

Enjoy in the new .vhdx features and benefits.

NOTE: You can convert a VHDX to a VHD. But keep in mind and make sure that the VHDX is not bigger than 2TB.

Also, keep in mind that the virtual hard disk will be unavailable during the conversion process. It will create a new virtual hard disk file and delete the old one. As such, you will need enough physical disk space to temporarily accommodate two copies of the virtual hard disk that you are converting.

You can read more about how to convert VHD to VHDX on the links below

Aviraj Ajgekar
Thomas Maurer

Quote from the Petri by Aidan Finn (http://www.petri.co.il/convert-vhd-file-into-vhdx-file.htm#)

“There is one more step that you might consider: When you create a new VHDX file (not converted) it has a physical sector size of 4 K. A converted VHDX file has a physical sector size of 512 Bytes. You can change the physical sector size of a converted VHDX by running this piece of PowerShell before you power up the virtual machine:

set-vhd d:\VM01\Disk0.vhdx -PhysicalSectorSizeBytes 4096

Now you have a virtual machine that is using the best kind of virtual machine storage, the VHDX format virtual hard disk.”

 

Enjoy in Virtualization Smile

11 Responses to “Convert VHD to VHDX with Hyper-V manager in Windows 8

  1. Nice article. I don’t understand the Note at the end. “make sure the vhdx is not bigger than 2TB”? Why not? That is one of the key reasons to switch nest pas?

    • Hi,
      Sorry on my late respone. If you want from any reason convert vhdx to vhd your disk can’t be larger than 2TB because .vhd can be only 2TB.

  2. Gregor

    Really enjoyed this! Well done!

  3. Russ

    OK, I appreciate the info, but how do I do this from RSAT in Windows 7. I have just upgraded my Hyper-V server to 2012 and finally have the Raid5 array that I want, but cannot convert my VHD to VHDX so that I can move them to the Raid(it is larger than 2 Gig.

    • Hi Russel,
      You can’t convert .vhd to .vhdx with RSAT for W7! You can do that with Hyper-V 3.0 Manager or with PowerShell.

  4. daniel

    Useful post
    I am not sure If I used the correct approach but I used the Edit disk option in Windows 8 Hyper-v manger and then performed the convert a bootable vhd to the new fixed vhdx format. THis was successful. Now I want open my new vhdx as I do with my exsitngt virtual machines.. Is there a way to recreate the vm sub-directory structure and hence, allow me to connect from the mangaer or access via rdp.

  5. daniel

    Doh…. reread your post and guessed I might have to create new virtual machine with the newly converted vhdx – now done. Thanks and good luck with your rehabilitation .

  6. Hi, just wanted to say i liked this article. it was practical. keep on posting.

  7. Gonzalo

    Hi Romeo,

    I was wondering if you can help me. I have to convert a vhdx to vhd in order to be able to replicate it using azure. Ive tried both powershell and GUI with always the same resault, after the conversión process I start the new vm and got the black screen with the message Non-system disk or disk error. Replace and … Press any key to restart … Any suggestions?

  8. Sumit

    Nice Article.
    It was helpful to run the VHD downloaded as a evaluation copy into VHDX.

Leave a Reply to Gregor Cancel reply

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