VirtualBox中的vmdk文件瘦身

参考博客

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

执行完成后就能够重新启动虚拟机了,内容也没有少,文件大小变小了。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值