Book VMware Chapter 12
Book VMware Chapter 12
Book VMware Chapter 12
Chapter
A 12
A
A
VMware Tools
A
A
A
A
A
A
A
A
A
A
A
The
A VMware Tools is a whole set of drivers and software functions, which
provide
A any virtual machine with extra value. Combined with current driv-
ers
A for the virtual hardware it also offers additional functions, such as, for
example,
A a time synchronization service or the ability to shut down
smoothly
A or to restart the guest operating system. In this chapter you will
learn
A everything you need to know about these tools.
A
VMware
A Server makes VMware Tools easy to install, but it’s a different sto- Installation with
ry
A with VMware Player. Chapter 14 offers more details about using VMware VMware Server and
Player
A and how to install VMware Tools. VMware Playe
A
VMware
A Tools is a part of the VMware product range (with the exception of Updated with every
VMware
A Player) and is always updated along with the latest product ver- version of VMware
sions.
A As a system owner it is a huge advantage not to have to worry about Server
the
A current drivers or tools - VMware Tools is always there and can always
be
A installed. You only have to remember that such updates require restart-
ing
A your virtual machine.
A
Of
A course, it is always recommended that you maintain the same version of Maintain the same
VMware
A Tools as the version of the VMware virtualization product. There- version of VMware Tools
fore
A in production environments before updating the VMware product and VMware Server
(and
A VMware Tools in the virtual machines), you should establish a plan to
bring
A them up to the same level as fast as possible. This is to avoid
unnecessary
A downtime.
A
A
173
Chapter 12 – VMware Tools
Many operating A
From the VMware Tools perspective, support for guest operating systems
systems supported by A recently increased enormously and now nearly any operating system is
has
VMware Tools A
supported by the current VMware Server version. VMware is also con-
A
stantly expanding support for operating systems or newer versions of ope-
A
rating systems, and delivering the appropriate VMware Tools.
A
Install VMware Tools A the guest operating system is supported by VMware Tools then I advise
If
whenever possible A
always installing it. So far I have never seen VMware Tools negatively im-
A the behavior of a virtual machine.
pact
A
In the following sections I will go first into the installation and updating
A
of VMware Tools on both of the most commonly used families of operating
A
systems. Afterwards we will explore the functionality of VMware Tools and
A
how best to use it.
A
A
A
A
12.1
A
Microsoft Windows
A
Full support for VMware Tools offers full support. So far there are no Microsoft Windows
A
Microsoft Windows operating systems (after Windows NT) which are not covered by VMware
A
Tools.
A
A
A
12.1.1
A Installation
A
To start the installation of VMware Tools, simply choose the option VM,
A
Install VMware Tools in the VMware Server menu. Figure 12.1 shows the
A
VMware Server Console from where you can install VMware Tools.
A
A
A
A
A
A
A
A
A
A
A
A
174
Chapter 12 – VMware Tools
A
A
A
A
A
A
A
A
A
A
A
A
A
A
Figure 12.1 – Starting the VMware Tools installation
A
Next,
A a VMware Server dialog appears which explains the advantages of
VMware
A Tools and informs that the guest operating system needs to be
available and running, as can be seen in Figure 12.2.
A
A
A
A
A
A
A
A
A
A
Figure
A 12.2 – Do you want to install or do you want to cancel?
A
After choosing Install the VMware Tools CD ISO image is inserted in the
A
virtual CD drive and the installation program starts via Autorun (if
A
activated).
A
A
A
A
A
A
A
A
A
175
Chapter 12 – VMware Tools
176
Chapter 12 – VMware Tools
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
Figure 12.4 – Installation types
A
A
Complete installs everything, independently of the product being used.
A
This is useful if the virtual machine is to be used with multiple VMware
A
products such as Player, Workstation, Server, ACE and ESX.
A
Custom,
A on the other hand, allows an individual choice of components.
A
In
A choosing Custom the list of available components will be displayed Use custom installation
(Figure
A 12.5). This is a colorful mix which offers many useful functions and remove the shared
(such
A as time synchronization), the virtual device drivers and shared fold- folder
er
A option. A shared folder is a directory for data exchange between the
host
A and guest systems, but is not currently supported by either VMware
Player
A or VMware Server.
A
A
A
A
A
A
A
A
A
177
Chapter 12 – VMware Tools
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
Figure 12.5 – The custom installation
A
Overview of A following list provides a short overview of the components:
The
components A
A Toolbox: With functions such as time synchronization and clean
•
A shutdown of the guest system.
A SCSI Driver: Installs an improved BusLogic SCSI driver. If you use LSI
•
A Logic this driver is not required.
A SVGA Driver: Graphic card driver for the virtual graphics card; enables
•
A numerous screen resolutions and increases performance.
A Mouse Driver: Improved mouse driver which fixes glitches with the
•
A mouse.
A VMXNet NIC Driver: Network card driver for the VMXNet VMware
•
A network card. Improves network performance of the virtual machine,
A especially in gigabit environments. Furthermore the CPU usage is not
A as high as with AMD PCNet32. Using this driver requires a modification
A in the configuration file of the guest system.
A Memory Control Driver: Driver for improved memory management in
•
A the virtual machine. Is only required for the use of VMware ESX.
A Filesystem Sync Driver: Driver for the synchronization of the file
•
A system within the virtual machine. For example, for preparation of
A backups.
A
178
Chapter 12 – VMware Tools
A Shared Folders: Directory for data exchange between the host system
•
A and the guest system. Currently only works when using VMware Work-
A station.
A
A
After installation of the device drivers and the additional selected tools is Hardware acceleration
A
complete, the installation program then checks whether hardware accel-
A
eration has been enabled (Figure 12.6).
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
Figure 12.6 – Hardware acceleration settings
A
A
With most newly-installed virtual machines this is not the case and must
A
therefore be done manually later.
A
A
To access the hardware acceleration configuration, you must go into the
A
graphics settings shown in Figure 12.7 and choose Advanced configura-
A
tion.
A
A
A
A
A
A
A
179
Chapter 12 – VMware Tools
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
Figure 12.7 – Accessing hardware acceleration in the graphic settings
A
A
Manual steps after This
A happens automatically during the VMware Tools installation program.
installation of the Otherwise
A right-click in the normal way on an empty area of the desktop,
VMware SVGA then
A choose Properties or go to Start, Settings, Control Panel, Display.
graphic card A
Within the Advanced settings go to the Troubleshoot tab and move the
A
Hardware Acceleration bar to Full (Figure 12.8).
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
Figure 12.8 – Enabling hardware acceleration
A
180
Chapter 12 – VMware Tools
A
Then accept the change with OK and the installation of VMware Tools and Increase hardware
A configuration of the hardware acceleration is complete.
the acceleration on
A Windows systems
A
A
A
A
A
A
A
Figure 12.9 – Restart of the guest system after installation of VMware Tools
A
However
A after this a restart should be performed (Figure 12.9), so that all
VMware
A Tools components are actually loaded.
A
A
12.1.2 Upgrade
A
A
In
A general upgrades of VMware Tools happen entirely automatically. The
message
A in Figure 12.10 advises that a more recent version of the VMware
Tools
A is available and asks whether you would like to proceed with the up-
grade.
A
A
A
A
A
A
A
Figure 12.10 – Updating the version of VMware Tools
A
A
If the same version of VMware Tools is already present, a message appears Reboot required
A
allowing modification, repair or removal of VMware Tools.
A
A
A
12.1.3 Unattended Installation
A
A
Earlier versions of VMware Tools contained drivers which were not ap- Issues with
A
proved, and therefore not certified and signed, by Microsoft. This led to unsigned drivers
A
the problem with newer Windows versions (Windows 2000 and Windows in earlier versions
A
2003) that the installation of unsigned drivers could only proceed with
A
A
181
Chapter 12 – VMware Tools
182
Chapter 12 – VMware Tools
183
Chapter 12 – VMware Tools
Exclude components A you wish to leave out individual components during installation, you can
If
with msiexec switches A Remove to the msiexec command. The following command installs
add
A
VMware Tools completely, except the shared folder:
A
msiexec -i "V:\VMware Tools.msi" ADDLOCAL=ALL REMOVE=Hgfs /qn
A
A
Table 12.1 lists the parameters for the different components, so that you
A
can build your own msiexec commands with the Remove switch:
A
A
A
Table 12.1 – Remove Switches
A
A Components Parameter
A Toolbox Toolbox
A VMware Device Drivers (all) Drivers
A
A SVGA Driver SVGA
A
Mouse Driver Mouse
A
A SCSI Driver Buslogic
A
VMXNet NIC Driver VMXNet
A
A Memory Control Driver MemCtl
A
Shared Folder Hgfs
A
A
A
12.1.4
A Deinstallation
A
Removing VMware Tools You
A can perform a deinstallation using either Start, Settings, Control Panel,
Add or Remove Programs, or by running the VMware Tools setup program
A
again and choosing Remove in the following dialog (Figure 12.11).
A
A
A
A
A
A
A
A
A
A
184
Chapter 12 – VMware Tools
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
Figure 12.11 – Removing VMware Tools with the setup program
A
A
A
A
12.2 Linux
A
A
In earlier versions of VMware Tools, installation was only possible using Source and RPM
A
the source installation package, as no RPM installation package existed. installation supported
A
Meanwhile this has changed and in most cases the RPM installation is com-
A
pletely sufficient.
A
A
A
12.2.1
A
Installation
A
The first step for installation of VMware Tools is always the same. The
A
VMware Tools ISO image is first associated with the virtual CD drive by
A
choosing Install VMware Tools (Figure 12.1).
A
A
A
A
A
A
185
Chapter 12 – VMware Tools
186
Chapter 12 – VMware Tools
A you do not want to use the AMD PCNet32 network adapter, you can
If Change from AMD
A
proceed as follows once VMware Tools have been installed: PCNet to VMXnet
A
A Change the virtual network card configuration on the virtual machine
1.
A to VMXNet (by changing the configuration file).
A Stop the network, load the driver files and start the network again
2.
A with the following commands:
A
A /etc/init.d/network stop
A rmmod pcnet32
A rmmod vmxnet
A depmod –a
A modprobe vmxnet
A /etc/init.d/network start
A
A
12.2.2 Upgrade
A
A
An upgrade runs automatically by simply clicking on the RPM file, just like
A Upgrade is easy
a new installation on CentOS and on many newer Linux distributions.
A and quick
A
If it isn’t happening, the update can be run using rpm –Uhv VMwareTools-
A
xxx.rpm. The parameters -Uhv define the upgrade (U), run a progress re-
A
port (h=hash) and enable verbose mode (v). After this the following com-
A
mand should be used again to run the configuration program:
A
/usr/bin/vmware-config-tools.pl.
A
A
A
12.2.3 Deinstallation
A
A
Deinstallation requires a handful of command line instructions in order to
A For deinstallation
find the package name and to uninstall the package.
A find the installed
A RPM packet
1. This command searches all installed packages for the string "VMware"
A
A rpm –qa |grep VMware. The result should be a line containing the string
A VMwareTools Version Build.
2. With the name found above (VMware Tools) the deinstallation can now
A
A be carried out using rpm –e VMware-Tools-xxx.
A
A
187
Chapter 12 – VMware Tools
12.3
A Functions
A
In addition to the already mentioned device drivers which are installed by
A
VMware Tools (BusLogic, VMXNet, graphics card), there are also drivers
A
which provide better performance within the virtual machine.
A
A
Seamless change It is also possible, after installation of VMware Tools, to easily lose the
A
between host and focus of the virtual machine without using the hot keys CTRL+ALT. This
A
virtual machine means that the mouse and keyboard entries are only interpreted for the
A
VM when you are actually in the VMware Server window. The loss of focus
A
between VM and host system is therefore seamless.
A
A
Furthermore, on Windows the VMware Toolbox is automatically started
A
whereas on Linux it must be manually started (using vmware-toolbox).
A
VMware
A Toolbox actually offers a variety of functions, of which just the
most
A important ones are mentioned here. On Windows the VMware
Toolbox
A dialog will appear by clicking on the icon shown in Figure 12.12.
However
A Linux starts the dialog immediately.
A
A
A
A
A
Figure 12.12 – VMware Tools system tray icon on Windows
A
Time synchronization On
A the Options tab (shown in Figure 12.13) the display of the system tray
icon
A can be disabled. The same tab controls functions for synchronizing
the
A time between the host and guest operating system.
A
A
A
A
A
A
A
A
A
A
A
A
A
Figure 12.13 – VMware Tools options
188
Chapter 12 – VMware Tools
189
Chapter 12 – VMware Tools
Cleanly shutdown A soon as VMware Tools is installed it is also possible to cleanly restart or
As
and restart VMs A
shut down the virtual machine with the options Restart Guest and
A
Shutdown Guest. However without VMware Tools VMs can only be
A
completely reset or switched off, just like pulling the power plug on
A
physical machines.
A
Dynamically growing hard disk files only ever grow. This sounds like some
A
deep pearl of wisdom but it’s actually really the way it works. VMware can-
A
not shrink these hard disk files on its own because the program would first
A
have to understand the content of the hard disk (of the guest file system).
A
This would represent an enormous performance hit.
A
A
Shrink growing Therefore after a certain period of use it makes sense to clean up the hard
A
hard disks disk contents. The Shrink function was developed for this purpose, which
A
you can access on the Shrink tab shown in Figure 12.15.
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
Figure 12.15 – Shrinking of partitions
A
The shrink process A
The shrink process consists of two phases:
A
A Identification of the unused hard disk areas through a process which
1.
A can read the hard disk contents (the file system). The unused areas are
A overwritten with zeros.
A
A
A
190
Chapter 12 – VMware Tools
A The virtual machine is shut down and the hard disk file is duplicated
2.
A using an imaging process and thereafter swapped. Therefore more disk
A space is required for duplication. For example, for 10 GB disks 10 GB of
A temporary space would also be required. If split hard disks are being
A used (maximum 2 GB parts), the individual pieces will be handled indi-
A vidually, so that the required temporary space would be just over 2 GB.
A
A
Because of the virtual machine’s downtime during the shrink process you
A
should choose a suitable time to do this. Duration of downtime is directly
A
proportional to hard disk size.
A
A
And last but not least, in the About tab there is the current build number Find the VMware Tools
A
of VMware Tools which is an important piece of information. version in the About tab
A
Having
A learned how to install the VMware Tools package inside your virtual
machines,
A Chapter 13 discusses how to work with predefined virtual ma-
chines
A and appliances, and indeed how to create your own.
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
191