Manually building VMware Tools kernel modules in Ubuntu guests
search cancel

Manually building VMware Tools kernel modules in Ubuntu guests


Article ID: 342972


Updated On:


VMware VMware Desktop Hypervisor VMware vSphere ESXi


While running the /usr/bin/ script during the VMware Tools installation, you might need to manually build the VMware Tools kernel modules on an Ubuntu guest. For example, if the guest does not have support for prebuilt kernel modules (PBMs), you will need to build them manually. PBMs are a collection of Linux drivers that facilitate optimal operation of the virtual machine.


Missing Prebuilt Kernel Modules

If the /usr/bin/ script cannot locate prebuilt kernel modules for your guest, the following message appears:

None of the pre-built vmmemctl modules for VMware Tools is suitable for your running kernel. Do you want this program to try to build the vmmemctl module for your system (you need to have a C compiler installed on your system)? [yes]

Solution: Press Y to continue the install process.

Missing Compiler Program

If the /usr/bin/ script cannot find a C compiler program on your system, one of the following messages appears:

  • Unable to find the 'make' program.

Solution: Run the apt-get install build-essentialcommand to install the packages needed to build the kernel modules.

  • Setup is unable to find the 'make' program on your machine. Please make sure it is installed. Do you want to specify the location of this program by hand? [yes]

Solution: Provide the complete name of a binary 'make' file.

  1. Press Y to continue. The following message appears: What is the location of the 'make' program on your machine?
  2. Enter the complete name of a binary 'make' file. If you do not provide the complete name, the following message appears: The answer "<binary file name> is invalid. It must be the complete name of a binary file.

Locating and Installing the C Header Files

If the script cannot locate the C header files in the default directory, /usr/src/linux/include, the following message appears:

What is the location of the directory of C header files that match your running kernel?

Solution: In a terminal window, run the following commands to install the Linux C header files:

  1. Run theuname -rcommand to find the kernel version. An example of the output:2.6.24-23-server.
  2. Run theapt-cache search <version number>command to get the list of packages that includes the version number. For example:apt-cache search 2.6.24-23-server. Check the list and locate the linux-headers package name ( linux-headers-<kernel version>). For example:linux-headers-2.6.24-23-server.
  3. Run theapt-get install linux-headers-<kernel version>command to install the Linux C header files on your system. For example:apt-get install linux-headers-2.6.24-23-server.
After the script detects the header files, it will use them in building the kernel modules.

Alternatively, you can run the command:

aptitude install linux-headers-$(uname -r)

General Instructions

For general instructions on installing VMware Tools in an Ubuntu Guest, see:

Additional Information:

For translated versions of this article, see: