Sometimes it’s possible that VMWare images become quite large, this is completely normal as files are added and deleted. Usually this isn’t such a problem on machines which are running constantly. But when you need to transfer disk images trough the net, or store disk files every byte sometimes counts.

As an experiment I’ve shrunk the disk images from the Slitaz project.

Shrinking

First enter the os you wish to shrink and zerofill the disk images.

ddif=/dev/zero of=/home/base/wipe.file
rm/home/base/wipe.file

dd if=/dev/zero of=/home/base/wipe.file
rm /home/base/wipe.file

If there are additional storage locations mounted by added disks, then create a zero image there too. The Gluster nodes uses ‘/mnt/data/’ and the mysql uses ‘/var/lib/mysql/’.

Then shutdown the machine and run a command line from your host system.

cd "c:\Program Files (x86)\VMware\VMware Workstation"

cd "c:\Program Files (x86)\VMware\VMware Workstation"

Once you are in the folder use the vmware-vdiskmanager to decrease the vmdk files: