Contents

Shrinking a Virtual Disk

Shrinking a virtual disk reclaims unused space in the 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 virtual disks is a convenient way to convert a virtual disk to the new format supported by VMware GSX Server 2.0. Virtual disks are created in the new format cannot be recognized by earlier VMware products except for VMware Workstation 3.0 and later.

The virtual disks to be shrunk must be booted in persistent mode. (You can change the mode of a virtual disk before the virtual machine is powered on by choosing Settings > Configuration Editor, selecting the virtual disk, then choosing Persistent as the disk mode.) Shrinking requires free disk space on the host equal to the size of the virtual disk being shrunk.

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 shrink process itself is the second step, and it takes place outside the virtual machine. VMware GSX Server 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 can shrink its virtual disks from the VMware Tools control panel.

In a Linux 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.

Shrinking disks may take considerable time.

To shrink a virtual disk on a Windows guest operating system:

  1. Double-click the VMware Tools icon (generally in the system tray at the end of the taskbar). Otherwise, choose Start > Settings > Control Panel, then double-click VMware Tools.

  2. Click the Shrink tab.

  3. Select the virtual disks you want to wipe, then click Prepare to Shrink.

    Note: If you deselect some of the partitions to wipe, the whole disk is still shrunk. However, those partitions are not prepared for shrinking, and the shrink does not reduce the size of the virtual disk as much as it could otherwise.

  4. When VMware Tools finishes wiping the selected disk partitions, you are prompted to begin shrinking the disks.

To shrink a virtual disk on a Linux guest operating system:

In a Linux guest operating system, to shrink virtual disks, 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 shrink the parts of the virtual disk that require root-level permissions.

  1. To launch the control panel in a Linux guest, become root (su -), then run
    vmware-toolbox &.

  2. Click the Shrink tab.

  3. Select the mount point for the disk you want to wipe and click Prepare to shrink.

    Note: If you deselect some of the partitions to wipe, the whole disk is still shrunk. However, those partitions are not prepared for shrinking, and the shrink does not reduce the size of the virtual disk as much as it could otherwise.

  4. When VMware Tools finishes wiping the selected disk partitions, you are prompted to begin shrinking the disks.

Related Topics:

Back to top

© 2001-2002 VMware, Inc. All rights reserved.