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:
Find or create a virtual machine with GCC installed, running
the kernel to which you want to deploy.
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 manaully, and let it
build the modules for the running kernel.
Collect the generated modules from /lib/modules/[kernel]/misc, where [kernel] is the kernel version you are using.
Create an appropriate directory in vmware-tools-distrib/lib/modules/binary/[kernel] for the
kernel you are running.
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.
Create a file named properties under the directory created in step 4. Write
the following lines in this file:
UtsRelease [kernel] ? [kernel] must match the output of uname -r on the build system.
ModVersion [yes or no] ? 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] ? 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] ? usually, PageOffset is C0000000 for 32-bit kernels, or 0000010000000000 for 64-bit kernels.
Comment [comment from user] ? Any comment you want to
enter.
Run tar to create a new tarball from the vmware-tools-distrib directory (which now includes the
modules you want).
Distribute the tarball you just created to the virtual
machines to which you want to deploy.