Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@edeca
Copy link

edeca commented Jul 17, 2018

Modern VMDK files have a small descriptor file and separate data files. They will look like:

  • MyDisk.vmdk <- the descriptor
  • MyDisk-s001.vmdk, MyDisk-s002.vmdk etc. <- data files

In this case I simply needed to comment out the line:

#ddb.toolsInstallType = "4"

There was no need to use dsfo/dsfi tools to extract this from the disk. Tested on VMware Workstation 11.

@PeteNetLive
Copy link

PeteNetLive commented Jan 23, 2019

Agreed this is also true for ESX / vCenter
Conversion Error ‘Unsupported Disk Database Entry’

Pete

@MiklerGM
Copy link

MiklerGM commented May 13, 2019

You might want to comment more lines if you've got the error like this:

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

I solved mine by commenting more lines as it was proposed here

#ddb.uuid.image = "a04130d0-757c-40ae-8cc3-1edee81175ed"
#ddb.uuid.modification = "b2a87052-e73a-4921-bb84-f522111b78f9"
#ddb.uuid.parent = "00000000-0000-0000-0000-000000000000"
#ddb.uuid.parentmodification = "00000000-0000-0000-0000-000000000000"

@vlad-tsaryov
Copy link

vlad-tsaryov commented May 26, 2019

in my case it was enough to comment line ddb.nfcBlockTrack = "true"

# The Disk Data Base
#DDB

ddb.adapterType = "lsilogic"
ddb.deletable = "true"
ddb.geometry.cylinders = "5874"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.longContentID = "9f0f12ac184820322aedc4e852612eed"
#ddb.nfcBlockTrack = "true"
ddb.toolsVersion = "2147483647"
ddb.virtualHWVersion = "10"

@CNBarnes
Copy link

CNBarnes commented Jul 16, 2019

Thank you (everyone). This is exactly what I was looking for!

@CNBarnes
Copy link

CNBarnes commented Jul 16, 2019

Well... I spoke too soon. The converted .vhdx disk won't boot - it shows up as a MBR partition instead of a GPT. Any idea how this happened, or how to get it to be a GPT filesystem?

@yarick
Copy link

yarick commented Jul 24, 2019

Modern VMDK files have a small descriptor file and separate data files. They will look like:

  • MyDisk.vmdk <- the descriptor
  • MyDisk-s001.vmdk, MyDisk-s002.vmdk etc. <- data files

In this case I simply needed to comment out the line:

#ddb.toolsInstallType = "4"

There was no need to use dsfo/dsfi tools to extract this from the disk. Tested on VMware Workstation 11.

Thanks!

Here is what worked for me to convert from VmWare Fusion 11.1.0 on OSX

  • Comment Out
#ddb.toolsInstallType = "1"
  • Command Line
ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath '.\Virtual Disk.vmdk' -destination E:\VM\win10\win10.vdhx -VhdType DynamicHardDisk  -VhdFormat vhdx

@brady1408
Copy link

brady1408 commented Jun 20, 2020

If anyone comes here in the future and can't convert a disk due to a very generic

ConvertTo-MvmcVirtualHardDisk : Access to the path is denied.

This was caused by Sophos trying to prevent ransomware attacks, but Sophos did not trigger an alert it just silently killed the process.

Adding an exclusion for the folder C:\Program Files\Microsoft Virtual Machine Converter did the trick for me.

@xavery
Copy link

xavery commented Sep 24, 2020

The converter is no longer officially supported by Microsoft and the link available everywhere (download/details.aspx?id=42497) doesn't work anymore.
Fortunately, there's a Chocolatey package that contains a direct link to the installer. I mirrored it here.

@re-buurst
Copy link

re-buurst commented Sep 28, 2020

@xavery - thanks, you saved me today by hosting that package. I could not find it anywhere on the internet. All the links are 404

@rahilwazir
Copy link
Author

rahilwazir commented Sep 28, 2020

@xavery - Thanks, I have updated the Gist.

@LarryAnglin
Copy link

LarryAnglin commented Jan 25, 2021

Between steps 1 and 2 should be a step 'Run the downloaded installer'.

@bhavikgajera
Copy link

bhavikgajera commented May 26, 2021

Software download Link is not available http://download.microsoft.com/download/9/1/E/91E9F42C-3F1F-4AD9-92B7-8DD65DA3B0C2/mvmc_setup.msi

If you know other link then please update it.

@rahilwazir
Copy link
Author

rahilwazir commented May 26, 2021

@bhavikgajera the downloadable link is working fine.

@JonathanVQP
Copy link

JonathanVQP commented Jul 6, 2021

As of July 6, 2021, even with the MS Virtual Machine Converter, I could not convert my vmdx files to vhdx. I am using VMware Workstation 16 Pro (16.1.2 build-17966106).

@deathzombee
Copy link

deathzombee commented Jul 24, 2021

Software download Link is not available http://download.microsoft.com/download/9/1/E/91E9F42C-3F1F-4AD9-92B7-8DD65DA3B0C2/mvmc_setup.msi

If you know other link then please update it.

@bhavikgajera

in powershell run curl http://download.microsoft.com/download/9/1/E/91E9F42C-3F1F-4AD9-92B7-8DD65DA3B0C2/mvmc_setup.msi -o mvmc_setup.msi

@duli0810
Copy link

duli0810 commented Aug 27, 2021

@sukesh-ak
Copy link

sukesh-ak commented Aug 28, 2021

@duli0810
Copy link

duli0810 commented Aug 28, 2021

Use qemu and its easy single command-line for conversion.
https://cloudbase.it/qemu-img-windows/

Steps
https://gist.github.com/sukesh-ak/9a633c48ceefe9560b8f2eb5d8fcff72

Show, interesting.... did not know this method.
In reality it is similar to MVMC, with a single command after extracting the .ova

ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "" -VhdType DynamicHardDisk -VhdFormat vhdx -destination ""

With "qemu" does not generate the error "is not a supported disk database entry for the descriptor." ?

@sukesh-ak
Copy link

sukesh-ak commented Aug 28, 2021

Use qemu and its easy single command-line for conversion.
https://cloudbase.it/qemu-img-windows/
Steps
https://gist.github.com/sukesh-ak/9a633c48ceefe9560b8f2eb5d8fcff72

Show, interesting.... did not know this method.
In reality it is similar to MVMC, with a single command after extracting the .ova

ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "" -VhdType DynamicHardDisk -VhdFormat vhdx -destination ""

With "qemu" does not generate the error "is not a supported disk database entry for the descriptor." ?

No it worked smoothly.. no errors pretty straight forward command.

@sukesh-ak
Copy link

sukesh-ak commented Aug 28, 2021

This also works but due to some reason not working on Win11 after recent updates.
You can try on Win10, maybe it works there still.

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonehd --format vhd "disk001.vmdk" disk-OS-v2.vhd

@duli0810
Copy link

duli0810 commented Aug 28, 2021

This also works but due to some reason not working on Win11 after recent updates.
You can try on Win10, maybe it works there still.

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonehd --format vhd "disk001.vmdk" disk-OS-v2.vhd

Cool... I'll test it.... thanks sukesh-ak !

@sakar97
Copy link

sakar97 commented Sep 16, 2021

Hi, Does qemu delete all the VMware environment dependencies tools also while converting .vmdk to .vhd? or it cloned exactly the same file in a different format?

@sukesh-ak
Copy link

sukesh-ak commented Sep 16, 2021

Hi, Does qemu delete all the VMware environment dependencies tools also while converting .vmdk to .vhd? or it cloned exactly the same file in a different format?

Just converted the disk file format to new format. That's all.

@sukesh-ak
Copy link

sukesh-ak commented Sep 16, 2021

@MathBernier
Copy link

MathBernier commented Oct 24, 2021

I was looking forward for a straight solution, that did the trick! Thank you!

@GUTIERRES-RS
Copy link

GUTIERRES-RS commented Feb 16, 2022

For me it worked like this:

STEP 1 - Download and Install: http://download.microsoft.com/download/9/1/E/91E9F42C-3F1F-4AD9-92B7-8DD65DA3B0C2/mvmc_setup.msi

STEP 2 - Run power shell as administrator.

STEP 3 - PS> Import-Module 'C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1'

STEP 4 - PS> ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "D:\Virtual Machines\Windows 10 x64\Windows 10 x64.vmdk" -VhdType DynamicHardDisk -VhdFormat vhdx -destination "D:\Virtual Machines\Windows 10 x64\Windows 10 x64.vhdx"

Don't forget to check the syntax of commands and punctuation etc... And enjoy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment