VMware Tools script does not recognize the version of the kernel headers in Ubuntu guests
search cancel

VMware Tools script does not recognize the version of the kernel headers in Ubuntu guests

book

Article ID: 344072

calendar_today

Updated On:

Products

VMware VMware vCenter Server VMware vSphere ESXi

Issue/Introduction


Symptoms:
  • The /usr/bin/vmware-config.pl script does not recognize the version of Ubuntu kernel headers.
  • When installing VMware Tools, the script prompts for where the C header files are.


Environment

VMware ESXi 4.1.x Embedded
VMware View Manager 4.5.x
VMware ESXi 4.0.x Installable
VMware ESX 4.0.x
VMware View Client 4.5.x
VMware View Client 4.6.x
VMware vCenter Server 4.1.x
VMware Server 2.0.x (Linux)
VMware View Manager 4.6.x
VMware ESX 4.1.x
VMware ESXi 4.0.x Embedded
VMware ESXi 4.1.x Installable
VMware vCenter Server 4.0.x

Resolution

To resolve this issue, install VMware Tools on a Ubuntu guest operating system.

To install VMware Tools on a Ubuntu guest operating system:
  1. Take a backup of the /usr/bin/vmware-config-tools.pl script by running this command:

    $cp /usr/bin/vmware-config-tools.pl /tmp

  2. Modify the permissions for /usr/bin/vmware-config-tools.pl by running this command:

    $cp /usr/bin/vmware-config-tools.pl <to-present-working-directory>
    $sudo chmod 755 vmware-config-tools.pl

  3. Using a text editor, such as vi or vim, edit the /usr/bin/vmware-config-tools.pl script:

    $vi vmware-config-tools.pl

  4. Set the line numbers for the entire file running this command:

    :set nu

  5. Go to line 2909 where you see ($header_version_uts =~ s/^$pattern \"([^\"]*)\".*$/$1/;.
  6. Below line 2909, enter this line:

    $header_version_uts=$gSystem{'uts_release'};

  7. Save the file running this command:

    :wq

  8. Change the permissions for the present-working-directory/vmware-config-tools.pl script running this command:

    $sudo chmod 555 vmware-config-tools.pl

  9. Move the file to /usr/bin, by running this command:

    $sudo mv vmware-config-tools.pl /usr/bin/vmware-config-tools.pl

  10. Create a softlink for (the default path of C header files) /usr/src/linux/include to point to the actual location of the header files related to the latest kernel version:

    $sudo ln –s /usr/src/linux /usr/src/linux-headers-$(uname -r)

  11. Run /usr/bin/vmware-config-tools.pl again to install VMware Tools successfully.
  12. Open the GUI interface for the VMware Tools by running this command:

    $/usr/bin/vmware-toolbox



Additional Information

Manually building VMware Tools kernel modules in Ubuntu guests
VMware Tools 脚本无法识别 Ubuntu 客户机中的内核头文件的版本