September 2012
Table Of Contents
- Installing and Configuring VMware Tools
- Contents
- About Installing and Configuring VMware Tools
- Components of VMware Tools
- Installing and Upgrading VMware Tools
- Installing VMware Tools
- Upgrading VMware Tools
- Manually Install or Upgrade VMware Tools in a Windows Virtual Machine
- Automate the Installation of VMware Tools in a Windows Virtual Machine
- Manually Install or Upgrade VMware Tools in a Linux Virtual Machine
- Manually Install or Upgrade VMware Tools in a Solaris Virtual Machine
- Manually Install or Upgrade VMware Tools in a FreeBSD Virtual Machine
- Manually Install or Upgrade VMware Tools in a NetWare Virtual Machine
- Manually Install or Upgrade VMware Tools in a Mac OS X Virtual Machine
- Repairing, Changing, and Uninstalling VMware Tools Components
- Using the VMware Tools Configuration Utility
- Using Other Methods to Configure VMware Tools
- Security Considerations for Configuring VMware Tools
- Index
Use Custom Scripts in Operating Systems Other Than Windows
On Linux, Mac OS X, Solaris, and FreeBSD guest operating systems, you can write scripts to automate guest
operating system operations when you change the power state of a virtual machine.
For Linux, Mac OS X, Solaris, and FreeBSD guests, you can write scripts and place them in a certain directory,
and then VMware Tools runs your scripts in addition to the default scripts. For power-on and resume
operations, the default scripts run before the custom scripts. For suspend and power-off, the default scripts
run after the custom scripts. This way, VMware Tools stops services only after the custom scripts finish their
work and, conversely, restores the same services before the custom scripts attempt to use the services.)
Scripts are run by the VMware Tools service, or daemon (vmtoolsd). Because vmtoolsd is run as root on Linux,
Mac, Solaris, and FreeBSD and as System on Windows, the scripts are 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.
Prerequisites
n
Familiarize yourself with the default VMware Tools scripts. See “Default VMware Tools Scripts,” on
page 38.
n
On Linux, Mac OS X, Solaris, and FreeBSD guest operating systems, to test, edit, or disable the running
of a script, log in as root.
n
On Linux, Mac OS X, Solaris, and FreeBSD guest operating systems, to edit a script, make sure xterm and
vi are installed in the guest operating system and are in your PATH, or specify which editor to use by
setting the EDITOR environment variable.
n
If you plan to script the commands used in this procedure and need to know what the exit codes are, see
“Exit Codes,” on page 42.
Procedure
1 Log in to the guest operating system as root.
2 Write the custom scripts and place them in the correct directory, as instructed by the comments in the
default script files for each power operation.
On Linux, Solaris, and FreeBSD guest operating systems, the default scripts are located in the /etc/vmware-
tools directory. On Mac OS X operating systems the default scripts are located in
the /Library/Application Support/VMware Tools directory.
Do not make changes to the default scripts.
After you complete this procedure, the VMware Tools service runs the script whenever the specified power
operation occurs.
Default VMware Tools Scripts
One or more default scripts for each power state are included in VMware Tools.
What the default scripts do depends in part on the guest operating system:
n
On most Microsoft Windows guest operating systems, the default script that runs when you suspend a
virtual machine releases the IP address of the virtual machine. The default script that runs when you
resume a virtual machine renews the IP address of the virtual machine. This behavior affects only virtual
machines configured to use DHCP.
Installing and Configuring VMware Tools
38 VMware, Inc.