How To Convert a VMware vmkd Disk to a Hyper-V vhdx Disk

How To Convert a VMware vmkd Disk to a Hyper-V vhdx Disk

I have been using VMware off and on for years mostly to maintain environments for older version of BizTalk like BizTalk 2009 and BizTalk 2010. That said, I have been stuck using VMware version 9 because I did not want to keep paying the upgrade fees each year to get the latest version.  With my recent upgrade to Windows 10, my VMware 9 installation ran into some issues.  I was no longer able to connect to an internet connection inside the VM.  I decided the time was right to migrate to Hyper-V on Windows 10.

I found a lot of articles about converting vmkd files to a vhdx but they seemed to state you needed to use Microsoft Virtual Machine Converter witch in the GUI and in the online documentation talked about only supporting VMware Server products. 

The reality is Microsoft Virtual Machine Converter works for direct conversion of a single vmkd file into a vhdx.  The catch is you need to use the PowerShell command and not the GUI.

If you want to convert a single VMKD file into a VHDX file do the following:

  1. For each Virtual Machine you want to convert, first remove the VM Tool and do a full shutdown
  2. Remove VMware from your computer (if you install Hyper-V first you will run into un-installation issues with VMware.  You’ll have to edit the undeploy script to remove it)
  3. Enable Hyper-V Windows 10  
  4. Download and install Microsoft Virtual Machine Converter 3.0 (Link)
  5. Open PowerShell or PowerShell ISE as an Administrator
  6. Enter the following (update the paths and file names as needed):
    Import-Module "C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1"
    ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "D:\YourPathToVMKD\ZZZZ.vmdk" -DestinationLIteralPath "C:\PathToVHDX"
  7. This process will take about an hour for a 50 GB disk.  See the image below.
  8. Once complete, create a new Generation1 Hyper-V virtual machine using the newly created vhdx image

PS: While this post is targeted toward virtual machines running locally, at this point 90% of my virtual machines are hosted in Azure using BizTalk 2013 / BizTalk 2013 R2.  I only use virtual machines for maintaining legacy environments.

Hope this helps someone out!


Running a Windows Azure Virtual Machine Locally with Hyper-V or VMware 8 / VMware 9

This is a follow-up to my post and video on Creating a BizTalk 2010 R2 CTP Virtual Machine in Windows Azure. 

I hope most of you have reviewed my earlier posts on Creating a Windows Azure Virtual Machine running BizTalk Server 2010 R2 CTP. So now what?

You can create a Syspreped image of the Virtual Machine to be used over and over again to create new BizTalk instances. This would be very handy if you wanted to role this out to 20 new developers on a project (more detail on this here) with all the required software already installed.  These images show up under Virtual Machines – Images.

Another option is Windows Azure allows you to download the Virtual Machine to run locally in Hyper-V or VMware 8 (not tested this with the new VMware 9 but it should work as outlined below).  This could be useful to work locally on a plane or if you do not want to pay for bandwidth and operation costs for the Virtual Machine.  Just remember, once you run locally you lose some of the benefits of the cloud like using cloud computing resources and having VHD replication. 

The Virtual Hard Disk created for BizTalk 2010 R2 CTP is 50 GB.  When downloading this from your storage account, you will be charged (or counted against your quota) for the bandwidth.

CAUTION: With the free 3-month Trial of Windows Azure you only get 20 GB of region specific outbound bandwidth.  Downloading a VHD created in Azure will take 50 GB.  The download will complete (at least mine did) but soon after your account will be locked and you will need to either start paying for overages (note once you remove the spending limit cap you can not add it back) or wait until next month to keep using some Azure features.  Once I removed the spending limit, I was charged $1.45 for the 32 GB of overage. 

LICENSING: I am not even going to begin to speculate on the licensing terms of the Virtual Machine you download and run locally for Windows Azure.

Downing the VHD from Windows Azure

Here are the steps to download your VHD.

1.  Ensure you have everything you want installed and copied to your Virtual Machine.

2.  Shut down the Virtual Machine.

3.  Locate the VHD storage location and disk name used by the Virtual Machine you want to download.  Look under the Virtual Machine setting under Disks.

4.  You can also find the VHD’s under the storage account.  Drill down into the storage account created when you created the Virtual Machine.  Click on Containers.  You will see VHDS.  Drill down into this for a list of VHDs.  Make sure you know what disk you want to download if you have more than one.

5.  While under the Storage Account used by the Virtual Machine, click on Manage Keys on the bottom. 

6.  Use the key information to connect to the Storage Account using a client tool.  I used CloudXplorer by ClumsyLeaf software.  You will need the Storage Account Name and Primary or Secondary Access Key. 

7.  Below is the view from the client once you are connected to your Storage Account.

8.  Select the VHD you want to download and right-click.  Save to someplace you have 50 GB of free space.

9.  Wait, wait, and wait.  my downloads ran at 2.5 MB/sec. 

10.  Six hours or so later you will have your VHD locally.  Once you have the VHD, you can decide if you want to use it with Hyper-V or VMware 8+.

Using the VHD with Windows Hyper-V

Once you download the VHD, setting it up inside Hyper-V is as easy as adding the VHD to a new Virtual Machine.

1.  Create a new Virtual Machine using Hyper-V.  Select the amount of local RAM you want to use.

2.  On the Connect Virtual Hard Disk screen, select “use an Existing Virtual Hard Disk”.  Select the disk you downloaded.

3.  Click Finish.  It is that simple.  You are now running locally with Hyper-V.


Using the VHD with VMware 8

First off, I am by no means a VMware expert.  These are the steps I used to get the Windows Azure VHD to work inside VMware 8 but it is possible someone else has a better, simpler way to go about this. I will say, from my experience, the Virtual Machine experience in Hyper-V is much better than in VMware for VHD’s downloaded from Windows Azure.  I keep having screen re-sizing issues in VMware for some reason. 

The VHD downloaded from Windows Azure needs to be converted to VMware format, VMDK.  I used a tool called WinImage for this.  They offer a free 30-day evaluation. 

Once converted, simply setup a new Virtual Machine in VMware and select the newly converted disk.  Detailed steps are below.

1.  Open VMware 8 and select File, New Virtual Machine.  Select Custom (advanced) and click Next.

2.  Leave the default Hardware compatibility of Workstation 8.0 selected, click Next.

3.  Select “I will install the operation system later”.  Click Next.

4.  Select Microsoft Windows – Version Windows Server 2008 R2 x64.  Click Next.

5.  Name your Virtual Machine and set the Location.

6.  Select the number of Processors and Cores.  This will be based on your existing system resources.  Click Next.

7.  Select the amount of RAM, again based on your available system resources.  Click Next.

8.  Select your Network Type, I generally use NAT for running a local Virtual Machine.  Click Next.

9. Select LSI Logic SAS as the SCSI Controller.  Click Next.

10.  On select a disk, select “Use an existing virtual disk”.  Select the VHD you downloaded and converted from Windows Azure.  Click Next.

11.  Click Finish on the next screen. 

12.  Once you start the Virtual Machine, make sure you install the VMware Tools. 

Go from No Azure to BizTalk 2010 R2 CTP in Less Than 30 Minutes Video

Are you experienced with Microsoft Azure?  Have you tried the Free 90-Day trial?  Have you activated the Virtual Machine Preview Feature?  Are you up and running with BizTalk Server 2010 R2 CTP in an Azure Virtual Machine? 

If you answered NO to any of these questions then this video is for you!

If you are a BizTalk Developer and you are not using or looking at Microsoft Azure now is a great time to jump into what Azure has to offer! 

Why?  Because with the Azure Hosted Virtual Machines the days of downloading the right SQL version, Visual Studios version, CAB package, and other prerequisites are OVER!  All the time consuming work has been done for you.  All you need to do is select the BizTalk Gallery image and be on your way to running BizTalk in a dedicated. isolated environment.

This video is a follow up to my blog post yesterday on Setting Up BizTalk 2010 R2 CTP in an Azure Virtual Machine using the Gallery.

This video walks through the following:

  • Creating a new Azure 90-day Free Trial Account
  • Adding the Virtual Machine Preview Feature to your new account
  • Creating a new Virtual Machine running BizTalk Server 2010 R2 CTP
  • Downloading the Remote Desktop connection
  • Connecting and using the new Virtual Machine

Watch the video now on YouTube or see below for other play options.


Click below to live play the video in your browser or download the video.