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:

  • Download: http://www.microsoft.com/en-us/download/details.aspx?id=42497
  • Open Powershell as administrator and run Import-Module 'C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1'
  • And after ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath d:\scratch\vmx\VM-disk1.vmdk -VhdType DynamicHardDisk -VhdFormat vhdx -destination c:\vm-disk1

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Jan 23, 2019

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

Pete

@MiklerGM

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.