If you work much with virtual machines, you know how important installing VMware Tools can be. Even without the graphical interface of Linux (called X11), there are a number of important features that installing VMware Tools offers you and you really shouldn’t skip it. I’ve struggled with installing VMware Tools on Ubuntu Linux in the past, and I hope you find this guide helpful in making it even quicker and easier. It seems newer versions of Ubuntu and VMware Tools broke my previous instructions. Luck for us, VMware and Ubuntu contributors have made the process easier than it was in the past.

Now for a little back story: VMware has released the source code for VMware Tools as an open source project called open-vm-tools located at Sourceforge. By itself, this isn’t helpful because open-vm-tools does not include an installer and therefore you would need to run shell scripts to merge the working bits of open-vm-tools into the traditional VMware Tools installer. Let’s all be glad we can avoid that mess.

Contributors of Ubuntu have taken open-vm-tools and created a installable package for Ubuntu, and included it in the standard software repositories so you can install it easily. This means upgrades should be much easier in the future, and these directions should hopefully continue to work into the future. Let’s get down to it.

Notes:

  • I have tested this on Ubuntu 8.10 Server (Intrepid Ibex) but it should work just as well on the Desktop edition. If this doesn’t work for you, try my old instructions.
  • This only sets up the basics of VMware Tools for a terminal install of Ubuntu, like Server edition. If you want the copy/paste integration and other goodies available for Ubuntu with a graphical interface, you need to install an additional software package called open-vm-toolbox in step 3. I’m not sure what else is required, please leave a comment if you figure it out.
  • You must execute all of these commands either using sudo or otherwise with root-level access. This means putting sudo in front of the commands, or creating a root terminal with sudo bash.

1. Let’s get your virtual machine ready:

I’ll assume you just finished installing Ubuntu and we need to install all the updated versions of included software.

apt-get update
apt-get dist-upgrade


2. Reboot:

Since we probably just upgraded the Linux kernel, let’s reboot now to make sure we’re booted from the newest kernel.

reboot


3. Install the Ubuntu package for open-vm-tools:

Log back in and make sure you continue running these commands as root or using sudo.

apt-get install open-vm-tools


4. Bring back the network connection so we can continue:

At this point, the installation of the package killed your network connection for no good reason and we need it to continue. I hope you weren’t using SSH yet! Let’s bring the connection back up so we can keep working.

modprobe pcnet32
/etc/init.d/networking restart


5. Build and install the kernel modules:

The current version of the Ubuntu open-vm-tools package installs files in the right spots, but it doesn’t actually build the various kernel modules (drivers) necessary for VMware Tools to actually work. Let’s build them now.

Note: If the second command fails take a look at my comment below for a fix.

module-assistant prepare open-vm
module-assistant auto-install open-vm


6. Reconfigure and rebuild initramfs:

I’m a little sketchy on the details here, but from what I’ve learned, the boot process doesn’t have access to the VMware accelerated NIC (vmxnet) kernel module at boot time and it fails to load. So if we include it inside initramfs, it will have access to the vmxnet module, and we will get a network connection at bootup. Very handy!

echo vmxnet >> /etc/initramfs-tools/modules
update-initramfs -u


7. Reboot for the last time:

reboot


8. Dance!

At this point everything should be great! You have all the features of VMware Tools, and didn’t pull your hair out in the process! Win-win! You can do a little dance, nobody is watching!

58 Responses to “Install VMware Tools on Ubuntu Linux - Reborn”
  1. [...] Install VMware Tools on Ubuntu Posted by Matt Jones in Best Of, Information Technology, Linux, Virtualization Important Notice: This post has been updated using a newer, easier method. Read more here. [...]

  2. [...] Ubuntu, and included it in the standard software repositories so you can install it easily. More here If you work much with virtual machines, you know how important installing VMware Tools can be. Even [...]

  3. Tony says:

    Dude, you’re awesome…this worked like a champ…thanks!!!!

  4. Peaboy says:

    This seems have worked, but I have to re-run the networking stuff after every reboot:
    modprobe pcnet32
    /etc/init.d/networking restart

    Any ideas on that one?

  5. Don says:

    dude, worked great. Just like last time.
    Now I have to figure out what to use this virtual ubuntu server for…

  6. Manfred says:

    This works just great but my end - Ubuntu 8.10 server 2.6.27-11 on VMWare server 2 - I get this:

    sudo echo vmxnet >> /etc/initramfs-tools/modules

    bash: /etc/initramfs-tools/modules: Permission denied

    I thought I was giving the command as root - what more does it want?

    the update-initramfs -u
    gives no errors but I assume since it doesnt have the driver it needs to due to previous permissions error doesnt actually do anything because on reboot the networking is gone and one needs to
    modprobe pcnet32
    /etc/init.d/networking restart
    to get it kicking.

    To workaround the permissions I did this:

    sudo gedit /etc/initramfs-tools/modules
    added vmxnet to the end of the file, saved it and then did the update-initramfs -u and after reboot this seemed to work for me.

    • Gorillapond says:

      I think I was running the echo command from a root shell (sudo bash). You might have found an issue with running sudo with that echo command.

      • Steve says:

        sudo echo vmxnet >> /etc/initramfs-tools/modules

        should be

        echo vmxnet | sudo tee /etc/initramfs-tools/modules

  7. Philip says:

    Thank you for this site!

    It work great.

    I am very new to UNIX. I have to do “sudo su” to get going.

    I am running this in Server mode with no graphic of course. How do I change the screen size now that VMware tools is install?

    • Gorillapond says:

      The terminal screen can’t resize easily. If you want a larger screen size, I would install openssh-server and use PuTTY to connect. You can resize putty to anything you want.

  8. Manfred says:

    Only catch with this method is that VMware server 2 doesnt seem to show on its VM info page that VMware tools exist - probably doesnt detect the open source version. No crisis since not affecting anything else AFAIK.

  9. David says:

    Worked great! Might want to warn people not to use ssh in step 3. Otherwise, you can hop on the console and perform step 4 and your ssh connection(s) will come back.

  10. Thanks says:

    Thanks for this post, it worked great on Ubuntu 8.10 (Intrepid Ibex) Desktop and VMWare Fusion on Mac OS X.

  11. snottygumball says:

    Excellent, this works an absolute treat. You are a star. (Don’t suppose you could post Installing VMware Tools on Kubuntu 8.10, pretty please?)

  12. From the comments, this looks like a great tut but I didn’t get any joy with Jaunty. Failed on “module-assistant auto-install open-vm”.

  13. R. Rommel says:

    Excellent, but one remark:

    This will not work (not even with a sudo):
    echo vmxnet >> /etc/initramfs-tools/modules
    (not allowed to update file, you have to be root (that is what I saw on my fresh 9.04 Ubuntu)

    So, I would change this into:

    su -
    echo vmxnet >> /etc/initramfs-tools/modules
    update-initramfs -u
    reboot

  14. Gorillapond says:

    Just a note to everyone.. Ubuntu Januty (9.04) is currently broken using the open-vm-tools package. The second part of step 5 will fail. Looks like its logged as a bug already: https://bugs.launchpad.net/ubuntu/+source/open-vm-tools/+bug/362579.

    There’s a patch linked on the bug page, download it to /usr/src (wget http://launchpadlibrarian.net/25819719/vmhgfs-2008-11-18-jaunty-lenny.diff) and then run: patch -p0 < vmhgfs-2008-11-18-jaunty-lenny.diff

    From there you can rerun the auto-install command using: module-assistant --not-unpack auto-install open-vm

    • Adam says:

      I think I figured out the problem, after the patch is applied, the command should be “module-assistant –not-unpack auto-install open-vm” (With 2 dashes before “not-unpack”). I realize now that this site may change double dashes into a long dash.

    • ShoomKloom says:

      When I try to run the patch command I get:

      “can’t find file to patch at input line 3
      perhaps you used the wrong -p or –strip option?


      File to patch:”

      What do I do from here…?

  15. ariwo says:

    I’m a newbie on Ubuntu. I have followed these instructions trying to install VMWare tools on Ubuntu Server 9.04 running as a vm in vmware fusion 2.0.4 including the updated step 5 with the patch.

    I think its worked but how do I test this? I am really trying to mount folders on my mac and make them available to Ubuntu. I have shared them in the vm setting. How do I now mount them and test that my vmware tools install worked?

    Googling suggests that my shared folders should show up under /mnt but this folder is empty. Thanks.

  16. Sean says:

    Thanks for this. It’s people like you that make the Linux community so great. I just wish there was a better way to organise this information so it’s easier to find. Thanks again.

  17. Chupacabra says:

    I tried what Gorillapond said, but I still can’t get this to work on Jaunty (9.04). This is one reason why I hate dealing with Linux. The VMWare tools install quickly and easily on Windows, but for Linux it’s always a bunch of VooDoo and black magic to ever get anything to work right. Feh!

  18. Andrés says:

    Check this out, it works perfectly for installing VMWare Tools on Ubuntu 9.04:

    http://ubuntuforums.org/showpost.php?p=7285396&postcount=17

    • Gorillapond says:

      I would be cautious executing someone’s script like that. You have no idea what it’s doing unless you look at the code first. But if it works, it’s probably an automated version of the instructions in this post.

      • Zayonce says:

        It’s downloading some large tar file from the same site (chrysaor.info) and runs some perl installation script. I’d be very cautious for such behavior.

  19. Gorillapond says:

    I updated the post again using information that was discussed in the comments here.

  20. monsterbuk says:

    Instructions ran fine, but the mouse is acting strange I have to click 3 or 4 times in the Ubuntu 9.04 guest window to allow input.

    Also player screen wont resize, cut and paste between the guest and host wont work either.

    I’m running Ubuntu 9.04 in player 2.5.1 on a WinXP host.

  21. Matt says:

    You ever have one of those things where you search everywhere for a HOWTO to know avail then, like a bright shining light, you just stumble across one that tells you exactly what you need to know. This is that beacon of light for me…thanks!

  22. Tmac says:

    I am very new at Linux also. I tried installing using this procedure, the install completed but the drivers never loaded (the mouse is slow and the screen is still small). So I figured out how to let VMWare install the drivers (using the virtual CD process) but it will not load them since it says that vmhgfs, vmxnet … are alreadyinstalled, but not by the vmware installer). I have no idea how to undo the install process you provided here and I can not get the ones I just installed to work. I need some help!

    Thanks

  23. ge says:

    love to try this, but step 3 currently fails under a default installation of 8.04.3…has the package been withdrawn?

  24. System Slyder says:

    Thanks for the guide! I gave it a go for Ubuntu Karmic 9.10 and it seems to largely work (in fact it doesn’t seem to disconnect pcnet32 anymore), but invoking “Shutdown Guest” from VMware (I’m running 1.0.8) doesn’t seem to be working. It just does a power off.

    Anybody know what I might be missing? Will this work if I run VMware 2+?

  25. I’ve followed the instructions here for the sole purpose of getting copy-paste functionality from my OSX host to my Ubuntu 9.10-server guest to no avail. I thought perhaps there was a keybinding problem and added “\C-v: paste-from-clipboard” to my /etc/inputrc to no avail.

    Has anyone else had trouble with this or am I missing something obvious?

  26. Ita g says:

    Thanks!
    Worked perfectly on Ubuntu Server 9.10 (karmic) on VMWare Server 2.0 (running on Windows Server 2008 R2 x64).
    It would have been really nice if there was some way of integrating these (simple yet vital) steps into the package post-config so one could just install a single package with apt-get and get everything running…. (Still, even having this is way better than manually installing VMWare tools from scratch, so I guess I should be thankful…)

    Anyway, keep up the good work! Thanks for your efforts!
    Ita

  27. Thanks for writing this info. We have been looking about this on google and I am glad to find your blog. I will check back in the future for more info.

  28. Henry Selzer says:

    Hi,

    Great tutorial, everything seems to install fine however I can’t get the vmxnet3 network connection to work. The E1000 (old connection) still works fine.

    I ran lsmod | grep vmxnet and got the following output:

    vmxnet3 27494 0
    vmxnet 16006 0

    not really sure what this means, I got the command off the previous tutorial.

    I’m running Ubuntu server 10.04

    Any help would be much appreciated.

    Thanks,

    Henry

  29. The Virtual says:

    [...] is great.  So is ubuntu.  So are open vm tools.  This is a kickass way to get them [...]

  30. Just installed a 10.0.4 lts Ubuntu server.
    Clean install apt-get install open-vm-tools was all I needed to do, worked great!

  31. Qbjohqja says:

    tribal tiger designs,

  32. I am often blogging and i really appreciate your content. The article has really peaked my interest. I am going to bookmark your site and keep checking for new information.

  33. Mikel Abston says:

    I enjoyed this story. I would like to know where these products produced by the women at Thistle Farms can be purchased. My friends and I would also like to know where to send donations.

  34. I would wish to thank you for that efforts you have made in writing this article. I am hoping the exact same ideal function from you in the potential too. Actually your creative writing skills has inspired me to start my personal BlogEngine weblog now.

  35. Hi there I found your blog by means of Google whilst searching for a related matter your site got here up it seems good Ive bookmarked it in my google

  36. Great site here So many websites like this cover subjects that cant be found in magazines and newspapers I dont know how we got on 12 years ago with just newspapers and magazines

  37. Kerrie Mundz says:

    Do you want to know what are pool tables or billiard tables Then let me inform you about the billiards game and also the necessity of the pool table in

  38. I discovered your weblog web site on google and test a few of your early posts. Proceed to keep up the superb operate. I simply extra up your RSS feed to my MSN News Reader. Looking for ahead to studying extra from you afterward!…

  39. auto clear coat…

    [...]Gorillapond.com » Install VMware Tools on Ubuntu Linux - Reborn[...]…

  40. Baris1545 says:

    Needed to send you a bit of remark to thank you so much the moment again for these fantastic knowledge you’ve contributed on this page. It is certainly strangely generous of you to convey openly precisely what a number of people might have offered as an electronic book in making some bucks for their own end, chiefly considering that you could possibly have done it in case you decided. These strategies additionally acted to be the great way to know that many people have a similar eagerness really like my personal own to know many more regarding this problem. I am sure there are a lot more enjoyable opportunities up front for folks who look into your site.

  41. Domain says:

    Domain …

    [...]Gorillapond.com » Install VMware Tools on Ubuntu Linux - Reborn[...]…

  42. Hazwoper 40 says:

    I reckon something {really |

  43. Of all of the times I have read your blog I haven’t really read something as good as this. I’ll try and post this on twitter so my friends will read it. Thanks for the post.

  44. jdstunner says:

    mount -t vmhgfs .host/ /home/ /shares

  45.  
Leave a Reply