Let's Start step-by-step to explain how we 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 open PowerShell as an Administrator. There are two ways to convert a VM from VMware in Hyper-V, one is through GUI, and the second is through PowerShell Command, we gonna do this using PowerShell.
- Restore your Virtual Machine from a Backup or Shutdown from your VMware Client and copy the VM in a different location.
- Now, in PowerShell, import the MVMC module with the Following Command:
Import-Module "C:\Prgram Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1"
- Prepare the source path with vmdk disk of VMware and the destination path.
- When you backup your VM from VMware Client, it will create 2 vmdk files. One with "-flat.vmdk" that has the size of the disk and one with ".vmdk" which is 1-2 KB. When you start the conversion, use the path from source with ".vmdk" extension. If you use "-flat.vmdk" you will get an error.
- So type the command to start the conversion:
ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "SourcePathWith.vmdkExtension" -DestinationLiteralPath "DestinationPathWhereYouWantYourVHDFile" -VhdType FixedHardDisk -VhdFormat vhdx
- Attach the Converted VHD file in Hyper-V by opening the Hyper-V Manager.
- Go in the right pane section, click New=>Virtual Machine.
- You'll see a new wizard to following the steps.
- Give your VM a Name and store the VM in different Locations if you want then click Next.
- Specify the Generation as 1 or 2 based on if you want your VM to have the new UEFI boot option. If you don't want UEFI boot option, go for Generation 1 option.
- Not all the OS supports the new UEFI boot option.
- Assign the amount of Memory to your VM.
- In the Connection section, you can assign the virtual adapter connection if you've created one, if not then select Not Connected and then select Next.
- Select Use an Existing Virtual Hard Disk and browse to your Destination Path where your .vhdx file is, then click Next.
- Click Finish.
- Now Double-Click to the VM Name which you've created. A new window will open and in its Menu bar, you'll see a Power Icon which will Start a VM.
- It'll take some time for the VM to boot for the First time, and that's it we've converted the VMware ".vmdk" image to Hyper-V ".vhdx" image.
- Hope this post helps.
Comments
Post a Comment