virtual grind thoughts from the virtual world

13Nov/102

Automating VMware Tools Installation in Ubuntu

I have been asked numerous times about automating the VMware tools installation in Linux based operating systems.  I have seen people commonly use RPM's and even compile the tools from source, but the feedback I usually get is that admins would like to automate the installation, like they do in Windows.

Fortunately for us, VMware has been gracious enough to include packages for not only Ubuntu; but also Redhat, CentOS, and SLES.  When I tell people this, the response I usually get is that they never knew these options were available.

For the purpose of this post, I will go over the installation of VMware Tools in Ubuntu 10.04 LTS.  I will also include a link to VMware's official installation guide that covers these steps in detail for more operating systems.

The first step is to add VMware's repo to /etc/apt/sources.list and install VMware's GPG key.  Note that when you are adding the repo, you are adding the "4.1latest" repo.

$ apt-add-repository 'deb http://packages.vmware.com/tools/esx/4.1latest/ubuntu lucid main restricted'
$ wget http://packages.vmware.com/tools/VMWARE-PACKAGING-GPG-KEY.pub -q -O- | apt-key add -

The following five commands update your local package lists, installs VMware packages, and builds/installs the kernel modules:

$ apt-get update
$ apt-get install vmware-open-vm-tools-kmod-source
$ module-assistant prepare
$ module-assistant build vmware-open-vm-tools-kmod-source
$ module-assistant install vmware-open-vm-tools-kmod

Finally, now that everything is built, you simply need to install the packages. The final two commands depend on your installation. If you are not running a graphical interface on your system you will choose the first option that ends in "-nox". If you are using a graphical interface, use the latter command. Remember you only use on or the other, not both.

$ apt-get install vmware-open-vm-tools-nox 

OR
$ apt-get install vmware-open-vm-tools

The official VMware guide can be found here.

Comments (2) Trackbacks (0)
  1. Great post!

  2. UPDATE – please note that VMware has changed the locations of their keys to:

    http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub
    http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub

    These new locations will need to be referenced in the steps above:

    $ wget http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub -q -O- | apt-key add –

    and

    $ wget http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub -q -O- | apt-key add –


Leave a comment

No trackbacks yet.