![](/uploads/1/2/5/3/125363544/564034664.jpg)
You'll need to export the vmdk from the VMFS file system, and use that with the.vmx from your VM (in ESX). Find the.vmx of your VM (in ESX).
I use a MacBook Pro in the field daily and find myself needing to spin-up some home-brewed Windows and Linux virtual machines quickly. To accomplish this, I prefer to build and maintain several VM’s utilizing VMware Fusion Pro on my Mac. Granted; VMware Fusion is “I believe” an inferior product to it’s nearest competition, especially when it comes to connecting to and uploading VM’s directly to multiple VMware vSphere server environments. It does have a major shortfall I recently ran into: there is no ability to easily convert VMware VMDK files into Hyper-V VHD’s.
Typically, I find myself doing most of my conversions directly from physical hosts (P2V) or from Hyper-V host to VMware ESXi hosts. We do however have a few clients that use Hyper-V in their environments and luckily, Microsoft does have a utility for easily converting VMware virtual guest OS directly from your vSphere environment, or in my situation, from a VMware Fusion VMDK file to a Hyper-V VHD file.
- First you will need to download and install Microsoft Virtual Machine Converter 3.0 from Microsoft’s website.
- Next, open an elevated PowerShell prompt and run these command (changing the paths to match your source VMDK file and destination path of your new VHD file):
- Import-Module ‘C:Program FilesMicrosoft Virtual Machine ConverterMvmcCmdlet.psd1’
- ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath “C:Ubuntu-disk1.vmdk” -DestinationLiteralPath “C:Ubuntu-disk1.vhd” -VhdType FixedHardDisk -VhdFormat Vhd
![Vmdk Vmdk](http://docs.trendmicro.com/all/ent/dd/v3.0/en-us/dd_3.0_olh/deepdiscovery/customsandbox/1-vmware-convert2.gif)
Then head over to your Hyper-V host and create a new virtual machine. When you get to the step “Connect Virtual Hard Disk” choose “Use an existing virtual hard disk” radio button and browse for the VHD file you just created.
Lastly fire-up your new Hyper-V virtual machine and hopefully all is good. I hope you found this information helpful and thank you for reading!
This article was created based on the following setup:
- Mac OS X 10.11.3/VMware Fusion 8.1 (source virtual host)
- Ubuntu Server 14.04 LTS 64-bit (source virtual machine)
- Windows 10 64-bit/PowerShell 5.0 (used to perform VMDK to VHD conversion)
- Windows Server 2012 R2 Hyper-V (destination virtual host)
Related articles
![Filestream Filestream](http://thesolving.com/wp-content/uploads/2015/04/How-to-convert-a-VMware-Workstation-VM-into-an-ESXi-one-with-vCenter-Converter-02.png)
A customer, who is a VMWare shop, gave me a VMDK file of one of their VMs for development purposes. I don’t have VMWare, but I do have Hyper-V on my dev boxes, so I needed to convert the VMDK virtual disk to a format I could connect to a Hyper-V VM.
Microsoft offers a VMWare VM conversion kit: http://www.microsoft.com/en-us/download/details.aspx?id=42497
The link above has a System Requirements section, please ensure your environment meets them before using the kit.
The kit has several pieces to help you convert a VMWare disk to a Hyper-V (or an Azure IaaS) VM compatible VHD format. There is a nice GUI wizard that will connect to the VMWare host, connect to a Hyper-V host, and convert the machine right across live.
In my case though, I just had the VMDK given to me by the customer. For this type of task, the kit has a whole set of PowerShell commands in a module. To get access to the commands in a PowerShell session, you need to import the module that defines them. Assuming the default kit install directory, you can use this command to import the module from a PowerShell command prompt:
Import-Module 'C:Program FilesMicrosoft Virtual Machine ConverterMvmcCmdlet.psd1'
With the module imported, several PowerShell commands are made available to perform all kinds of conversion tasks. I used the below command to convert the VMWare VMDK files to VHD. Note that you’ll need to use your own directories and file names for the –SourceLiteralPath and –Destination arguments.
ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath d:scratchvmxVM-disk1.vmdk -VhdType DynamicHardDisk -VhdFormat vhdx -destination c:vm-disk1
Something to keep in your back pocket should you ever hit this situation.
I have also heard good reports about this tool from Starwind
I have also heard good reports about this tool from Starwind
![](/uploads/1/2/5/3/125363544/564034664.jpg)