How To Install VMware Tools on Ubuntu Guests

By | 2007/10/02

How To Install VMware Tools on Ubuntu Guests

I’ve been playing more and more with virtualization lately. Partly in testing Ubuntu alpha and beta releases but also testing the folding project installer and compatibility with multiple distributions. You may have seen my previous tutorials on installing VMware Server on Ubuntu 7.04 or installing VMware Server on Ubuntu 7.10. This tutorial should maintain compatibility with either host (servers running 7.04 or 7.10) in installing vmware tools within the Ubuntu guests.

Install The Compiler Tools

You’ll need to install a few packages in order to compile the latest VMware Tools. These steps are done within the Ubuntu virtual guest:

sudo aptitude install build-essential linux-headers-$(uname -r)

Install VMware Tools

Next you need to tell VMware Server that you’d like to install the VMware Tools. This is done by clicking on VM > Install VMware Tools… in the VMware Server menu running on the host. This must be done while the virtual Ubuntu guest is already running.

This will load a virtual CDROM within your virtualized Ubuntu guest. You may see a window pop-up within the guest. You can close this as we’ll be compiling the VMware Tools on the command line.

Open a terminal (Applications | Accessories | Terminal) and use the following commands. It should be safe to copy-paste:

sudo aptitude update
sudo aptitude install build-essential linux-headers-$(uname -r)
cp -a /media/cdrom/VMwareTools* /tmp/
cd /tmp/
tar -vxzf VMwareTools*.gz
cd vmware-tools-distrib/
sudo ./

Simply select all the defaults (press ENTER) at the prompts and before you know it you’ll have VMware Tools installed on the virtual Ubuntu guests. The only prompt I had to make a different selection on in my machines was the video resolution.

note: considering we are compiling the tools for the current running version of the kernel these steps may need to be retaken if the virtualized Ubuntu guest upgrades its kernel.

53 thoughts on “How To Install VMware Tools on Ubuntu Guests

  1. Mo

    Your VMWare tutorials are helpful, but have you ever tried VirtualBox? It’s much easier to set up (they provide DEBs and even a repository for Ubuntu) and use, and it’s open source! Try it out if you haven’t before.

  2. Ubuntu Tutorials

    Mo – I have used virtualbox and I’ve got a VirtualBox tutorial in the works. The problem is that VirtualBox does not do proper network bridging without a lot of extra work, whereas VMware Server does. This is really the primary reason I’m using VMware Server currently.

    I’ll get it figured out, and you’re sure to see a tutorial once I do.

  3. kalahari875

    I am trying this on Ubuntu 7.10 Server and every module in VMware Tools fails to compile. I have all the prerequisites (build-essential, linux headers for the server edition, etc.).

    vmmemctl-only/os.c:26:26: error: linux/config.h: No such file or directory

    vmhgfs-only/driver.c: In function ‘HgfsGetSb’:
    vmhgfs-only/driver.c:4454: error: too few arguments to function ‘get_sb_nodev’

  4. Ron Cary

    I ran into a problem installing VMtools. When I enter the 2nd step in the 2nd section of your instructions (sudo aptitude install build-essential linux-headers-$(uname -r)) I receive the following error:
    bash: rlc: command not found

    When I enter: tar -vxzf VMwareTools*
    I get this error: gzip: stdin: not in gzip format
    tar: Child returned status 1
    tar: VMwareTools-6.0.1-55017.tar.gz: Not found in archive
    tar: Error exit delayed from previous errors

    I’ve tried running the steps in root as well, with the same errors.

    I’m running VMware Workstation 6.01, with WinXP as host and Ubuntu 7.04 as guest.

    Could you give me any advice on what to do next?

    Ron Cary
    [email protected]

  5. Pingback: How To Install VirtualBox Open Source Edition on Ubuntu 7.10 : Ubuntu Tutorials : Dapper - Edgy - Feisty - Gutsy

  6. Joe

    When I enter: tar -vxzf VMwareTools*
    I get this error: gzip: stdin: not in gzip format
    tar: Child returned status 1
    tar: VMwareTools-6.0.1-55017.tar.gz: Not found in archive
    tar: Error exit delayed from previous errors

    For the above error you need to change the step :

    cp -a /media/cdrom/VMwareTools* /tmp/


    cp -a /media/cdrom/VMwareTools*.gz /tmp/

    The problem is it tries to gunzip the .rpm file, which obviously fails..

  7. Guy

    I used this on Workstation 6, Vista32 as host and Ubuntu 7.10 server as guest.

    I had a similar problem with the tar command. I received this error:

    tar: Child returned status 1
    tar: VMwareTools-6.0.1-55017.tar.gz: Not found in archive
    tar: Error exit delayed from previous errors

    I solved it by dropping the * and entering the complete file name of the .gz file as follows:

    tar -vxzf VMwareTools-6.0.1-55017.tar.gz

  8. bob23450

    AFAIK VmWare products don’t currently support Gutsy as guest. In fact, the vmware tools as shipped with player 2.0.1 (build 55017) ends up with compile errors on the hgfs (shared folders) module with kernel 2.6.22 and says it has no drivers for Xorg 1.3 (i.e. no enhanced mouse). Did anyone get the vmware-tools fully installed somehow in Gutsy?

  9. Alan


    Given that many people installing VMWare Tools will be windows users who are trying out Ubuntu, I suggest you make it explicit that the file names are case sensitive – something windows users will not be used to having to contend with.

    It threw me for a while!


  10. /////ANDRE

    Noob alert!

    I got to the second of the commands on your list and it asked for a different disk name ‘Ubuntu 7.10 _Gutsy Gibbon_ – Release amd64 (20071016)’ than the disk (CD) I have which is “Ubuntu 7.10 amd6” !???

    VMware Fusion v1.1b1 on MacPro OSX 10.4.10

  11. farmer


    tnx! for the tutorial, however i got this message:

    The installation of VMware Tools 6.0.1 build-55017 for Linux completed
    successfully. You can decide to remove this software from your system at any
    time by invoking the following command: “/bin/”.

    Before running VMware Tools for the first time, you need to configure it by
    invoking the following command: “/bin/”. Do you want this
    program to invoke the command for you now? [yes]

    sh: /etc/vmware-tools: Permission denied
    Making sure services for VMware Tools are stopped.

    Unable to stop services for VMware Tools

    Execution aborted.

  12. Pingback: centralsq » Blog Archive » Comment on How To Install VMware Tools on Ubuntu Guests by farmer

  13. George

    Hi farmer,

    Make sure you either sudo or log in as root to run the command

  14. Fred Morrison

    For VMWare Tools 6.0.2 install on Gutsy Gibbon, the cp command needs to be:
    cp -a /media/VMware\ Tools* /tmp/

    Please note the space between VMware and Tools* that needs to be ‘escaped’. Also notice that there is no ‘cdrom’ in the path.

  15. Fred Morrison

    None of these instructions work for VMWare Tools 6.0.2. Please correct and repost once you figure out the correct sequence (and most important, syntax) of the commands.

  16. Carlos Rodriguez

    I also run into a wall. Ubuntu as guest Virtual Machine of Vista on a Xeon 5160 cpu.
    All the VMwaretools compile ok EXCEPT the vmhgfs module used for sharing directories with the host. I get

    error: too few arguments to function ‘kmem_cache_create’

    Any ideas?

  17. Pingback: Installing VMWare Tools on Ubuntu Gutsy at hocuspokus

  18. Pingback: 2007 November 03 archive at hocuspokus

  19. chironex

    Help…Clicking thing “install vm” thing doesn’t cause anything to happen in Ubuntu at all. I even tried to open the Media folder and go into cdrom, but there’s no VM folder at all.

    Someone help!!

  20. teds_favourite_albatross

    apt-get install build-essential linux-headers-$(uname -r) -y

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

    cat </usr/src/linux/include/linux/config.h
    #ifndef _LINUX_CONFIG_H
    #define _LINUX_CONFIG_H



    rm /etc/vmware-tools/not_configured

    then install tools as per generic linux guest guide…

  21. Phalanx

    Hey George,

    I was having the same problem farmer was having:
    sh: /etc/vmware: Permission denied
    Unable to stop services for VMware Server

    I tried using:
    sudo /bin/
    but it was to no avail. Trying to install vmware on ubuntu 7.10

    Any help is greatly appreciated.

  22. James

    Clicking VM/Install VMware Tools. Enter the “cp -a /media/cdrom/VMwareTools* /tmp/” command and get the following error “cp: cannot stat `/media/cdrom/VMwareTools*’: No such file or directory” What do I do?

  23. Amir Eldor

    Thanks for the small guide, so a small for it note too 🙂

    For some reason it didn’t mount the downloaded .iso alone so I had to mount it myself (as root). The iso was found on my ~/.VirtualBox it took me 2 minutes looking for it 🙂

  24. Quyen Nguyen

    Ok, I visited this page and learned quite a bit about installing programs in Ubuntu (which is insanely complicated, but fun to play with). Anyway, VMware has a very good instruction in their webpage.

    I didn’t follow these instruction though, I was kind of typing things in randomly. And it works. Oh, for those of you who really like to know more, here is a website explain how to “install ANYTHING in Ubuntu.”

    By the way, is there any of you guys know how to check if VMwareTools is installed or not?

    What is it for and How do I use it anyway? (:P)

  25. sirbrent

    Thank you so much for your tutorial. I did experience some problems; but without your tutorial i wouldnt have known where to start, i would have been lost. I am a power user, but in windows and os x… (L)Unix Terminal is very new to me. Thanks again!

  26. Andrew

    For the anyone with a more recent kernel that is getting compiling issues with some of the drivers, this web site has some patches to fix the code:

    The problem is that the most recent kernels had some changes which break the vmware tools source, but the toolsl source can be fixed.

  27. Jason

    This tutorial is now a bit out of date, anyone getting kernel issues at the compile step should upgrade their VMWare player/workstation to 5.5.6

  28. luka

    You Know! I tried to install VMwareTools for around 5 days, searching in the web and couldn’t find the rigth way to do it, even the “VMware Manual” is USLESS. So your instrucctions are so easy to follow even for a Mexican guy like me.Thank You so much. “Eres un Cabron”

  29. Lukas

    I tried to install vmware tools on ubuntu and currently I’m facing following issue when I’m trying to run ./

    A previous installation of VMware software has been detected.
    Unable to find the answer LIBDIR in the installer database (/etc/vmware-tools/locations). You may want to re-install VMware Tools.
    Execution aborted

    I’m also not able to uninstall tools.

    Thanks in advance for a help

  30. binaryspiral

    If you’re having problems getting the VMwareTools file, I had to unmount and remount the CDRom for it to show up.

    ls /media/cdrom0/

    You should see VMwaretools files. If not:

    sudo umount /media/cdrom0/
    sudo mount /media/cdrom0/

    Then perform the ls /media/cdrom0/ again.

  31. Leonardo Ruppel

    Perfect tutorial Works Perfect.
    Thanks a lot !!!

  32. G

    ok well i got a question i got everything done fine no problems at all. But the last question it asked me i didnt understand completely i thought it was asking for a password so i typed that in and what i now think it wanted was my username. Will this create problems? Says installed when i rebooted into my system.. I hope i didnt spend all that time setting this up only to screw it up lol
    Take care

  33. Robin

    Thank you for this article. Very appreciated.

  34. mark

    I am new to Linux, and needed to install VMWare tools on my Macbook with VMWare fusion. I followed your instructions, and everything went perfectly.

    Thanks for your tutorial as I would have been completely stuck without them.

  35. C Winton

    Excellent info. After installing current VMware Workstation on a new Vista system and putting in Ubuntu 8.04.1 I found VMware Tools install didn’t work for this release of Ubuntu. I just followed the procedure given here … everything went in as advertised, although the kernel differences required a good bit of recompile in finishing up, all of which went in without a hitch. Thanks! I figure this saved me a good bit of grief trying to get the tools in by cruder means.

  36. B. Good

    Well, congrats to all you Linux peeps, but once again, this thing has too many warts. Call me a troll, but how the [email protected]!! can anyone say Linux is ready for the desktop when installing the VMWare tools takes a manual? Please, wake me when Ubuntu can compare with the XP procedure: Double-click the .exe and follow the prompts.

  37. Jelloir

    Your a troll! Hey you asked me too. I guess we won’t be waking you up anytime soon if you want easy GUI tools to install software that isn’t packaged for Debian/Ubuntu however the power of apt/aptitude makes a mockery of any Double click exe follow the prompts.

  38. Natalie

    I followed the steps but after “sudo ./” I had a problem.

    There was a question “What is the location of the directory of C header files that match your running kernel? [/usr/src/linus/include]”.

    When I pressed transmit I received the message “The paht “/usr/src/linux/include” is not an existing directory.”.

    I checked and I had two directories under /usr/src. They are /usr/src/linux-headers-2.6.24-19 and /usr/src/linux-headers-2.6.24-19generic.

    I tried both files and received the same message “The path “/usr/src/linux-headers-2.6.24-19[or 2.6.24-19generic]/include” is a kernel header file directory, but it does not contain the file “linux/version.h” as expected. This can happen if the kernel has never been built, or if you have invoked the “make mrproper” command in your kernel directory. In any case, you may want to rebuild your kernel.”.

    It just keeps repeating the question until I close the window.

    Do you know what is wrong?

  39. Natalie

    Sorry, I should have said I have just built the virtual machine using Ubuntu version 8.04

  40. Natalie

    I think I have found the proper header files at /usr/src/linux-headers-2.6.24-19-generic/include/linux/version.h. (Another possibility is /usr/src/linux-headers-2.6.24-19-386/include, I have tried both.)

    The question is:
    What is the location of C header files that match your running kernel? [/usr/src/linux/include]

    I have tried responding with:

    All give the following response:

    The directory of kernel headers (version @@[email protected]@ UTS_RELEASE) does not match your running kernel (version 2.6.24-19-generic). Even if the module were to compile successfully, it would not load into the running kernel.

    Then it asks for the location again.

    Can anyone help me?

  41. Raymond

    Just a note… My ubuntu server didn’t mount the vmware tools image automatically. I had to mount /dev/cdrom containing the vmware tools manually.

  42. cheeseMerchant

    VMware Tools as released as part of the products supports certain kernel versions of the various linuces, but very often not the one you have (thanks, Murphy). If you are not faint of heart you can check out the Open VM Tools project on SourceForge for source that may support your system. You’ll need to build it separately from VMware Tools and then insert the modules into the VMware Tools distribution, and then install it (essentially patch the VMwareTools distribution).
    If you check the manifest in the .tar.gz for your flavour and kernel version in the precompiled binaries you can find out if your system will work without rebuilding. That case would be a one-click install.
    Good luck…

  43. Anu

    This information is usable for installing vmware tool in ubuntu guest
    I have Ubuntu 8.10 as guest using vmware server 1.0.7 on host os windows xp.
    I had installed vmware tool but i found problem as :
    Stopping VMware Tools services in the virtual machine:
    Guest operating system daemon:-ne done

    Trying to find a suitable vmhgfs module for your running kernel.

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

    Using compiler “/usr/bin/gcc”. Use environment variable CC to override.

    What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include]

    The path “/usr/src/linux/include” is not an existing directory

    I used “/usr/scr/2.6.27-7-generic/include”, but still it rises the same error.

    How this problem is solved?

    I will be very thankful if this problem is solved.

  44. glade

    I used “sudo aptitude install linux-headers-2.6.27-7-generic” which installed the headers.

    Then I supplied “/usr/src/linux-headers-” to the vmware tools install script.

    Seems to be working.

  45. klitos

    friend me sale esto
    A previous installation of VMware software has been detected.

    The previous installation was made by the tar installer (version 3).

    Keeping the tar3 installer database format.

    Error: Unable to execute “/usr/bin/vmware-tools-distrib/


    Execution aborted.

  46. macmend

    Thank you for taking the time to present this, I found it very helpful and now have ubuntu and vm tools working prefectly

  47. Battousay

    ohhhh man thank you! I´m new in the Linux world and don´t you know the dificult for me.
    this is the one place that I found something important about. thank you!

  48. conan

    Thank you very much! It works perfectly!! ^__^

  49. Andrew

    For the people who suffered
    “Unable to stop services for VMware Tools” “Execution aborted”

    1. Execute this
    sudo aptitude install build-essential linux-headers-$(uname -r)
    2. Restart VMWare (this is important)
    3. sudo install the VMWare tool as mentioned
    4. If it fails goto step 2.

    Somehow after a few iteration I got my VMWare tools installed.

Comments are closed.