How to install VMware Tools on Linux

VMware Tools is a set of drivers and utilities to make a virtual computer perform better and faster inside a virtual hosted environment. It makes a virtual computer aware of its host at least to some degree.

Once I managed to install the VMware Tools on a Linux based virtual computer properly, I have decided to write it down for good.

Upgrading the VMware Tools is somehow different and is described here.

Before making any steps described below, please create a snapshot of your virtual computer in case the following procedure fails in your case.

Requirements

  • VMware Tools installation files, usually distributed as a gziped TAR archive found on the CD-ROM that is “inserted” into virtual computer when one selects “Install/Upgrade VMware Tools” feature on the ESXi host.
  • kernel-devel, gcc, mkinitrd (now part of dracut package), make and perl RPM packages including dependencies or internet access if using yum.
  • The following procedure was developed and tested on virtual computer running Fedora Core 12 (kernel version 2.6.32) inside a VMware ESXi 4 host. With some minor modifications, it should work on other Linux distributions too.

The procedure

  1. Install the kernel-devel, gcc, dracut, make and perl packages using either rpm or yum utility. Run:
    yum install kernel-devel gcc dracut make perl
  2. Install the VMware Tools:
    ./vmware-install.pl
    After the installation, add a “.conf” extension to the /etc/modprobe.d/vmware-tools file, to avoid Fedora’s warnings about omitting any files in the /etc/modprobe.d directory not ending with “.conf” in the future.
  3. Shutdown the virtual computer.
  4. Change the type of SCSI controller from LSI Logic Parallel to Paravirtual for maximum performance. Consider replacing E1000 and VMXNET 2 network adapters with the VMXNET 3 class also (see Additional Notes No. 2 below).
  5. Start the virtual computer.
  6. Add the kernel package to yum’s update ignore list to prevent accidental installation of newer kernel. Add the following line to the /etc/yum.conf file:
    exclude=kernel*

Additional notes

  1. If you experience poor performance of the virtual network adapter (slow SCP, stalled SMB file transfers, etc.), try disabling the protocol offloading by running:
    /sbin/ethtool -K eth0 tso off rx off tx off gso off
    If this helps in your case too, add the above command to your /etc/rc.d/rc.local file.
  2. Alas, network adapter class cannot be changed to VMXNET 3 simply. You can remove the old network adapters and re-add new. However, note that their MAC address might change. Update the ifcfg-eth* files to reflect the change.

Leave a Reply

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