VMware Tools shrink option on ESXi/ESX hosted virtual machines (10185)
The Prepare to Shrink option in VMware Tools prepares a virtual disk for exporting to VMware hosted products (such as VMware Workstation and VMware Server) by using the smallest possible disk files. The Shrink operation zeros previously-used sections of the virtual disk within the guest operating system so that a subsequent export can avoid copying sections of the virtual disk containing deleted data. This is similar to a Secure Delete as performed by the Windows SysInternals'
The Prepare to Shrink option is available in ESX 3.0.2 and later versions.
The Prepare to Shrink option is disabled on ESXi/ESX 4.x when there are one or more thin disks attached to the virtual machine. On an ESXi/ESX thin disk, this operation fills unallocated blocks with zeros, causing the virtual disk to inflate to its maximum size.
Note: Shrinking disks is not allowed in certain circumstances. For additional information see Shrinking a Virtual Disk in Installing and Configuring VMware Tools.
Requirements and restrictions for shrinking
- Shrinking requires free disk space on the host equal to the size of the virtual disk you are shrinking.
- Shrinking applies only to virtual disks. You cannot shrink physical disks or CD-ROMs.
- The Shrink feature is not enabled if the virtual machine:
- Contains a snapshot
- Is the parent of a linked clone
- Is a linked clone
- The Shrink feature is not enabled for a virtual machine if any of its virtual disks are:
- Preallocated when created, such as Thick Provisioned Eager Zeroed or Thick Provisioned Lazy Zeroed.
- Legacy disks that are configured for Independent-Nonpersistent. Legacy disks must use Independent-Persistent.
- Prepare to shrink
- Zeroing the unused sections of the virtual disk
Shrinking the virtual disk
- Open the VMware Tools Control Panel/Toolbox.
- In Windows, double-click the VMware Tools icon in the system tray or go to Start > Control Panel > VMware Tools.
- In Linux:
- Open a command prompt. For more information, see Opening a command or shell prompt (1003892)
- Run this command:
- Click the Shrink tab.
- Ensure that your boot drive is selected.
- Click Prepare to Shrink and then follow the prompts.