VMware Tools and SUSE Linux Enterprise Server cooperate more when you add a VMware OSP to the equation. Modified kernel? No worries -- you can customize the package installation.
Use this method as a blueprint to install VMware Tools from OSPs on other Linux distributions as well. OSP management doesn't vary much from one Linux distribution to another, so the approach described here also works on other supported client platforms like Ubuntu or Red Hat.
Start by preparing repositories from which the packages can be installed. The guest OS will trust the repositories' data if you import secure GPG files. Import and install these files on the guest OS. Import both key files using rpm –import *.pub.
After importing the GPG keys, add the repository for the OSP files. Refer it to the right location by providing the ESXi version in use (such as 5.1), the guest distribution (such as SLES 11.2) and the guest's architecture (such as x86_64).
Based on this information, you can add the repository using a command that looks like the following:
#zypper addservice --type=YUM http://packages.vmware.com/tools/esx/5.1/sles11.2/x86_64 vmware-tools-collection
Run the zypper packages vmware-tools-collection command to see a list of all packages offered by the newly added repository. Verify that the OS-specific packages are available.
Before installing VMware Tools, use uname –r to find out which kernel type and current version you are using. Pay attention to the suffix shown. For example, with kernel 3.0.18-0.27-default, it is "default" that matters. You will use this suffix in the name of the vmware-tools-esx-kmods package. Assuming that you are using a default kernel type, you can now run the command:
zypper install vmware-tools-collection vmware-tools-esx-kmods-default vmware-tools-esx
VMware OSPs for modified Linux kernels
You now have VMware Tools installed from a VMware OSP on a standard kernel, but you might have a modified kernel, not a standard one. To include VMware Tools from OSPs on a modified kernel, bind a binary kernel module for the modified kernel. Download the source packages from VMware. For example, to use SLES11 SP2 on ESXi 5.1, download the source package from this list (see Figure 1).
Figure 1. Source packages are available on the VMware website for modified Linux kernels.
Once you've downloaded all of the source packages from VMware, install the gcc, kernel-source and kernel-syms packages on your SUSE server. Then rebuild all of the source packages using:
for i in *.src.rpm
rpmbuild --rebuild $i
This script, which assumes that the source packages are in the current directory, will build all binary packages that fit the current kernel on your server. You'll recognize these packages by their name; they all end in x86_64.prm. Install the packages using:
for I in *.x86_64.rpm
rpm –ivh --nodeps $i
The custom packages are now installed on the virtual guest.
This was first published in June 2013