The most common way to install the VMware Tools is to mount the VMware Tools installer in the VM and run the installer from there. For mass-deployments (or simply because it’s more convenient), this is a cumbersome way to install the VMware Tools in a lot of VMs. VMware therefore provides a repository that can be used to install those packages as well.
To use the repository, you first need to download the GPG keys that allow the packages to be authenticated. That means installing the seperate keys that can be found in the http://packages.vmware.com/tools/keys directory. At the time of writing, these are commands you can use to import them.
$ rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub $ rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub
Next, enable the VMware Tools repository. Create the file /etc/yum.repos.d/vmware-tools.repo and enter the following content for Red Hat Enterprise 5 and CentOS 5 in x64-bit mode.
[vmware-tools] name=VMware Tools baseurl=http://packages.vmware.com/tools/esx/4.1/rhel5/x86_64 enabled=1 gpgcheck=1
If you’re running RHEL 6 or CentOS 6, change the file content to the following.
[vmware-tools] name=VMware Tools baseurl=http://packages.vmware.com/tools/esx/4.1/rhel6/x86_64 enabled=1 gpgcheck=1
The architecture (x86_64 in both examples) can be changed to i686 as well if you’re running on 32-bit hardware. The ESX-version, in the example both times 4.1, can also be changed for different hosts. Possible values are 3.5, 4.0, 4.1 or 5.0. More specific versions are also available at the Repository-listing of directories.
Once the repository has been put in place, you can use the default Yum Package Manager to install the package(s).
$ yum install vmware-open-vm-tools-nox
The above will install the VMware Tools for an environment without X (nox), so no graphical windows. Other options are also available, as yum will tell you.
$ yum search vmware-open ===================================================== N/S Matched: vmware-open ============================ vmware-open-vm-tools.x86_64 : VMware tools (both kernel- and user-space portions) vmware-open-vm-tools-common.x86_64 : Shared utilities/daemons for VMware Tools vmware-open-vm-tools-kmod.x86_64 : Kernel modules for VMware Tools vmware-open-vm-tools-nox.x86_64 : VMware tools (both kernel- and user-space portions) without X components vmware-open-vm-tools-xorg-drv-display.x86_64 : X display drivers for VMware Tools vmware-open-vm-tools-xorg-drv-mouse.x86_64 : X mouse drivers for VMware Tools vmware-open-vm-tools-xorg-utilities.x86_64 : X applications for VMware Tools
A downside to this method seems to be that the packages are slightly more outdated than the ones that are provided with the latest ESX(i)-patches. If it’s a must to always run the very latest VMware Tools, it would seem best to create RPM packages yourself and distribute them via your own repository.