September 2012

Table Of Contents
6 Enter the command to connect or disconnect the device.
utility-name
device
device-name
subcommand
Option Action
device-name
Use one of the names displayed when you used the list subcommand.
subcommand
Use enable or disable.
After you complete this procedure, the device is connected or disconnected, as you specified.
Shrink a Virtual Disk
Shrinking a virtual disk reclaims unused space in the virtual disk and reduces the amount of space the virtual
disk occupies on the host.
IMPORTANT Shrinking disks is not allowed under the following circumstances:
n
The virtual machine is hosted on an ESX/ESXi host. ESX/ESXi can shrink the size of a virtual disk only
when a virtual machine is exported. The space occupied by the virtual disk on the server, however, does
not change.
n
The virtual machine has a Mac OS X guest operating system.
n
You preallocated all the disk space to the virtual disk when you created it.
n
The virtual machine contains a snapshot.
The exception is if the virtual machine is used in VMware Fusion 4 and has a Windows guest operating
system. In this case, you can use the Clean Up Virtual Machine button in Fusion to shrink disks.
n
The virtual machine is a linked clone or the parent of a linked clone.
n
The virtual disk is an independent disk in nonpersistent mode.
n
The file system is a journaling file system, such as an ext4, xfs, or jfs file system.
Shrinking a disk is a two-step process. In the preparation step, VMware Tools reclaims all unused portions of
disk partitions (such as deleted files) and prepares them for shrinking. This step takes place in the guest
operating system. During this phase, you can still interact with the virtual machine.
In the shrink step, the VMware application reduces the size of the disk based on the disk space reclaimed
during the preparation step. If the disk has empty space, this process reduces the amount of space the virtual
disk occupies on the host drive. The shrink step takes place outside the virtual machine and takes considerable
time, depending on the size of the disk. The virtual machine stops responding while VMware Tools shrinks
the disks.
IMPORTANT For your convenience, some newer versions of some VMware products include a button or menu
command that performs the same function as the shrink-disk command. For example, Workstation includes
a Compact menu command that you can use when the virtual machine is powered off. VMware Fusion 4
includes a Clean Up Virtual Machine button that can shrink disks even if you have snapshots.
Under some conditions, the ability to invoke a shrink-disk command might be considered a security risk. To
configure a setting that disables the ability to shrink disk, see “Threats Associated with Unprivileged User
Accounts,” on page 46.
Prerequisites
n
On Linux, Solaris, and FreeBSD guest operating systems, log in as root. If you shrink the virtual disk as a
nonroot user, you cannot prepare to shrink the parts of the virtual disk that require root-level permissions.
Chapter 4 Using the VMware Tools Configuration Utility
VMware, Inc. 35