It is a good practice to update VMware Tools on your VMs after you have updated your vSphere environment to a new major or minor release. VMware tries to make this very easy by providing means to automate the VMware Tools installation/update (through the vSphere legacy and Web Client, and PowerCLI), but in a lot of environments there is a requirement to take complete control over software provisioning on Windows servers and/or the need to customize the VMware Tools installation and remove unwanted features that are installed by default.
For this purpose you will want to take a careful look at the VMware Tools MSI package. I did this with the latest Tools version of vSphere 5.5, and here are my findings.
On the VMware Tools ISO image you will find a setup.exe program for 32-bit versions and a setup64.exe program for 64-bit versions of Windows. These setup programs are just wrappers for the Microsoft Installer (MSI), and if you start them they will extract an embedded MSI file to your personal temporary directory.
MSI internals ...
I used Microsoft's Orca editor to open the MSI files and look at its properties. In the Features table you can find all components of the package, and you will notice that there are a lot more than what is displayed in the standard installation GUI (see picture above).
Here is a complete list of the components. The blue ones are not visible in the GUI:
- Toolbox (Toolbox)
- Perfmon (WMI Performance Logging) 1)
- Unity (Support for Unity feature)
- Plugins
- TrayIcon (Display the Tray Icon) 2)
- Drivers (VMware Device Drivers)
- PVSCSI (Paravirtual SCSI) 3)
- MemCtl (Memory Control Driver)
- Mouse (PS2 Mouse Driver)
- MouseUSB (USB Mouse Driver)
- SVGA (SVGA Driver)
- Audio (Audio Driver) 4)
- VMXNet (VMXNet NIC Driver) 5)
- VMXNet3 (VMXNet3 NIC Driver) 6)
- VSS (Volume Shadow Copy Services Support) 7)
- VMCI (VMCI Driver)
- VShield (vShield Drivers) 8)
- Hgfs (Shared Folders) 9)
- BootCamp (Mac BootCamp Support - VMware Fusion only) 10)
- Buslogic (SCSI Driver) 11)
- Sync (Filesystem Sync Driver) 12)
- WYSE (Wyse Multimedia Support) 13)
- Common
- Microsoft_x86_Dll
Whether a feature can be installed or not and whether it is selected by default or not depends on the virtualization platform (VMware Workstation/Fusion or ESX) and on the Windows version that is running in the guest.
Features that do not have a footnote in the above list are always installed by default. For all others there are more or less complex conditions defined in the MSI file's Condition table:
1) enabled by default on ESX. Cannot be installed on VMware Workstation and Fusion.
2) enabled by default except if an MSI Property NO_TRAYICON=1 exists
3) cannot be installed with Windows 2000 or older; otherwise enabled by default
4) cannot be installed with Windows XP-32bit, Windows 2000 and older; otherwise enabled by default
5) enabled by default with Windows 2000/XP/2003/2008/2008R2; cannot be installed with other Windows versions
6) cannot be installed with Windows 2000; otherwise enabled by default
7) enabled with Windows 2003/Vista or newer, but only if both the ComSysApp and MSDTC service are not disabled; cannot be installed with other Windows version or if one of the services is disabled
8) not enabled by default; can only be installed on ESX and with Windows XP SP2+/2003 SP1+ or newer Windows versions
9) enabled by default on VMware Workstation and Fusion, but not on ESX
10) can only be installed with Windows XP and newer; enabled by default on VMware Workstation and Fusion, but not on ESX
11) enabled by default on Windows 2000 and the 32-bit versions of XP and 2003; cannot be installed elsewhere
12) enabled by default with Windows 2000 and the 32-bit versions of XP and 2003 when running on ESX/GSX; cannot be installed otherwise with other Windows versions or on VMware Workstation/Fusion
13) not enabled by default; can only be installed with Windows XP and 2003
This is what you can expect from a fresh installation of VMware Tools in a Windows VM. But things may change if you update an existing older installation of VMware Tools. Here is a really bad example: The default installation of VMware Tools on vSphere 4.x included the Shared Folders component even on ESX hosts where it is not only useless, but causes issues with user profiles on Windows Terminal Servers (see e.g. VMware KB1317). If you update such an installation with the VMware Tools of vSphere 5.x using the standard procedures then the Shared Folders component will also be updated and kept (although it would not be part of a new install).
So there is definitely a need to customize the installation/update in certain scenarios and remove or add features. How do you do this?
Customizing the VMware Tools installation on Windows
The answer is in the vSphere docs. Actually it's only a matter of using the right command line parameters for msiexec.exe resp. setup.exe, namely ADDLOCAL and REMOVE. Examples:
I like to do a fresh install of the VMware Tools 5.5 by using the following command line:
setup[64].exe /s /v /qn ADDLOCAL=All REMOVE=Hgfs,WYSE,Audio,BootCamp,Unity,VShield,TrayIcon
(This is one line)
And for updating an older installation I use the following command line:
setup[64].exe /s /v /qn REINSTALLMODE=vomus ADDLOCAL=All REMOVE=Hgfs,WYSE,Audio,BootCamp,Unity,VShield,TrayIcon
(This is also one line)
This is based on information included in VMware KB2000399: Removing modules for VMware Tools during unattended install or upgrade.
Checking the current installation
I thought it would be an easy task to check what features of the VMware Tools are actually installed, but it isn't. The MSI information is deeply buried in the Windows registry and file system using cryptic keys and file names, and there is no easy built-in utility available to query it. Luckily I stumbled over a VBScript that does exactly that. It is names WiListPrd.vbs and is available on the MSDN pages.
Run the script with the parameters "VMware Tools" f and it will output something like this:
This post first appeared on the VMware Front Experience Blog and was written by Andreas Peetz.
Follow him on Twitter to keep up to date with what he posts.
Hello there...any chance you would be wiling to step me through the WiListPrd.vbs step by step? I am not a pro in this area but would love to see the output. I clicked on the MSDN Pages link, then the Windows SDK Component for Windows Installer Developers link, where I downloaded and installed the MS Windows SDK for Win 7 and .NET Framework 3.5. SP1 and not sure what to do next, any guidance?
ReplyDeleteI'm not sure what you are asking. You only need the vbs script, and its code is on the MSDN page that I have linked.
DeleteJust create the vbs File with a text editor and cut and paste the code into it. Then run it like shown in the screenshot.