VMware Virtual mirror to Hyper-V (win10/2016)
Reference:
Http://www.askme4tech.com/how-convert-vmware-virtual-machine-hyper-v
Https://stackoverflow.com/questions/37481737/error-when-converting-vmware-virtual-disk-to-hyperv
Principle:
Convert VMDK to VHDX using the conversion tool provided by Microsoft.
If a conversion tool tip error indicates that a configuration for a vmdk is not supported, the conversion can be completed with the tool modified.
Download:
1. Microsoft Virtual Machine Converter 3.0
https://www.microsoft.com/en-us/download/details.aspx?id=42497
Download Mvmc_setup.msi.
2. Dsfok Tools
Http://members.ozemail.com.au/~nulifetv/freezip/freeware/dsfok.zip
3. Notepad2 (or notepad++)
https://xhmikosr.github.io/notepad2-mod/
Installation: Mvmc_setup.msi
Decompression: Dsfok and Notepad2
Steps:
Suppose that the VMDK path is: E:\CENTOS7_VM\CENTOS7_VM-DISK1-CL1.VMDK
The post-conversion path is: E:\Hyper-V\Virtual hard disks\
The Dsfok path is: E:\dsfok
The Notepad2 path is: E:\notepad2
1. If you have multiple snapshots, it is recommended that you import them after VMware Workstation is exported to OVF, and then you can clone to a lower version of VMware by upgrading the command.
2. Open PowerShell as an administrator and enter the following command to convert
ps> import-module "C:\Program Files\Microsoft Virtual Machine CONVERTER\MVMCCMDLET.PSD1"
ps> Convertto-mvmcvirtualharddisk-sourceliteralpath "E:\CENTOS7_VM\CENTOS7_VM-DISK1-CL1.VMDK"- Destinationliteralpath "E:\Hyper-V\Virtual hard disks\"-vhdtype Dynamicharddisk-vhdformat VHDX
If the conversion succeeds, tick the 5th step, and if the following error appears, proceed to the next.
Convertto-mvmcvirtualharddisk:the Entry 4 is not a supported disk database entry for
the descriptor.
At line:1 char:1
+ convertto-mvmcvirtualharddisk-sourceliteralpath "E:\CentOS7_vm\CentO ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ categoryinfo:writeerror: ( Microsoft.accel...nversionservice:driveconv
Ersionservice) [Convertto-mvmcvirtualharddisk], Vmdkdescriptorparseexception
+ fullyqualifiederrorid:diskconversion, Microsoft.Accelerators.Mvmc.Cmdlet.Comman
ds. Converttomvmcvirtualharddiskcommand
Convertto-mvmcvirtualharddisk:one or more errors occurred.
At Line:1 char:1
+ Convertto-mvmcvirtualharddisk-sourceliteralpath "E:\CentOS7_vm\CentO ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Categoryinfo:writeerror: (microsoft.accel...nversionservice:driveconv
Ersionservice) [Convertto-mvmcvirtualharddisk], aggregateexception
+ Fullyqualifiederrorid:diskconversion,microsoft.accelerators.mvmc.cmdlet.comman
Ds. Converttomvmcvirtualharddiskcommand
3. Run in cmd window:
e:\> e:\dsfok\dsfo "E:\CENTOS7_VM\CENTOS7_VM-DISK1-CL1.VMDK" Descriptor1.txt
OK, 1024x768 bytes, 0.016s, MD5 = 14834e920b6019bb8e05823a67c4162c
E:\> E:\notepad2\notepad2.exe Descriptor1.txt
Add a pound sign before ddb.toolsinstalltype = "4" On line 20th #
Delete the last line's nul, guaranteed to still be 1024 bytes (status bar is 1.00KB)
Close Notepad2 after saving
E:\> dsfi "E:\CENTOS7_VM\CENTOS7_VM-DISK1-CL1.VMDK" Descriptor1.txt
OK, written 1024x768 bytes at offset 512
4. Go back to PowerShell and run the convert command again
ps> Convertto-mvmcvirtualharddisk-sourceliteralpath "E:\CENTOS7_VM\CENTOS7_VM-DISK1-CL1.VMDK"- Destinationliteralpath "E:\Hyper-V\Virtual hard disks\"-vhdtype Dynamicharddisk-vhdformat VHDX
Wait for the conversion to complete.
5. Open Hyper-V Manager, create a new virtual machine, and then select the disk that already exists, browse to the VHDX
6. Start the virtual machine, repair the system
The conversion process is even done.
VMware Virtual mirror to Hyper-V (win10/2016)