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.
However, the VMware Tools must always be in sync with the running kernel on a Linux based virtual computer and keeping them up to date can be tricky business. Once I managed to do it properly, I have decided to write it down for good.
Installing the VMware Tools for the first time is simpler 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 and make RPM packages including dependencies or internet access if using yum.
- The following procedure was developed and tested on virtual computer running Fedora Core 12 inside a VMware ESXi 4 host. With some minor modifications, it should work on other Linux distributions too.
The procedure
- Remove the VMware Tools:
vmware-uninstall-tools.pl
- Upgrade the kernel and kernel-devel packages using either rpm or yum utility. If you added the kernel package to yum’s update ignore list, remove it from the ignore list first. Run:
yum update kernel kernel-devel
- Shutdown the virtual computer.
- Change the type of SCSI controller from Paravirtual to LSI Logic Parallel, otherwise your virtual computer will not boot. It has no VMware Tools installed temporarily.
- Start the virtual computer.
- Remove the old kernel.
- Install a new version of VMware Tools:
./vmware-install.pl
After the installation, add a “.conf” extension to the /etc/modprobe/vmware-tools file, to avoid Fedora’s warnings about omitting any files in the /etc/modprobe directory not ending with “.conf” in the future. - Shutdown the virtual computer.
- Change back the type of SCSI controller from LSI Logic Parallel to Paravirtual for maximum performance.
- Start the virtual computer.
- 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
- 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.