I have used VMWare for a long, long time. I have development environments going back to the dark ages of .NET, long before there was a Hyper-V and long after Microsoft killed off Virtual PC. So, I have a LOT of virtual hard drives (VHDK) files in VMWare format.
Recently, I got a new Surface Pro 4 and decided now was the time I am going to make the switch to Hyper-V. But like hell was I going to rebuild all my machines. I looked on the web and found a ton of references on converting from VHDK to VHD, but not to VHDX. So, I came up with a two step process that I will discuss here.
To start, you need to have VirtualBox: https://www.virtualbox.org/wiki/Downloads
Next, you need to convert from VMWare VHDK format to VHD format. You can do this with the following command which I placed in a BAT file to make the process easier:
“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” clonehd –format vhd “%1” “%2”
NOTE: Above, %1 is the full path and filename to the VHDK file, and %2 is the full path and filename of the VDH.
Finally, you need to convert the file from VHD to VDHX and luckily, Hyper-V Manager will do this for you. You just perform these steps:
- Open Hyper-V Manager
- Select Edit Disk on the right hand task pane.
- Select Next, then browse/enter the path to the VHD and click Next.
- Click Convert and click Next.
- Select VHDX and click Next
- Select the type of disk you want and click Next.
- Then specify the output file name and click Finish.
NOTE: Once you have performed a conversion like this you CANNOT create a 2nd Generation Hyper-V VM. You can only use this disk in a 1st Generation Hyper-V VM. The only way to use in Gen2 is to migrate it – not an easy task.