In this article we will take a look on how to deploy VMware Tools on Linux virtual machines. Deploying VMTools in the guest operating system of a virtual machine increases its performance and manageability. With VMTools, some of the drivers included in the OS are being replaced with a version optimized for the virtualization (for example vmxnet3 driver). In addition, VMTools provides API frameworks (such as VIX) that allow to manage virtual machines. This time we will show how to install VMware Tools in popular Linux distributions (VMware Tools is supported on 32-bit and 64-bit operating systems).
Ways to Install VMware Tools
Depending on the Linux distribution, there are several ways to install VMware Tools. The first and the most used method is the installation of VMware Tools from ISO. ISO file which contains binary files of vmtools (installation files, scripts, etc.) is mounted on a virtual CD-ROM from the guest menu of the virtual machine. After that vmtools should be installed by executing a Perl script.
Another popular method of installation is the use of Open-VM-Tools (OVT) from VMware. Thanks to this, vmtools can be automatically installed during OS installation (or from the repository using YUM or APT).
Installing VMware Tools from ISO
Let’s show an example of installing vmtools from an ISO image on Centos 6.x virtual machine.
To proceed with the installation, right-click the virtual machine name, select Guest and click Install/Upgrade VMware Tools. Press OK to confirm.
After this, the ISO image for this Linux distribution has been mounted. To do this, make sure that the correct operating system has been selected for the virtual machine (check the operating system type in the VM properties).
Log in to the guest OS and follow these steps (depending on the distribution, some steps may differ):
1. Create a folder and mount the ISO image.
mkdir /vmtools mount /dev/cdrom /vmtools
2. Unpack the vmtools archive and copy the folders to /tmp.
tar –zxf /vmtools/VmwareTools-*.tar.gz –C /tmp
3. In this case missing dependencies can be detected (especially on freshly installed virtual machines). For example, we first had to run the following command to extract the YUM and install the packages necessary to ensure the successful installation of vmtools:
yum –y install kernel-devel gcc dracut make perl eject
4. Now go to the /tmp folder and run the Perl installation script. You must enable the default settings if you are not going to configure the installation process manually:
5. To verify the installation process has completed, you can view the status of VMware Tools in the vSphere client.
Installing open-vm-tools From the Repository
Open-vm-tools is a replacement for the familiar VMware tools. It is developed by the VMware, but with the participation of the community. VMware plans to stop supporting VMware tools for those Linux distributions where open-vm-tools is present. Development is open and performed on GitHub.
Currently, the following Linux distributions support OVT:
- Fedora 19 and above;
- Debian 7.x and higher;
- openSUSE 11.x and higher;
- Ubuntu (12.04 LTS, 13.10 and above);
- Red Hat Enterprise Linux 7.0 or higher;
- CentOS 7.0 or higher;
- Oracle Linux 7.0 and higher;
- SUSE Linux Enterprise 12 and higher.
In the following examples, we will show how to install open-vm-tools on a popular Linux distributions.
There is no default package in the system. The installation is straightforward, no additional PPA is required, the package is enabled during installation.
su apt-get update apt-get install open-vm-tools -y
The package is available in a regular repository, without any EPEL. By default the package is not installed in the minimum OS configuration. Install the package from the non-root user and enable it in systemd:
sudo yum install open-vm-tools sudo systemctl enable vmtoolsd sudo systemctl start vmtoolsd
In our test system, the package has already been installed. If your system does not have it, then the installation is similar to Ubuntu 14.04, but the inclusion is different, since Ubuntu 16.04 moved to systemd.
sudo apt-get update sudo apt-get install open-vm-tools –y sudo systemctl enable open-vm-tools sudo systemctl start open-vm-tools
After installing OVT, you can notice that the vmtools status is shown in the vSphere console as Running (Guest Managed). For third-party vmtools, the status will be Running (3rd-party/Independent). This is normal and expected from OSP (Operating System Specific Packages), using the basic software and installation mechanisms on guest OSs for updating vmtools.