Hyper-v3.0里无法压缩虚拟硬盘!虚拟机为Linux,硬盘为VHDX

 

Hyper-v3.0里无法压缩虚拟硬盘!虚拟机为Linux,硬盘为VHDX

 

http://www.360doc.com/content/14/0918/12/21412_410407906.shtml

http://blog.51cto.com/dinghuqiang/1306258

 

如果是Linux系统,压缩之前需要在Linux里面做些操作。要将标记为DELETE的文件彻底删除,也就是将磁盘上的位置0。具体的步骤可以参考这个链接:

http://serverfault.com/questions/551053/how-can-i-compact-the-vhd-file-with-ubuntu

另外关于Hyper-V中Linux的VM的问题,可以发到下面这个对应的论坛,可以获得更好的帮助:
http://serverfault.com/questions/551053/how-can-i-compact-the-vhd-file-with-ubuntu

Best Regards,

Leo


Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

 

The main problem is that the filesystem is not NTFS, but ext4.

The answer:

1) Download systemrescuecd

http://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/3.8.1/systemrescuecd-x86-3.8.1.iso/download

2) Add this .iso to the quest OS Ubuntu

3) Start this virtual machine

4) Use zerofree

zerofree /dev/sda1

5) Poweroff this virtual machine

6) Use Hyper-V manager (Edit -> defragmentation)

This vhd was 360 Gb. Now 70 GB.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AI算法网奇

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值