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

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/jacke121/article/details/81904736

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

你好,

如果是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 [email protected].

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.

猜你喜欢

转载自blog.csdn.net/jacke121/article/details/81904736