Convert VMDK to VHD(x)
(2026-07-07)
Problem
I have a .ova file that I need to import into Hyper-V. Yadda yadda yadda, I have a .vmdk disk image that I need to convert to .vhd or .vhdx so Hyper-V will inhale it.
Solution
qemu-img for Windows:
PS> qemu-img.exe convert source.img -O vhdx -o subformat=dynamic dest.vhdx
Much More Tedious And Involved Messing Around
Install MVMC
Powershell as administrator:
PS> Import-Module "C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1"
PS> ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath C:\temp\disk.vmdk -DestinationLiteralPath C:\temp\disk.vhdx -VhdType DynamicHardDisk -VhdFormat vhdx
If you get errors, you need dsfok (I couldn't find the authoritative home/source for this, I got my copy from this page)
PS> .\dsfo c:\temp\disk.vmdk 512 1024 descriptor.txt
Edit the file, commenting out the lines that are offending (look at the error message) by replacing the first character of the relevant like with # -- it is important that descriptor.txt remains the same length after your edit as it was before
PS> .\dsfi c:\temp\disk.vmdk 512 1024 descriptor.txt
Now you can try the ConvertTo-MvmcVirtualHardDisk again.
I had issues where I had to iterate, but for some reason powershell itself was holding a file handle to the .vmdk and so dsfi couldn't write to it.
Also
Note that if your disk is for an IDE disk, you can't attach it to a Hyper-V V2 VM because by default the disk controller is SCSI.