You may be able to reduce the size of a VMware Fusion virtual machine's sparse disk if it does not have any snapshots. This article provides information on defragmenting the virtual hard drive from within Windows, shrinking the virtual disk from within Windows and Linux, and cleaning up (defragmenting) the virtual disk in Mac OS.
Note: It is not possible to reduce the size of a Fusion virtual machine's pre-allocated disk. The size of a pre-allocated disk is always approximately equal to the size allocated to the virtual machine's operating system.
A sparse disk is equal in size to the space the guest operating system has used. This size is not necessarily the same as the space that the guest operating system is currently using. This is because, when you tell an operating system to delete a file, it does not actually delete the file instead it stops remembering what is stored in the space that was used by the file. This is similar to having an unlabeled VCR tape or rewritable CD/DVD. If there is no label, the presumption is that you are free to record on it. So, when a file is deleted, the guest operating system stops marking that space as used. However, the data is not removed from the disk and so Fusion still counts it. Defragmenting and then shrinking the disk is necessary to free up this space that's no longer being used.
Fusion virtual machines can be pre-allocated or sparse. In a pre-allocated virtual machine, the size of the virtual disk file (or files, if you have chosen to split the virtual machine into 2 GB files) is equal to the size of the virtual machine. In a sparse virtual machine, the size of the virtual disk file (or files) is equal to the total used space of the virtual machine.
Your virtual machine bundle is always larger than the size of your virtual disks because the bundle contains snapshots, suspend state files (if the virtual machine is suspended), settings files, and logs. For more information, see Contents of the virtual machine bundle in Fusion (1021016).
However, if the size of your virtual disks is significantly larger than the used space shown in the virtual machine's Operating System, it is possible to reduce this size.
To reduce the size of the disk, you must defragment the disk within Windows, shrink the virtual disk using VMware Tools, and then clean up the virtual disk from within Mac OS using the built-in Fusion utility.
Notes:
To determine if your disk is sparse or pre-allocated, check the virtual disk settings:
In a Windows virtual machine, you must first run a disk defragment from within Windows. Defragmenting within Windows ensures that all of the used spaces are contiguous. You can then reduce the size of the virtual disk.
To run a disk defragment within Windows, follow the instructions from Microsoft:
Note: The preceding links were correct as of September 9, 2013. If you find that a link is broken, provide feedback and a VMware employee will update the link.
After defragmenting the virtual disk, use VMware Tools to erase empty disk sectors at the end of the disk, so that and the space is freed up.
Note: In Fusion 5.x and above, shrinking is automatically done while Cleaning up the disk. Therefore, this option is removed from VMware Tools Panel.
To shrink the virtual disk in VMware Fusion 4.x and earlier:
After shrinking your virtual disk, Fusion ensures that the virtual disk is optimized for Mac OS X. Mac OS X does this automatically for smaller files. However, virtual machine files are too large and you must manually clean up the disk.
To clean up your virtual disk:
In Fusion 4.x and above: