VMware VMDK to Hyper-V VHDX from OVA/OVF

Why Scott? Why?

Why not just use VMware Workstation or ESXi? In this use case it was 50% laziness,  as I had just reinstalled the laptop and would need to install VMware Workstation and 50% just to play with Hyper-V. This wasn’t something production. I just wanted a quick WordPress lab environment that I could wipe out when I was done. I didn’t want to install VMware Workstation, spin up a VM, and install & configure WordPress. Enter the laziness part. Enter Bitnami.

Bitnami

Cloud hosting for applications and virtual machines. Their virtual machines are also downloadable to give you a quick preconfigured environment for what ever you need.

blogbitnami

WordPress

So I quickly clicked on the WordPress Blog link. You have options to deploy to a cloud provider, a container, or download for local install. Below the download link there is a link to download the virtual machine image.

blogwordpressbitnami

The instructions are for VMware and VirtualBox deployments and the download is an OVA file, which is just Zipped up OVF and disks.

OVA

So being entirely to lazy to search and look around for a WordPress Hyper-V image. I decide to search and look around for a way to convert the VM to Hyper-V. First I extracted the OVA with 7-Zip.

blogova7zip

VMDK

The file of interested is the vmdk file, which is the disk for the virtual machine. I need to convert the vmdk file in to a vhdx file that Hyper-V would understand.

MVMC

Besides this being an acronym fest, turns out that I needed Microsoft Virtual Machine Converter 3.0. Last updated in 2014, I held little hope this would work with any modern created VM, but in this instance, it did!

Powershell

I found a great reference post at the OpenIT Integrated Business Solutions blogOpenIT Integrated Business Solutions blog will walk you through all the steps. Great article guys! Their Powershell code below worked great.

# Import the Converter Powershell Module
Import-Module "C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1"
# Convert the VMware .vmdk to a Hyper-V .vhdx
ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "D:\Debian8\Debian8-disk1.vmdk" -DestinationLiteralPath "D:\Debian8.vhdx" -VhdType DynamicHardDisk -VhdFormat Vhdx

Hyper-V

After it successfully converting the disk, I created a Gen1 VM in Hyper-V and pointed it to the converted disk. Up and running with little fuss.

I had to document this down. I’ve needed it before and I’m sure I’ll need it again.

Thanks,

Scott Bollinger / kfalconspbbollingerusa.com