How to Convert VMware VMDK to VHD File for Microsoft Hyper-V and Azure

If you are testing or migrating virtual machines from VMware to the Hyper-v virtualization platform, then this post will be helpful to convert VMDK files to VHD. Hyper-V can’t read the VMDK file which belongs to VMware products such as VMware workstation, VM player and their hypervisor server VMware ESXi.

I will be showing two methods to convert VMDK to VHD. There could be many occasions why you need this conversion, but here are a few possible reasons.

  1. You are migrating your existing virtual machines from VMware to Hyper-V
  2. Migrating existing on-premise VMware virtual machines to Azure Microsoft cloud platform manually. In this case, you need to convert the VMDK files to VHD and then upload them to the Azure cloud.
  3. For any testing purpose.

Two Methods (VMDK to VHD)

1) Method 1: Using StarWind V2V Converter

It works well with the StarWind V2V image converter. I’m showing this process on my old Windows 7 32-bit host computer. My Guest VM is also Windows 7, so don’t confuse.

Before starting the process, make sure to complete these two steps.

a) Remove VMware Tools from Guest OS.

If you start the conversion with VMware tools, then the virtual machine may face booting issues in Hyper-V/Azure. Uninstall the VMware tools from the control panel if it is Windows OS. Do the similar step for other guest Operating systems also.

b) Remove Snapshots

As you are aware, VMware keeps each snapshot separately from the original hard disk VMDK file. If you convert the main original disk file, then you will get an older state of VM. The current version of VM could be working from a different snapshot file.  Therefore, you have to merge snapshot files with the main file by deleting snapshots (Deleting snapshots from VMware console will automatically merge the current state to the main single file).

Steps with StarWind:

1) Download the StarWind V2V image converter from the official site. Registration required.

2) Install the software and open it.

3) Press Next and browse the source file. The source file should be the single VMDK file which has the current virtual machine state. Also, the virtual machine should be powered off.

Browse VMDK file

It automatically detects the file type and size as shown above.

4) Select the output virtual disk file format. Here I selected MS Virtual PC growable image type. It is like a dynamic VHD file. Always better to select a growable type if you are concerned about disk space.

Output File - VMDK to VHD

5) Next is the destination location. Make sure that there is enough space available for conversion.

6) Start the process. Starwind V2V tool works fast and well in most cases. It took around 9 minutes to convert the 7.5GB VMDK file on my computer.

VHD file from VMDK

7) Now, create a new virtual machine and select the correct OS version in Hyper-V or Azure. Instead of selecting a new blank virtual disk file, attach the existing file that was converted from VMDK to VHD in the earlier step.

Start the Virtual Machine. The below screenshot shows how I attached the file to the older version of VirtualPC. It is applicable for Hyper-V on Windows 10 or any Windows servers.

Attach file to Hyper-V

8) Since both platforms (VMware & Hyper-V) are different, Windows guest OS will install the required drivers and patches automatically. Let the installation finish. Restart the guest VM if required.

9) That’s it; you will get a fully functional virtual machine on  Hyper-V which was converted from VMware. Install Hyper-V guest additions and start using.

Working VMs

The above screen shows the same Windows 7 guest OS in VMware player and Virtual PC. Hardly it took 15 minutes to complete this conversion with the handy StarWind V2V tool.

2) Method 2: Microsoft Virtual Machine Converter 3.0 and PowerShell

Microsoft Virtual Machine Converter is a handy tool to perform Virtual2Virtual (V2V) conversion on the Windows platform. It converts most of the virtual hard disk formats to VHD or VHDX to support Hyper-V and Azure. We will use the same tool with a few PowerShell commands in this case.

a) Download Microsoft Virtual Machine Converter from the official site here and install it.

b) Once the installation is completed, open the PowerShell as administrator and execute the following command to import the relevant module.

 Import-Module “C:\Program Files\Microsoft Virtual Machine Converter\mvmcCmdlet.psd1” 

c) Once the module is imported successfully, run the following command.

 PS C:\>ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath D:\VMNAME\VMOSNAME.vmdk -VhdType DynamicHardDisk -VhdFormat vhdx -destination D:\NEWVHD\ 

Understand the location of the source file VMDK and the output location of the VHDX file. You need to change them according to your situation.

d) After the successful VHDX conversion, you can follow the same steps mentioned earlier to create a new VM and attach this converted disk.

NOTE: The Microsoft Virtual Machine converter is being retired. If you find the downloadable file somewhere, you can still use the above steps. Microsoft is recommending their System Center Virtual Machine Manager to convert the VMware virtual machines to Hyper-V.

With the updates and improvements of the Starwind V2V converter, this tool remains the top option to convert VMDK to VHD or VHDX in Windows OS.

If any of the above solutions did not fix the Windows PC issues, we recommend downloading the below PC repair tool to identify and solve any PC Issues.

Dinesh is the founder of Sysprobs and written more than 400 articles. Enthusiast in Microsoft and cloud technologies with more than 15 years of IT experience.

4 thoughts on “How to Convert VMware VMDK to VHD File for Microsoft Hyper-V and Azure”

  1. I tried this – it seemed to convert the VMDK file to a VHD just fine – but when I loaded it into Virtual PC, pointed to the converted virtual disk – my windows 2008 machine does not start???

    • @Steve,
      Whats the error you are getting? Is it full black or blue screen error?
      May be you have to insert the installation DVD and run a repair since its a server OS.

  2. It is a full black screen. It seems like the machine posts – one time I even got the “boot from last known good configuration” screen.. but once I get past that – it is a full black screen. No error. Nothing shows.

    I have even left it up and running for 30 minutes to see…

Comments are closed.