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

If you are testing or migrating virtual machines from VMware to 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 reasons why you need this conversion, but here are the 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 then upload to Azure cloud.
  3. For any testing purpose.

Two Methods (VMDK to VHD)

1) Method 1: Using StarWind V2V Converter

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

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

a) Remove VMware Tools from Guest.

If you start the conversion with VMware tools, then the VM may face booting issues in Hyper-V. Uninstall VMware tools from the control panel if it is Windows OS. Do this 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 older state of VM. The current version of VM may 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 for VMDK to VHD

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

2) Install the software and open.

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

Browse VMDK file

It automatically detects the file type and size (disk size, not the actual file size).

4) Select virtual disk file format. Here I selected MS Virtual growable image type. It is like a dynamic VHD file. Always better to select growable type if you worry 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) Click Next to start. Starwind V2V is really cool with these steps and fast too. 7.5GB VMDK file converted to VHD in 9 Minutes on my computer. No headache with commands and scripts.

VHD file

7) Now, create a new virtual machine and select the correct OS version in Hyper-V or Azure. Instead of creating a new black virtual disk file, attach the existing file which was converted from VMDK to VHD. Start the Virtual Machine. Below example 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 are different, Windows guest OS will install the required drivers and patches automatically. Let the installation finish, and restart guest VM if required.

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

Working VM

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 handy StarWind V2V tool.

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

Microsoft Virtual Machine Converter is a handy tool to make Virtual2Virtual (V2V) conversion in 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 completed, open the PowerShell as administrator and execute the following command to import relevant module.

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

c) Once the module imported successfully, execute the following command.

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

Note down the VMDK file location and output location of the VHDX file. You need to change 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.

I hope the above two methods are helpful to convert VMDK file to VHD or VHDX in Windows OS.

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 “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.

Pin It on Pinterest