折腾过我好几次的事情了,现在来记录一下过程。
下载Microsoft Virtual Machine Converter,安装。以管理员身份进入powershell,运行
Import-Module 'C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1'
执行如下转换语句:
ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "Path_to_source" -DestinationLiteralPath "Path_to_destination" -VhdType DynamicHardDisk -VhdFormat Vhdx
一般来说直接操作是不会成功的,解决办法:
使用dsfok工具,运行:
dsfo.exe "Path_to_vmdk" 512 1024 desc.txt
编辑该描述文件,注释掉下图所示的几行:

即注释掉:
#ddb.uuid.image="9ff40b3e-e7d5-4239-ae59-7a570f8b5f0b" #ddb.uuid.parent="00000000-0000-0000-0000-000000000000" #ddb.uuid.modification="895544c3-8a66-47f7-aae3-a07a9e410d46" #ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000" #ddb.comment=""
运行
dsfi.exe "Path_to_vmdk" 512 1024 .\desc.txt
此时重新执行转换即可
Comments | NOTHING