Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking at transforming a VMDK hard drive into a VHD (Virtual Hard Drive). The VMDK comes from an export of our VMware machines and I want to try importing it into Azure.

Any idea how this would be achieved ? I tried a variety of small tools out there to try to move between the 2 formats, to no avail so far. Most tools declare the VMDK invalid in some way.

share|improve this question

migrated from Oct 5 '12 at 8:31

This question came from our site for professional and enthusiast programmers.

up vote 10 down vote accepted

The Microsoft Virtual Machine Converter (MVMC) includes the Microsoft Virtual Disk Converter tool (MVDC.exe) that converts a VMDK file to a VHD file.

MVDC SrcDisk  DstDisk  [/?]  [/Dyn]

SrcDisk  Specifies the source VMDK disk path to be converted.
DstDisk  Specifies the path for the converted disk.
[/?]     Show Help
[/Dyn]   Indicates the destination disk should be dynamic rather than fixed.

For example:

C:\Program Files (x86)\Microsoft Virtual Machine Converter Solution Accelerator>mvdc "D:\VM\Windows Server 2008 R2 x64\Windows Server 2008 R2 x64.vmdk" "D:\VM\Windows Server 2008 R2 x64\Windows Server 2008 R2 x64.vhd"
Step 1 of 3: Loading Source Disk...
Step 1 of 3: Loading Source Disk Completed.
Source file found of size 40.0 GB.
   Cylinders:        5221
   Tracks/Cylinder:  255
   Sectors/Track:    63
   Bytes/Sector:     512
   MediaType:        FixedMedia
Step 2 of 3: Creating Destination Disk...
Step 2 of 3: Creating Destination Disk Completed.
Destination file created of size 40.0 GB.
   Cylinders:        5221
   Tracks/Cylinder:  255
   Sectors/Track:    63
   Bytes/Sector:     512
   MediaType:        FixedMedia
Step 3 of 3: Copying raw data...
Step 3 of 3: Copying raw data completed.
Conversion Complete!  The converted file is located at: D:\VM\Windows Server 2008 R2 x64\Windows Server 2008 R2 x64.vhd

By default it creates a fixed sized VHD, which is also what is required for Azure VMs.

After converting it to VHD, it is a good idea to boot it up locally in Hyper-V, make sure it is configured for a dynamic IP and that RDP is enabled and you are able to successfully RDP into it. Then if you want to use it as a base image, you'll also need to generalize it with sysprep. If you want to use it for a single Azure VM, don't run sysprep, but upload it as a disk instead of as an image (Csupload Add-Disk instead of Add-PersistentVMImage).

See also:

share|improve this answer
I'll try it out again. I also don't have Hyper-V installed, is that step really required ? – Antoine Toulme Dec 8 '12 at 0:01

There has been an update to the tool to convert a .vmdk to a .vhdk.

Microsoft Virtual Machine Converter 2.0 was released around April of 2014.

Here is the link to the tool: Microsoft Virtual Machine Converter 2.0

The new tool changes the way to convert from using MVDC.exe to using a powershell cmdlet.

I followed this excellent blog to figure this out. What's new on Microsoft Virtual Machine Converter 2.0

Here is a detalied summary of how to do it.

The default install location is:

C:\Program Files\Microsoft Virtual Machine Converter

Using powershell as a local admin you can then load the cmdlet:

Import-Module .\MvmcCmdlet.psd1

After the cmdlet is loaded you can call the following:


This will ask for the .vmdk file path:

Supply values for the following parameters:

SourceLiteralPath: D:\some.vmdk

It will then start the conversion and place the .vhdk in the following path after its converted:

C:\Program Files\Microsoft Virtual Machine Converter

I hope this helps someone else.

share|improve this answer
Just tried and got an error: ConvertTo-MvmcVirtualHardDisk : The entry f49019ba is not a supported disk database entry for the descriptor. At line:1 char:1 + ConvertTo-MvmcVirtualHardDisk + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : WriteError: (Microsoft.Accel...nversionService:D riveConversionService) [ConvertTo-MvmcVirtualHardDisk], VmdkDescriptorPars eException + FullyQualifiedErrorId : DiskConversion,Microsoft.Accelerators.Mvmc.Cmdle t.Commands.ConvertToMvmcVirtualHardDiskCommand ConvertTo-MvmcVirtualHardDisk : One or more errors occurred. – Antoine Toulme Jul 22 '14 at 22:37
Based on the error it looks like something could be wrong with your source .vmdk. I just converted 2 other .vmdks with no issues. Here is one I just converted yesterday following those instructions. – ElvisLives Jul 23 '14 at 15:08
It might be the vmdk version we use is older and incompatible. I know it works well in VirtualBox and Fusion. – Antoine Toulme Jul 23 '14 at 18:46

I use VirtualBox (actually the CLI vboxmanage, installed with VirtualBox) for this, I had no issues installing VirtualBox alongside Hyper-V, but you can't run them at the same time, thats another thread!

Anyway at an elevated (Admin mode) prompt use

cd %programfiles%\Oracle\VirtualBox

vboxmanage clonehd "C:\tmp\file.vmdk" "C:\tmp\file.vhd" -format VHD

Note, You can extract a VMDK from an OVA with 7zip!

share|improve this answer

I have used the tool suggest by rkosegi and it did converted by VMDK to VHD and I could use locally. With regard to your "Invalid vmdk file" error, this could be specific to the VMDK you have as not everyone using this tool report same error.

Based on my experience on using converted VMDK on Windows azure, what I found is that not all VHDs which are converted from VMDK will work on Windows Azure. There were few problems reported after VHD was installed with Windows Azure Integrated components and deployed to Windows Azure.

So to get best experience, it would be best if you generate your OS VHD native and then deployed to Windows Azure. And if you start creating your native VHD directly, you will be sure that it will run on Windows Azure as expected.

share|improve this answer
Thanks for the help! I looked but it doesn't seem to be possible to create the VHD from vCenter. Would you happen to know how that would be done ? – Antoine Toulme Oct 3 '12 at 18:16
The "tool" link is broken. – Tarnay Kálmán Aug 15 '13 at 18:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.