VMware 虚拟镜像转 Hyper-V(Win10/2016)
2021-04-13 05:28
标签:http bytes ali versions kde centos7 dynamic 导出 let VMware 虚拟镜像转 Hyper-V(Win10/2016) 参考: 原理: 下载: 安装:mvmc_setup.msi 步骤: 1. 如果你有多个快照,建议在VMWare Workstation导出为ovf后,再导入进来,然后还能通过升级命令,克隆为较低的VMWare版本。 ConvertTo-MvmcVirtualHardDisk : The entry 4 is not a supported disk database entry for ConvertTo-MvmcVirtualHardDisk : One or more errors occurred. 3. 在CMD窗口里运行: E:\> e:\notepad2\notepad2.exe descriptor1.txt E:\> dsfi "E:\CentOS7_vm\CentOS7_vm-disk1-cl1.vmdk" 512 1024 descriptor1.txt 4. 再次回到PowerShell运行转换命令 5. 打开Hyper-V管理器,创建一个新的虚拟机,然后将磁盘选择已存在,浏览到vhdx 6. 启动虚拟机,修复系统 转换过程就算是完成了。 VMware 虚拟镜像转 Hyper-V(Win10/2016) 标签:http bytes ali versions kde centos7 dynamic 导出 let 原文地址:https://www.cnblogs.com/Bob-wei/p/8986547.html
http://www.askme4tech.com/how-convert-vmware-virtual-machine-hyper-v
https://stackoverflow.com/questions/37481737/error-when-converting-vmware-virtual-disk-to-hyperv
使用微软提供的转换工具,将vmdk转换为vhdx。
如果转换工具提示错误提示,说明不支持vmdk的某个配置,用工具修改后,可以完成转换。
1. Microsoft Virtual Machine Converter 3.0
https://www.microsoft.com/en-us/download/details.aspx?id=42497
下载 mvmc_setup.msi 即可。
2. dsfok tools
http://members.ozemail.com.au/~nulifetv/freezip/freeware/dsfok.zip
3. notepad2(或者notepad++)
https://xhmikosr.github.io/notepad2-mod/
解压:dsfok和notepad2
假设vmdk路径是:E:\CentOS7_vm\CentOS7_vm-disk1-cl1.vmdk
转换后路径是:E:\Hyper-V\Virtual Hard Disks\
dsfok路径是:E:\dsfok
Notepad2路径是:E:\notepad2
2. 用管理员身份打开PowerShell,然后输入下面命令转换
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
如果成功转换,跳动第5步;如果出现如下错误提示,进行下一步。
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
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
E:\> e:\dsfok\dsfo "E:\CentOS7_vm\CentOS7_vm-disk1-cl1.vmdk" 512 1024 descriptor1.txt
OK, 1024 bytes, 0.016s, MD5 = 14834e920b6019bb8e05823a67c4162c
将第20行的ddb.toolsInstallType = "4"前添加一个井号#
将最后一行的NUL删除一个,保证仍然是1024字节(状态栏是1.00KB)
保存后关闭notepad2
OK, written 1024 bytes at offset 512
PS> ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "E:\CentOS7_vm\CentOS7_vm-disk1-cl1.vmdk" -DestinationLiteralPath "E:\Hyper-V\Virtual Hard Disks\" -VhdType DynamicHardDisk -VhdFormat Vhdx
等待转换完成。
文章标题:VMware 虚拟镜像转 Hyper-V(Win10/2016)
文章链接:http://soscw.com/essay/75060.html