Skip to content

Instantly share code, notes, and snippets.

@mcxiaoke
Forked from rahilwazir/vmdk_vhdx.md
Created December 8, 2022 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcxiaoke/fe48d7c4529efd5b1bf6a30e18e410b6 to your computer and use it in GitHub Desktop.
Save mcxiaoke/fe48d7c4529efd5b1bf6a30e18e410b6 to your computer and use it in GitHub Desktop.
Convert VMWare to Hyper-V (vmdk to vhdx)

VMDK to VHDX

Follow steps:

If you counter following error:

ConvertTo-MvmcVirtualHardDisk : The entry 1 is not a supported disk database entry for the descriptor.

In my case it was entry 4

Follow these steps:

  1. download and extract dsfok tools
  2. use dsfo.exe "c:\temp\disk2.vmdk" 512 1024 descriptor1.txt to extract the descriptor
  3. edit the descriptor file in Notepad++: comment the above mentioned line (as I added the extra single character (#) I also deleted one NULL character from the end to keep the file size of 1024 bytes (not sure if this is needed).
  4. use dsfi.exe "c:\temp\disk2.vmdk" 512 1024 descriptor1.txt to inject the descriptor back into the VMDK
  5. repeat these steps for the other disk (my VM has two .vmdk files)
  6. reissue the ConvertTo-MvmcVirtualHardDisk command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment