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 ./vmware-install.pl

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.

    Reply
  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.

    Reply
  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’

    Reply
  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?

    Thanks,
    Ron Cary
    rlcary@gmail.com

    Reply
  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/

    to:

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

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

    Reply
  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

    Reply
  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?

    Reply
  9. Alan

    Hi,

    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!

    Alan.

    Reply
  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

    Reply
  11. farmer

    Hi,

    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/vmware-uninstall-tools.pl”.

    Before running VMware Tools for the first time, you need to configure it by
    invoking the following command: “/bin/vmware-config-tools.pl”. 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.

    Reply
  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

    Reply
  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.

    Reply
  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.

    Reply