Sunday 4 May 2014

Converting a VMDK to VHD

Windows 8.1 Pro offers Hyper-V, used for running virtual machines. But what if your existing machines are VMWare VMs?

Luckily, there is a convenient tool from Microsoft that can be used to convert machines from VMWare to Hyper-V: Microsoft Virtual Machine Converter. The newest version was released only recently. Using it is also relatively easy, and here is a quick guide.

MVMC supports both online and offline conversions. To perform an offline conversion of the VMDK, which I did, first make sure that the VM is turned off properly (not in a saved or suspended state). Then, using PowerShell as administrator, run the following commands:

import-module "[installation directory of MVMC]\mvmccmdlet.psd1"
convertto-mvmcvirtualharddisk -sourceliteralpath "[source vmdk path]\mydisk.vmdk" -destinationliteralpath "[destination path]\" -vhdformat vhd -vhdtype fixedharddisk


Valid parameters for -vhdformat are vhd and vhdx, whereas for -vhdtype it's fixedharddisk and dynamicharddisk.

The converted disk will be slightly larger. Also, for licensed software such as Windows OS, they have to be reactivated. There doesn't seem to be a way to avoid this, changing the BIOS didn't seem to work either.

I didn't try out the online conversion as I don't have access to VMWare servers at home.

No comments:

Post a Comment