How to Convert Vmware Virtual Machine to HYPER-V
Virtualization is a great way to extend the utilization of hardware one's organization.Most of the companies today has virtualize their enviroment with Vmware, HYPERV or other product. But what happened if for your reasons must convert your Vmware Enviroment in HYPER-V or a specific task required to convert only one vmware client in HYPERV ?Previous month i face an issue that required to convert my Domain Controler from Vmware to HYPER-V. The reason was that i didin't have a Vmware Lab in different network to copy my Domain Controler but already i have configure a HYPERV Server as Test Enviroment. So i decide to convert my Vmware Client in HYPER-V. I start my research and i found the Microsoft Virtual Converter tool.
<< I am not here to say that Microsoft is better than any other converting tool. But it's true that i prefer to work with tools from the same Company rather than a third company. If my task was to convert a HYPER-V client to Vmware i will try to found a tool from Vmware first. >>
Let's start step by step to explain how can do it.
- Download the Microsoft Virtual Machine Converter from
- Start the installation and follow the wizard with the default options.
- When finish the installation you can start the Application but today we will use Powershell Script to convert a VM from Vmware in HYPER-V.
The reason is that we willn't proceed with the migration of all Vmware Enviroment (ESX) but will convert only one VM.With a GUI Enviroment of Micorosft Virtual Machine Converter you can proceed only if you have vCenter Server,ESX or ESXI.So you can't convert on that wayat this time but we can procedd with CLI to convert virtual hard disk and create the new VM.
Convert Virtual Disk of Vmware(vmdk) to HYPER-V Disk(vhd)
- Restore your Virtual Machine from a Backup or Shutdown your VMWARE Client and copy the VM in different location.
It prefers to copy in the Server that you will use for HYPER-V.
- Open a Powershell as an Administrator
- Import the MVMC module with the following command.
Import-Module "C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1"
- Prepare the source path with vmdk disk of vmware and the destination path.
- Type the following comand to start the convertion
ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "C:\Users\user\Documents\temp\vm\pgdc.vmdk" -DestinationLiteralPath "C:\Users\Public\Documents\Hyper-V\Virtual hard disks\pgdc" -VhdType DynamicHardDisk -VhdFormat Vhd.
- Following is the standard command that you can use
SourceLiteralPath = It is the path with the vmdk file.
DestinationLiteralPath = It is the path for the new vhd disk..
VhdType =You can use FixedHarddisk OR DynamicHarddisk.
VhdFormat = the format of disk vhd or vhdx.
- Base on the size of VM it will take the necessary time to finish.
- When conversion complete you will getan outpute as follow.
Attach the converted VHD file in HYPER-V
- After finish the conversion open the Destination path and you will see a new file with the vhdx extension .
- Open the HYPER-V Manager
- Go in the right Pane Actions and click New - - >Virtual Machine
- You will open a new a Wizard to follow the steps.
- In the first Screen just click Next.
- Specify the Virtual Machine Name like Windows 7 or VM1. This is your decision.
If you want to store Virtual Machine in different Partition you must check in Store virtual machine in a different location.
For my Virtual Machines i have create a different partition in my Disk. So when create a new Virtual Machine i change the Default Path.
- Click Next.
- In this step leave the default options and click Next.
- Here assign the memory that you want to take Virtual Machine from your Physical PC. Be carefull to give RAM that can support your Physical Machine. Do your calculations, type the number and Click Next.
- Click in Drop Down List and select the New Virtual Switch or Not Connection if you don't have LAN or you don't want to connect your Virtual Machine in LAN.
- Select Use an existing virtual hard disk. Click Browse and select the converted virtual hard disk.
- Click Next.
- Click Finish.
- Double click in New Virtual Machine.
- Click in Power on Button to Start.
- It will take more time to boot only for the first time.
We converted a Vmware Client into HYPER-V. I will continue in my next articles with Conversion of HYPER-V to Vmware Client.
I hope to find intresting my article. Read and enjoy my article!!
Don't hesitate to do any comment her in Google+ or Facebook or send me an email in firstname.lastname@example.org. I will be there to discuss it.
Have a nice weekend!!