When you delete files from your virtual machine, the disk space occupied by those files is not immediately returned to your host system. If a virtual disk has such empty space, you can use the Clean up disks command to return that space to the hard drive on a Microsoft Windows host.

The Clean up disks command is similar to the Compact command in the Workstation Pro virtual machine settings and the shrink command provided by VMware Tools. The Clean up disks command has these advantages:

  • You can use the Clean up disks command with virtual machines that have snapshots or are linked clones or parents of a linked clone.
  • The Clean up disks command reclaims more disk space than the Compact command.

    The Clean up disks command reclaims disk space from the current state of the virtual machine, from any powered-off snapshots, and from any powered-on snapshots where the guest operating system is Windows XP or later and you have installed a version of VMware Tools that is compatible with Workstation 8 or later.

  • Unlike the Defragment command and the shrink command provided by VMware Tools, the Clean up disks command does not require any extra disk space on the host. The Clean up disks command operates directly on the virtual disk (.vmdk) files.
Note: This command is not available for shared or remote virtual machines.

Prerequisites

  • Verify that you are using a Windows host and that the guest operating system uses NTFS. (NTFS is standard in Windows XP or later operating systems.) This feature works on all NTFS hard disks but reclaims more disk space if the operating system is Windows XP or later.
  • Shut down or power off the virtual machine. You cannot use this command while the virtual machine is powered on or suspended.

Procedure

  1. Select the virtual machine in the library.
  2. From the menu bar, select VM > Manage > Clean Up Disks.
    Workstation Pro calculates how much space can be reclaimed, and either the Clean Up Now button becomes available or a message appears, explaining why the command is unavailable.
  3. Click Clean Up Now to start the process.
    A dialog box reports the progress of the clean-up process.