6.0.1

Table Of Contents
n
Verify that the host has free disk space equal to the size of the virtual disk that you plan to shrink.
Procedure
1 Open a command prompt or terminal in the guest operating system.
2 Change to the VMware Tools installation directory.
Operating System Default Path
Windows
C:\Program Files\VMware\VMware Tools
Linux and Solaris
/usr/sbin
FreeBSD
/usr/local/sbin
Mac OS X
/Library/Application Support/VMware Tools
3 Type the command to list available mount points.
utility-name disk list
For utility-name use the guest-specific program name.
Operating System Utility Name
Windows
VMwareToolboxCmd.exe
Linux, Solaris, and FreeBSD
vmware-toolbox-cmd
4 Type the command to shrink the disk at a specified mount point.
utility-name disk shrink mount-point
For mount-point, use one of the mount points displayed when you used the list subcommand.
Using Custom VMware Tools Scripts
You can associate custom scripts with power operations.
When VMware Tools is installed, one or more default scripts run on the guest whenever you change the
power state of the virtual machine. You change the power state by using menu commands or by clicking the
Suspend, Resume, Power On, and Power Off buttons. For example, when you power off a virtual machine,
by default the poweroff-vm-default script runs.
Use Custom VMware Tools Scripts in Windows Guests
On Windows guest operating systems, you can write scripts to automate guest operating system operations
when you change the power state of a virtual machine.
For Windows guest operating systems, you can write new scripts or modify default scripts, save them with
new names, and configure VMware Tools to use your custom script instead of the default script.
The VMware Tools service, or daemon (vmtoolsd), runs scripts. Because vmtoolsd runs as root on Linux,
Mac, Solaris, and FreeBSD, and as System on Windows, the scripts run in a separate session from the session
of the logged-in user. The VMware Tools daemon does not detect desktop sessions, which means that it
cannot display graphical applications. Do not attempt to use custom scripts to display graphical
applications.
IMPORTANT You cannot run scripts on Windows NT, Me, Windows 98, and Windows 95 guest operating
systems.
Prerequisites
n
Familiarize yourself with the default VMware Tools scripts. See “Default VMware Tools Scripts,” on
page 220.
vSphere Virtual Machine Administration
218 VMware, Inc.