Installing VMware tools on Windows guests is easy. You just select to install it from your VMware client and it appears as a CD. You can then install it as you would any other software.
On Linux, it is a bit more difficult. Again, selecting to install it from your VMware client puts it in the CD drive. However, depending on your distribution, it may not be automatically mounted.
For an IDE virtual CD drive this mount, copy and then unmount would be something like
# mount -t iso9660 -o ro /dev/hda /media/cdrom # cp /media/cdrom/VMwareTools-4.0.0-164009.tar.gz /root # umount /media/cdrom
For a SCSI, SATA or SAS drive, this would be /dev/sda rather than /dev/hda. The “a” here assumes that it is the first drive. The 3rd SATA drive would be /dev/sdc, for example. In addition to this, partitions are labelled with numbers (such as /dev/sdc2 for the 2nd partition on the 3rd SATA drive) but this is not an issue for optical media such as CDs.
Now that the VMware tools archive has been copied off, it can be extracted.
# tar -xzf VMwareTools-4.0.0-164009.tar.gzMost people add a “v” to the options for verbose output but not only do I find it pointless, it also slows down the extraction (particularly over SSH, particularly for archives with a large number of files). You do not need it to tell if an error occurred during the extraction, as it tells you anyway. The “x” option is to extract the archive (“c” would be to create one), the “z” means use gzip (“j” would be bzip2) and the “f” specifies the archive’s file name.
Before we install vmware tools, there are some dependencies that we must meet. I am doing this with Debian 5.0.1 AMD64 on a VMWare vSphere (ESX 4.0) host. If you do not meet these dependencies beforehand, you will probably have to break out of the installer with ctrl+c and re-run the whole thing several times, which is not good.
The “killall” tool must be installed. You can tell if it is by running which killall. If a path appears, it is installed. If nothing appears, it is not. In Debian, this is not installed by default and is in the “psmisc” package.
In addition to this, we will need to compile kernel modules during the configure stage of the installation. This is apparently not always required but I have not met a distribution yet on which it was not required to compile them from source (possibly RHEL?). This means that we will need gcc, make and the Linux kernel headers. To take care of these dependencies run
# apt-get update # apt-get install psmisc gcc make linux-headers-`uname -r`
You may need to update your running kernel if it can no longer find the headers for your running kernel in the repository. You can do this with apt-get dist-upgrade.
Now that you have the dependencies installed, run ./vmware-install.pl. You probably just want to say “yes” to everything. (man yes)