During the use of virtual machines, the size of Virtual Disks will increase. Even if you delete files from the disk, the size of the virtual disk will not be reduced. VMware has released the shrink feature in VMware Tools. After VMware Tools is installed, the Virtual Disk size can be effectively reduced when the guest operating system is windows without snapshot. However, if the guest operating system is Linux, the effect of this method is not good, and some mount points cannot be shrink.
VMware also released the vmware-vdiskmanager tool, which can also be a shrink virtual disk. When the guest operating system is Linux, using this tool alone has no effect. You must first clear unused space in the guest system and use vmware-vdiskmanager for better results. Follow these steps to narrow down the Virtual Disk.
1. CAT/dev/Zero> zero. Fill; sync; sleep 1; sync; RM-F zero. Fill
Run the preceding commands in shell to clear unused space.
2. Shut down the guest operating system and run it in the VMware installation directory:
Vmware-vdiskmanager.exe-K f:/vmware/fedora11/fedora11.vmdk
It can effectively reduce the size of the virtual disk, basically achieving the effect of how much space you use.
This method is used to shrink the vmdk files of the guest system fedora11 and opensolaris10 respectively, with obvious effects.