Contents
Previous Next
Shrinking Virtual Disks
If you have a virtual disk that grows as data is added, you can shrink it as described in this section. If you allocated all the space for your virtual disk at the time you created it, you cannot shrink it.
Shrinking a virtual disk reclaims unused space in the virtual disk. If there is empty space in the disk, this process reduces the amount of space the virtual disk occupies on the host drive.
Shrinking a virtual disk is a convenient way to convert a virtual disk to the format supported by Workstation. Virtual disks created in the new format can be recognized only by VMware Workstation 3.0 and higher.
This section contains the following topics:
Restrictions and Requirements
Shrinking requires free disk space on the host equal to the size of the virtual disk being shrunk.
Shrinking applies only to virtual disks. You cannot shrink physical disks or CDROMs.
The shrink feature is not enabled if the virtual machine:
Contains a snapshot
Is a parent of a linked clone
Is a linked clone.
The shrink feature is not enabled for a virtual machine if any of its virtual disk are:
Preallocated when created
Not used in independent-persistent mode
A legacy disk that is not in persistent mode
Booted as an independent disk.
Note: You can change the mode of a virtual disk before the virtual machine is powered on. See
Excluding Disks from Snapshots for a discussion of independent disks.
The Shrinking Process
Shrinking a disk is a two-step process:
The first step, called wiping, is where VMware Tools reclaims all unused portions of disk partitions (such as deleted files) and prepares them for shrinking. This allows for the maximum shrink possible. Wiping takes place in the guest operating system.
The second step is the shrink process itself, and it takes place outside the virtual machine (on the host). Workstation reduces the size of the disk based on the disk space reclaimed by the wipe process. This step occurs after the wipe finishes preparing the disk for shrinking.
When a virtual machine is powered on, you shrink its virtual disks from the VMware Tools control panel. You cannot shrink virtual disks if a snapshot exists. To remove the snapshot if one exists, choose
VM > Snapshot > Remove Snapshot. See
Unsupported and Disabled Partitions.
In a Linux or FreeBSD guest operating system, to prepare virtual disks for shrinking, you should run VMware Tools as the root user. This way, you ensure the whole virtual disk is shrunk. Otherwise, if you shrink disks as a non-root user you cannot wipe the parts of the virtual disk that require root-level permissions.
To shrink a virtual disk:
1. Launch the control panel:
Windows guestdouble-click the VMware Tools icon in the system tray, or choose Start > Settings > Control Panel, then double-click VMware Tools.
Linux or FreeBSD guestbecome root (su -), then run vmware-toolbox.
2. Click the Shrink tab.
3. Select the virtual disks you want to shrink, then click Prepare to Shrink.
A progress dialog appears.
This is the wiping process, and it takes place within the guest.
Note: If you deselect some partitions, the whole disk is still shrunk. However, those partitions are not wiped for shrinking, and the shrink process does not reduce the size of the virtual disk as much as it could with all partitions selected.
4. Click Yes when VMware Tools finishes wiping the selected disk partitions.
A progress dialog appears.
This is the shrinking process, which takes place on the host.
Note: Shrinking disks may take considerable time. A dialog appears when the process is done.
5. Click OK to finish.
Unsupported and Disabled Partitions
In some configurations, it is not possible to shrink virtual disks. If your virtual machine uses such a configuration, the Shrink tab displays information explaining why you cannot shrink your virtual disks.
Shrink Disk: Unsupported Partitions
Shrink Disk: Disabled
For example, you cannot shrink a virtual disk if:
You preallocated disk space when you created the disk, which is the default option for both typical and custom virtual machine creation paths.
The virtual machine has any snapshots. To delete a snapshot, choose VM > Snapshot > Snapshot Manager > Delete.
The virtual machine contains physical (raw) disks.
The virtual disk is not an independent disk in persistent mode. For more information, see Independent Disks.
The virtual disk is stored on a CD-ROM.