How to Install VMware Tools: the complete guide

Save to My DOJO

How to Install VMware Tools: the complete guide

VMware Tools is a software add-on inside the guest Operating System running in a Virtual Machine on a VMware based virtualization platform (vSphere, Workstation, Fusion). It is not mandatory to use it in order to run a VM, but it does provide notable improvements and extra features. For this reason, it is highly recommended by VMware to install it, usually after a fresh OS install for a master image.

VMware Tools is the same for VMware ESXi, VMware Workstation, VMware Player, and VMware Fusion. Only the features required differ. Note that other virtualization platforms have a similar concept: for example, Microsoft Hyper-V has the Integration Services, Nutanix AHV has the NGT (Nutanix Guest Tools).

Why Install VMware Tools?

As mentioned, VMware Tools is very useful because it provides a lot of improvements and features:

  • New device drivers, also paravirtualized: VMXNet NIC drivers, Paravirtual SCSI driver, Audio driver
  • Improved mouse (also in the HTML5 console) and video (with the SVGA driver)
  • Memory management improvement: adding the memctl driver used by memory ballooning.
  • Virtual machine monitoring: including new graph, VM heatbeat (used for example for vSphere HA VM), detailed guest information (including IP addresses, guest OS hostname, …)
  • Guest time synchronization
  • Guest Introspection useful for antirust and/or NSX integration
  • Support for quiescing a file system
  • Capability to run custom scripts
  • Customize guest operating systems as a part of the vCenter Server and other VMware products
  • Ability to gracefully shut down or restart the VM
  • On Workstation, Player or Fusion there are other features like the possibility to share files with the host OS.

Is there any reason not to install VMware Tools?

Most paravirtualized device drivers are now included in Linux Kernels or even in Windows mainline driver updates. But VMware Tools is more than just the driver part.

Some state that it can reduce the security of your guest OS, but this is not true. Others prefer not to install it as it will disable some related features, for example not enabling memory ballooning into the VM. However, there are better options to disable specific features like this.

Note that there are also buggy (deprecated) versions of VMware Tools, like 10.3.0, due to a VMXNET3 driver related issue (for more information, see VMware KB 57796). Those versions should never be installed!

Installing VMware Tools should be part of the process of creating a new VM and upgrading them should be part of the VMs’ lifecycles.

This article will provide more details on how to perform those steps. For more information refer to the official documentation.

VMware Tools Formats

The VM Tools can be sources through three different channels to accommodate the vast majority of environments.

  • Built-in: While VMware Tools is a common component across various VMware products, it is usually included with those referred to as the “built-in” format.
  • Asynchronous: Historically, it has been included in VMware ESXi, VMware Workstation, VMware Player, and VMware Fusion. However, from September 3rd, 2015, it is also possible to download it independently. This is the “downloadable” (or asynchronous) format.
  • VM Tools for Linux:
    • Open VM Tools (OVT): It’s the Open Source implementation of VMware Tools for Linux guest OSes or other Unix OSes and VMware’s recommended implementation. Note that the OVT packages are bundled with most recent Linux distributions (RHEL 7 and above for Red Hat), making it easy to manage its lifecycle like all the other Linux packages. For more information refer to the original documentation.
    • Operating System Specific Packages (OSP): Those are typically available for older Linux releases (RHEL 6 and under for Red Hat). OSPs are signed and hosted by VMware and can be installed in the OS with your package manager for example (deb, rpm…).

From now on, in the vast majority of cases and unless there are special environmental considerations, customers should use built-in VMware tools (be it the Windows version embedded in ESXi or Linux OVT).

VMware Tools versions

As mentioned, each VMware virtualization platform version comes with its own VMware Tools built-in version. Once the hypervisor has been upgraded, the VMware tools can, in turn, be updated.

Like every VMware product, VM tools have a version number and a build number for each iteration. Which are associated (bundled) with specific vSphere, Fusion and Workstation versions.

There is an official document from VMware to help keep this matching.

For example, for vSphere 6.5 and 6.7 those are the main built-in versions:

VMware vSphere version VMware Tools version VMware Tools build
6.5 10.1.0 10252
6.5U1 10.1.7 10279
6.5U2 10.2.1 10305
6.5U3 10.3.10 10346
6.7 10.2.0 10304
6.7U1 10.3.2 10338
6.7U2 10.3.10 10341
6.7U3 10.3.10 10346

 

Is it possible to verify your VMware Tools version?

  • From inside the Windows guest

From inside a Windows guest OS, you can display the version and build of the installed package using the command line:

VMware Tools version cmd.exe

Or simply open the VMware Tools icon in the system tray (this does not apply if you have a Windows Server Core installation):

VMware Tools About Version

  • From inside the Linux guest

For Linux distributions, you can either check the package information or query the “vmware-toolbox-cmd” command.

VMwareToolboxCmd.exe -v

  • vSphere / vCenter

In the vSphere web client, display the details of a running VM to obtain the version. Note that the VM and the tools inside of it must be running for the VMware tools to be effectively queried by ESXi. You also get the status of the VMware tools which will tell you if the best version is running.

VMware tools Guest OS Status

  • PowerCLI

If you use PowerCLI for your reports, automation, or daily admin life, you can also get the VM Tools version and status of one or several virtual machines. You will find these details in the following properties of a VM object (once again, the VM must be running and not crashed):

Version : $VM.Guest.ExtensionData.ToolsVersion

Status : $VM.Guest.ExtensionData.ToolsVersion

How to Install VMware Tools

Which version and format should I use?

First of all, which version should I choose? Usually, for all supported guest OSes (see VMware KB 2015161), the latest version is best, considering that it is also backward (and forward) compatible with different versions of hypervisor. The suggested rule is to keep them updated at least with the build-in version. However, do make sure that your VMware Tools version is at least “newer” than the hardware level (compatibility) of the virtual machine as they contain the drivers for the new virtual hardware.

Note that there are also some “frozen” versions of VMware Tools for supporting legacy OSes. In that case, of course, the rule is to use the latest frozen version.

Then, which format should I use? Usually, for Windows OS you will use the built-in format and the OVT format for recent Linux distribution.

Refer to the VMware Compatibility Guide for more detailed information. Specify the Guest OS category, version and the VMware product.

For example, see the recommendations for Debian 10 running on ESXi 7.0:

VMware tools installation

On ESXi the OVT is supported and the OSP is not.

For Windows Server 2019 both the built-in and downloadable formats are supported. Note that the guest OS compatibility guide will provide a lot of other useful information, including the support level, the recommended driver types, and specific notes for the installation or configuration of the guest OS.

Installing VMware Tools

Now we will discuss how to install VMware Tools on ESXi in four different cases:

  • Built-in VMware Tools for Windows OS
  • Downloadable VMware Tools Windows OS
  • Unattended install Windows OS
  • OVT for Linux OS

I will not consider OSP as it is specific to legacy Linux distributions which are bound to disappear and would require its own blog post. In some cases, it may also require the developer library and the compiler.

  • Built-in VMware Tools for Windows OS

This is the easy way and for VMware Workstation, Player, Fusion can also be automated during the OS installation.

For VMware vSphere, using the vSphere (HTML5) client, right-click on the VM and select Guest OS > Install Tools.

This will not install VMware Tools as the hypervisor is not “guest aware” yet, it will simply mount a guest OS-specific ISO file to the VM virtual CD-ROM. To use this type of installation, having a virtual CD-ROM in your VM is mandatory!

Some ISOs are included and depending on the guest OS one of them will be used:

  • windows.iso for all Windows OS NT 6.0 (Vista or Windows Server 2008) or later.
  • winPreVista.iso for Windows guest OSes earlier than Windows Vista.
  • linux.iso for Linux guest OSes glibc 2.5 or later.

Note that since the release of VMware Tools 10.1 (on 2015) only a subset of guest OSes is included in the built-in version, removing some legacy or uncommon OSes. In this case, the only solution is to use the downloadable format. It’s also possible to add new ISO in the built-in version, but this case will be considered later.

Now that the ISO is mounted in your VM, you can proceed with the real VMware Tools installation steps. For Windows, you can use the autorun or double-click the setup.exe file and the installation will start.

There are three different installation options:

  • Typical: suitable for most ESXi use cases and should be selected as the default.
  • Complete: Suitable in highly heterogeneous environments.
  • Custom: Use it to install specific components such as Guest Introspection Thin Agent driver, App Defense or vShield. You may also want to remove some features in non-standard environments.

VMware tools Setup

Essentially, the typical installation does not include specific options such as:

  • Guest introspection and VMware AppDefense which may be needed with some antivirus for VMware vSphere or in some cases in an NSX deployment.
  • Shared folders which are not supported on ESXi, so it should only be installed in VMs running on VMware Workstation, Player or Fusion.

VMware tools Custom Setup

All other drivers and features should be installed. For that reason, the typical installation is usually the best option in ESXi environments.

After the installation, a Windows restart is needed even though most of the VMware Tools features are already running. Note that during the installation you may experience minor issues in your VM due to the driver installation and virtual hardware reconfiguration (for example you will see a temporary blank screen in your console).

Of course, the interactive installation is one possible way to add VMware Tools, but there is also a non-interactive way (unattended) that will be described later, which is useful for scripting or for Windows Server Core.

On Windows OS, VMware Tools installation will also install (if not present) the proper Microsoft Visual C++ library version and a certain service pack level of the OS may be needed to install them. The required Visual C++ version is specified in each VMware Tools release notes.

  • Downloadable VMware Tools Windows OS

The first question is how do I download VMware tools? You can download it from the specific VMware product page choosing the Driver & Tools tab:

Downloadable VMware Tools Windows OS

For each version you have different download options:

  • Binary packages for Windows
  • MSI packages for Windows
  • Binary packages for Mac OS X
  • Offline VIB package for ESXi
  • For older versions, you may also have specific Linux binary packages

Download VMware Tools Product

To access the different VMware Tools versions, you can also use this direct download link.

Let’s consider the Windows packages. The binary format is a ZIP or tar.gz file that contains the ISO file. Once you have downloaded the ISO you will need to mount it on the VM. You can do so interactively through the virtual console or upload it to a datastore. Once the ISO is mounted, refer to the previous chapter for the installation steps.

  • Unattended install Windows OS

More interesting is how to perform a non-interactive installation on Windows using either the exe or msi file:

  • Use setup.exe options to perform a silent installation (this also works with the built-in format discussed before)
  • Use the MSI package to distribute and automate its installation with traditional deployment tools like Active Directory GPO, or Microsoft System Center.

Let’s see how to perform a silent installation using the proper setup.exe options. Below is an example of a typical installation with logging enabled.

setup.exe /s /v”/qn /l*v “”%TEMP%\vmmsi.log”””

Note that the approach also works for VMware Tools update/upgrade.

Of course, you can also specify which features should be installed. To exclude some components, use the ADDLOCAL and REMOVE options. The example below installs all components but the shared folder feature:

setup.exe /S /v “/qn REBOOT=R ADDLOCAL=ALL REMOVE=Hgfs”

  • OVT for Linux OS

This operation depends on the Linux distribution type because different package managers are used in different types of distributions. Note that most main distributions include the OVT so you may not need to install it. Updating the package would be recommended, however.

For Debian/Ubuntu:

sudo apt-get install open-vm-tools

For RedHat/CentOS (using yum):

sudo yum install open-vm-tools

Note that an optional package named “open-vm-tools-desktop” can be installed to improve interaction with the VM, resize the display …

Unlike the Windows version, installing OVT (also OSP) on Linux does not require any reboot. Although consider that new device drivers may be added and the boot ramdisk image may change. A planned reboot would guarantee that the installation is correct and the Linux OS still boots properly.

How to update the built-in version on the ESXi host

As mentioned earlier, the built-in version depends on the host’s version. However, is it possible to use the downloadable version to update the built-in version? I ask this because the installation (and also the update/upgrade) of VMware Tools is very easy in this case and can be performed from the virtualization platform.

In the case of vSphere there are two different ways to update the built-in VMware Tools with a desired downloadable version:

  • Using the offload VIB (vSphere Installation Bundle) package

The VIB package is a very interesting and easy way to update your ESXi built-in version. You can install a VIB package on ESXi using the esxcli (see KB 2008939) or VUM (now called LifeCycle Manager). Here is a complete guide on how to install a VIB package on ESXi.

  • By manually updating the ISO file

Usually, all the bundled Tools ISO image files are located in the ESXi filesystem in the /locker/packages/ directory. However, the partition where /locker resides is limited and may not have enough free space to store all VMware Tools packages. Also, new ESXi patches or updates that include a new tools-light VIB package may overwrite or change the content of this directory.

For those reasons, you can specify a new repository using the UserVars.ProductLockerLocation variable.

You can download the VMware Tools packages from VMware site and then extract and copy the vmtools and floppies sub-directories to new productLocker destination.

One interesting approach is to configure a centralized repository for several ESXi hosts, as described in this guide.

How to Update an Installed Version in a Guest OS

  • Linux OVT

In order to keep the OVT updated, keeping your Linux distribution updated will do just that. It is obviously also possible to update the tools using the OS’s package manager.

  • Windows Built-in

In this case, the procedure may change a little between the different VMware product, the virtualization layer detects any outdated VMware Tools versions (compared with the built-in version, of course).

For instance, in a vSphere environment, you will notice that the status of the VMware Tools changes from “Current” to “Upgrade available”. Note that you can get this information in PowerCLI as described previously.

Update Vmware tools in a Guest OS

To update/upgrade the VMware Tools, click on “Upgrade VMware Tools…”, or using the vSphere (HTML5) client, right-click on the VM and select Guest OS > Upgrade VMware Tools.

A popup window will offer the choice of upgrade:

Upgrade Vmware tools

You can choose from the two different ways to update/upgrade the VMware Tools in the guest OS:

  • Interactive upgrade: Similar to a fresh installation (as described before) and requires guest OS access with administrative credential to perform the operation.
  • Automatic upgrade (default): Unattended operation which updates your VMware Tools and does not require any guest OS credential (remember that VMware Tools runs as a local service with high privileges).

Automatic VMware Tools upgrade is supported only for virtual machines with a Windows guest operating system.

  • Other considerations

Is an OS reboot needed to complete an update/upgrade?

Starting with VMware Tools 9.x (with vSphere 5.1) no reboots will be required for subsequent VMware Tools upgrades on Windows OS. However note that there are many cases where a reboot will happen, for example on version 10.3.x if Visual C++ libraries must be updated (see this post). Be aware that the reboot will be automatically and silently performed if you have chosen the automatic upgrade option.

On Linux, a reboot is not needed either for the installation or for the update/upgrade.

Still, I suggest to always consider a VMware Tools update/upgrade as a change in your system and plan this operation outside production hours (at least for production systems). Also, driver upgrades may cause a short freeze of your VM. For those reasons I suggest planning a reboot after the VMware Tools update/upgrade and use this window to finalize another guest OSs update and then reboot the VM.

What about update/upgrade the VMware Tools if you are using the downloadable version?

In the case of a vSphere environment, I suggest to first update the built-in version using the offline VIB package (or use the centralized repository) as described before. This will take you to the previous situation on how to update VMware Tools using the built-in version.

Silent or batched updates could be performed as described in the installation process as well as with PowerCLI cmdlet.

For more information on the install/update/upgrade process see the VMware Tools documentation or also the VMware KB 2004754 – old but still valuable.

There is also a great post about how to keep the VMware Tools updated which describes a different way for VMware vSphere by embedding the VMware Tools check in the VM property settings.

How to check VMware Tools version for more VMs

In the VM lists of the vSphere client, add the column to display the Tools versions and status. VMware Tools Version Status is the field that reports the build number of the VMware Tools installed in your guest OSes:

check VMware Tools version for more VMs

Note that you can also export the entire table in different formats, including the CSV format (that is the easiest way to import in a spreadsheet). As suggested previously it is also possible to get this information in PowerCLI.

How to update VMware Tools on several VMs

You can also start a massive VMware Tools update on a bunch of VMs and on specific timing. VUM (now called LifeCycle Manager) can not only perform ESXi patching but also automatically manage the VMware Tools update for a select list of VMs (for example all VMs in a VM folder).

There are different articles that describe this method, but it is the same process as the host patching. Large updates can also be performed with PowerCLI, like in the example of upgrading VMware Tools in all VMs while preventing the automatic reboot should there be one:

GetVM * | UpdateTools -NoReboot

Why Can’t I Install/Update/Upgrade VMware Tools?

There can be several cases when the VMware Tools installation or update/upgrade will fail or will not complete successfully.

First, let’s start with some general recommendations:

  • Be sure not to have a pending reboot in the guest OS: this may prevent a correct installation or update/upgrade for each software package, including of course VMware Tools
  • Be sure to have enough free disk space in the guest OS: usually, during the installation/update/upgrade this check is performed automatically.
  • Be sure to follow the right order during an update/upgrade: for all VMware products, there is the VMware Product Interoperability Matrices that can help you in a full-stack update.
  • Be sure that no ISO is connected to your VM and, if present, umount it (on Linux/Unix) or eject if (on Windows) before starting the VMware Tools install or update. This is very important in the built-in version.
  • Antivirus may block VMware installation or update.

If you are using the ProductLockerLocation variable as described before, attempts to upgrade or install without setting the variable properly will fail with a missing ISO error. For more information, see the VMware KB 2129825.

In case the VMware Tools installation remains pending you can try to stop the operation by selecting, in the vSphere Client, Guest > End VMware Tools Install. For more information, read this post. 

Sometimes you need to reinstall VMware Tools after deleting it because the update/upgrade does not work at all.

To perform a full removal, for a Windows OS, just use the control panel and then verify that the C:\Program Files\VMware\VMware Tools and C:\ProgramData\VMware\VMware Tools folders are empty. If not delete them and reboot the virtual machine. After that try to re-install the new version.

If you face MSI missing error, you can run the following command to clean the Windows registry:

setup.exe /C

Conclusion

VMware Tools is often regarded as an optional component by a number of administrators who are not well versed in virtualization and don’t understand the purpose that well. However, ensuring that all virtual machines are equipped with it is crucial to ensure a stable and high-performing virtual environment. It not only improves the user experience when connecting through the virtual console and facilitates reporting, but also enables important memory reclamation mechanisms that could prevent VM crashes in case of memory contention on a host, or ensure that all the correct drivers are in use.

Altaro VM Backup
Share this post

Not a DOJO Member yet?

Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!

Leave a comment

Your email address will not be published. Required fields are marked *