Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Compiling and deploying VMware Tools in virtual machines without GCC

Details

When I upgrade the kernels in a Linux guest, I need to recompile VMware Tools to get them to work. But for security reasons, I do not want to have GCC on the guest. How can I redistribute compiled tools modules to virtual machines that are having a new kernel installed or compiled?

Solution

To compile and deploy VMware Tools in virtual machines without GCC:

  1. Find or create a virtual machine with GCC installed, running the kernel to which you want to deploy.

  2. Untar the VMware Tools installer tarball in that virtual machine and run the installer from the vmware-tools-distrib directory to generate the correct modules. Run config.pl from the installer or manually, and let it build the modules for the running kernel.

  3. Collect the generated modules from /lib/modules/<kernel>/misc, where <kernel> is the kernel version you are using.

    Note: To find your exact kernel version, run the command uname -r.

    Example: In a 32-bit Ubuntu 10.10 virtual machine, this command returns 2.6.35-28-generic. Your results may vary, even in a similar virtual machine, so be sure to check your own kernel version.

  4. Create a directory in vmware-tools-distrib/lib/modules/binary/<kernel> for the kernel you are running.

    Example: In a 32-bit Ubuntu 10.10 virtual machine, running kernel version 2.6.35-28-generic, create a directory called 2.6.35-28-generic.

  5. Create an objects directory under the directory created in step 4. Copy the module binary files you collected in step 3 into the objects directory.

  6. Create a file named properties under the directory created in step 4. Write the following lines in this file:

    • UtsRelease <kernel>

      Note: <kernel> must match the output of uname -r on the build system.

    • ModVersion <yes or no>

      Note: ModVersion is yes if the kernel supports versioned modules, or no if the kernel does not support versioned modules. If the kernel has CONFIG_MODVERSIONS defined, set ModVersion to yes.

    • SMP <yes or no>

      Note: SMP is yes if the running kernel is an SMP kernel, or no if the running kernel is not an SMP kernel.

    • PageOffset <C0000000 or 0000010000000000>

      Note: PageOffset is C0000000 for 32-bit kernels, or 0000010000000000 for 64-bit kernels.

    • Comment <Any comment you want to enter>

      Example: In the same Ubuntu 10.10 virtual machine, the file looks like this:

      UtsRelease 2.6.35-28-generic
      ModVersion yes
      SMP yes
      PageOffset C0000000
      Comment 2.6.35-28-generic Ubuntu 10.10


  7. Run tar to create a new tarball from the vmware-tools-distrib directory (which now includes the modules you want).

  8. Distribute the tarball you just created to the virtual machines that you want to deploy.

Tags

cannot-install-tools  install-tools  install-vmware-tools  install-vmware-tools-fails  install-vmware-tools-linux  vmware-tools  vmware-tools-install-doesnot-complete  vmware-tools-install-fails  vmware-tools-build  vmware-tools-linux

Keywords

Tools; compile; GCC; 1898; ws550; ws500; ws400; ws300; esx100; esx200; gsx100; gsx200; gsx300

Update History

05/06/2010 - Added Player and Fusion to product list; removed long, unnecessary list of product versions. Added examples to make steps clearer.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback


Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
Actions