参考博客
VMware磁盘变满——磁盘压缩——虚拟机瘦身_Under Taker的博客-CSDN博客_vmware 磁盘压缩
瘦身后的文件少了30多G,
然后开始启动虚拟机,启动的时候出了一个问题,不能打开新任务。有两个vmdk文件,就出了两次错误。
UUID {00000000-0000-0000-0000-000000000000} of the medium 'E:\ubuntu64-1804-201002\ubuntu64-1804-201002.vmdk' does not match the value {57481eff-e53a-459f-b281-1c032f570d0e} stored in the media registry ('C:\Users\.VirtualBox\VirtualBox.xml').
UUID {00000000-0000-0000-0000-000000000000} of the medium 'E:\ubuntu64-1804-201002\ubuntu64-1804-200706-home.vmdk' does not match the value {efb06b9b-cbd7-427d-8698-d2610ae6088a} stored in the media registry ('C:\Users\.VirtualBox\VirtualBox.xml').
又参考了一篇文章
虚拟机硬盘vmdk压缩瘦身并挂载到VirtualBox - 知乎 (zhihu.com)
根据错误明细,执行下面两条命令
VBoxManage internalcommands sethduuid E:\ubuntu64-1804-201002\ubuntu64-1804-201002.vmdk 57481eff-e53a-459f-b281-1c032f570d0e
VBoxManage internalcommands sethduuid E:\ubuntu64-1804-201002\ubuntu64-1804-200706-home.vmdk efb06b9b-cbd7-427d-8698-d2610ae6088a
执行完成后就能够重新启动虚拟机了,内容也没有少,文件大小变小了。