컴퓨터/Window$

How To Install VMware Tools on Ubuntu Guests

Subi Lee 2009. 5. 22.
반응형

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.

I post tutorials very regularly on this site. You may want to consider subscribing to the RSS feed. Or if you'd prefer these tips sent to your inbox you can use Email Subscriptions.

Related Posts

Random Posts

-->

Comments

43 Responses to “How To Install VMware Tools on Ubuntu Guests”

  1. Mo on October 2nd, 2007 2:48 pm

    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 on October 2nd, 2007 6:18 pm

    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 on October 4th, 2007 5:45 am

    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 on October 11th, 2007 5:53 pm

    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

  5. How To Install VirtualBox Open Source Edition on Ubuntu 7.10 : Ubuntu Tutorials : Dapper - Edgy - Feisty - Gutsy on October 12th, 2007 8:20 am

    [...] written on how to install VMware Server on Ubuntu 7.10, install VMware Server on Ubuntu 7.04 and install VMware Tools, but installing VirtualBox has a few of its own benefits. One, it is actually Open Source / Free [...]

  6. Joe on October 18th, 2007 6:54 am

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

  7. Guy on October 18th, 2007 1:50 pm

    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 on October 19th, 2007 5:32 am

    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. flurdy on October 22nd, 2007 4:31 am

    Here is a tip on fixing the hgfs problem in vmware and ubunty 7.10:
    http://communities.vmware.com/thread/107691

  10. Alan on October 24th, 2007 10:01 pm

    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.

  11. /////ANDRE on October 25th, 2007 6:24 pm

    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

  12. farmer on October 26th, 2007 2:38 pm

    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.

  13. centralsq » Blog Archive » Comment on How To Install VMware Tools on Ubuntu Guests by farmer on October 27th, 2007 4:00 am

    [...] here for more This entry was posted on Friday, October 26th, 2007 at 4:38 pm and is filed under tools. [...]

  14. George on October 27th, 2007 7:45 am

    Hi farmer,

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

  15. Fred Morrison on November 2nd, 2007 1:54 pm

    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.

  16. Fred Morrison on November 2nd, 2007 2:23 pm

    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.

  17. Carlos Rodriguez on November 3rd, 2007 7:08 am

    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?

  18. Installing VMWare Tools on Ubuntu Gutsy at hocuspokus on November 3rd, 2007 3:01 pm

    [...] to Ubuntu Tutorials for the info. Share and Enjoy: These icons link to social bookmarking sites where readers can [...]

  19. 2007 November 03 archive at hocuspokus on November 3rd, 2007 3:02 pm

    [...] to Ubuntu Tutorials for the [...]

  20. chironex on November 11th, 2007 6:57 am

    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!!

  21. teds_favourite_albatross on November 11th, 2007 2:54 pm

    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

    #include

    #endif
    EOF

    rm /etc/vmware-tools/not_configured

    then install tools as per generic linux guest guide…

  22. Phalanx on November 26th, 2007 1:15 am

    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/vmware-config.pl
    but it was to no avail. Trying to install vmware on ubuntu 7.10

    Any help is greatly appreciated.

  23. James on December 7th, 2007 8:42 am

    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?

  24. Ian! D. Allen on January 20th, 2008 12:48 pm

    Re: error: too few arguments to function ‘kmem_cache_create’

    See http://ubuntuforums.org/showthread.php?t=595348

    for a one-line patch to make vmhgfs in the VMware Tools compile.
    All you need to do is change ‘<’ to ‘<=’ in compat_slab.h

  25. Amir Eldor on February 1st, 2008 2:43 am

    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 :)

  26. Quyen Nguyen on February 2nd, 2008 12:06 am

    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.

    http://www.vmware.com/support/ws55/doc/ws_newguest_tools_linux.html

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

    http://www.monkeyblog.org/ubuntu/installing/

    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)

  27. sirbrent on February 2nd, 2008 5:05 am

    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!

  28. Andrew on March 11th, 2008 7:13 am

    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:

    http://tuxx-home.at/archives/2007/06/29/T12_33_53/

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

  29. Jason on March 15th, 2008 11:30 am

    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

  30. luka on March 26th, 2008 6:55 pm

    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”

  31. Lukas on April 3rd, 2008 2:17 am

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

    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

  32. binaryspiral on April 9th, 2008 3:04 pm

    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.

  33. Leonardo Ruppel on April 24th, 2008 10:25 pm

    Perfect tutorial Works Perfect.
    Thanks a lot !!!

  34. G on June 7th, 2008 6:16 am

    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
    G

  35. Robin on June 10th, 2008 4:32 am

    Thank you for this article. Very appreciated.

  36. mark on June 22nd, 2008 4:39 pm

    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.

  37. C Winton on July 19th, 2008 9:39 pm

    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.

  38. ElizabethLarsen on August 4th, 2008 11:48 am

    great work,

  39. B. Good on August 7th, 2008 4:26 pm

    Well, congrats to all you Linux peeps, but once again, this thing has too many warts. Call me a troll, but how the h@!! 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.

  40. Jelloir on August 8th, 2008 2:01 am

    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.

  41. Natalie on August 8th, 2008 12:17 pm

    I followed the steps but after “sudo ./vmware-install.pl” 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?

  42. Natalie on August 8th, 2008 12:20 pm

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

  43. Natalie on August 9th, 2008 12:17 am

    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:
    /usr/src/linux-headers-2.6.24-19-generic/include
    /usr/src/linux-headers-2.6.24-19-generic/include/
    /usr/src/linux-headers-2.6.24-19-386/include
    /usr/src/linux-headers-2.6.24-19-386/include/

    All give the following response:

    The directory of kernel headers (version @@VMWARE@@ 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?

반응형

댓글