How to convert VMWare (.vmdk) to Hyper-V (.vhdx)

Ever had a situation where you’re wanting to deploy a virtual machine on a Windows Operating System but only have it in a VMWare file format? There’s a quick command line utility to convert the file without compression.

The Utility – Microsoft Virtual Machine Converter 3.0

You will need to get the installer file for Microsoft Virtual Machine Converter 3.0 as we will be using this to do the conversion. You can find the download file here: https://www.microsoft.com/en-us/download/details.aspx?id=42497

Install the software and once done open up a PowerShell prompt and import it in:

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

Once imported use the following commands and replace where necessary to complete the conversion:

ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath D:\VMs\operatingsx.vmdk -VhdType DynamicHardDisk -VhdFormat vhdx -destination R:\VMs\converted\operatingsx

Job done.


4 Comments » for How to convert VMWare (.vmdk) to Hyper-V (.vhdx)
  1. dragos says:

    You are the best! You save my day!

  2. reza says:

    Hello

    Do you know if this works for vm guests with thin Harddisk? I used the tool they way you showed but got an error.
    I then used it for a vm with thick harddisk and it went through successfully

    Thank you!

  3. wsb says:

    ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath D:\Recordings\TcPCM_Demo\TcPCM Global VM-0-000002.vmdk -VhdType DynamicHardDisk -VhdFormat vhdx -destination D:\Recordings\OP

    Its not working for me.

    error

    ConvertTo-MvmcVirtualHardDisk : A positional parameter cannot be found that accepts argument ‘Global’.
    At line:1 char:1
    + ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath D:\Recordings\TcPCM_ …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [ConvertTo-MvmcVirtualHardDisk], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.Accelerators.Mvmc.Cmdlet.Commands.ConvertToMvmcVir
    tualHardDiskCommand

Leave a Reply to reza Cancel reply

Your email address will not be published. Required fields are marked *

*