Sunday, May 13, 2012

Installing VMware Tools on Linux Guest OS

This post describes the general procedure for installing VMware Tools on Linux Guest OSs from the command line. It presumes that you are logged in as root to the VM.

First, right click the virtual machine from vSphere Client and choose VM -> Guest -> Install/Upgrade VMware Tools (equivalent on VMware Workstation / Player would be Virtual Machine -> Install VMware Tools..)

This results in .iso file with VMware Tools package being mounted on CD/DVD drive of the virtual machine.

Create a directory as a mount point for the CD/DVD drive:

mkdir /mnt/vmt

Mount the CD/DVD drive:

mount /dev/cdrom /mnt/vmt

If you do ls /mnt/vmt, you'll see that the installation .iso contains of one .tar.gz file with the packed installation. Since this is a read-only mount point, we need to extract this .tar.gz to a different directory that is writable.

First create the new directory:

mkdir /vmtools

Then unpack the contents of the installation .tar.gz file to the new directory:

tar xzf /mnt/vmt/VMwareTools-<xxxx>.tar.gz  -C /vmtools

(name of .tar.gz file can vary depending on the installed ESXi/Workstation/Player version).

Run the extracted installation file:

cd /vmtools/vmware-tools-distrib

Proceed to answer installation prompts.

Unlike on Windows, installation of VMware Tools on Linux Guest OSs does not require reboot. After the installation is finished, you can check the status of VMware Tools service by typing:

service vmware-tools status

or, if you're using RHEL or CentOS >=6.0 as the guest OS:

status vmware-tools

since these OSs use Upstart instead of legacy init for starting VMware Tools service since OS version 6.0.

After the installation is finished, perform cleanup:

umount /mnt/vmt (if not already done by the installer)
rmdir /mnt/vmt
rm -rf /vmtools

No comments:

Post a Comment