Flux»Tech


Installing VMware Tools on Ubuntu Server

You want to install VMware Tools on Ubuntu Server running under VMware. Last updated 2009-02-14.

To get the best performance from a guest OS running under VMware you need to install the VMware Tools. This document explains how to install VMware Tools on Ubuntu Server 8.04 LTS (Hardy Heron) running under VMware Fusion on Mac OS X. The procedure should be similar for other Ubuntu releases on other VMware systems, but your mileage may vary.

Install Prerequisites

VMware Tools will need to be compiled as part of the install process. In order to do this you need the build tools and kernel headers to be available. You can install them with:

$ sudo apt-get install build-essential linux-headers-`uname -r`

‘uname -r’ prints the kernel release, meaning this command should work on all kernel versions.

Obtain the Tools

You can either use the VMware supplied tools or download Open VM Tools. If you use the Open VM Tools you should follow their installation instructions, the rest of this document is concerned with the VMware version.

Using the VMware Supplied Tools

To mount the VMware version of the tools under VMware Fusion, select ‘Virtual Machine->Install VMware Tools’ from the menu. You should then find the tools within /media/cdrom. If not, run the following (you may have to unmount other CDs first):

$ sudo mount /dev/cdrom /media/cdrom

Now copy the tools archive from /media/cdrom to a temporary location and unarchive it with tar.

Installing the Tools

Change into the directory in which you unarchived the tools and run:

$ sudo ./vmware-install.pl

You can answer all questions with the default answers and after compiling a few components you should be ready to enable the virtualized network driver (note that unless you’ve installed X11 you will get a few errors about it being missing, this is normal).

To enable the network driver (vmxnet) you stop networking, remove any existing pcnet32 or vmxnet modules, add the new module then restart networking. Because network will be unavailable when you do this, make sure you do this from the machine console (i.e. in the VMware window, not over ssh).

$ sudo /etc/init.d/networking stop
$ sudo rmmod pcnet32
$ sudo rmmod vmxnet
$ sudo modprobe vmxnet
$ sudo /etc/init.d/networking start

You can safely ignore any errors about modules not existing in /proc when running rmmod. You can see a list of all loaded modules with ‘lsmod’ or by looking at ‘/proc/modules’.

Accessing Shared Files

If you share any files via VMware they will appear under ‘/mnt/hgfs/’. The screenshot below shows the shared files and the loaded vmxnet driver.

VMware tools in action.


Tags: HowTo, Linux, Mac, OSX, Ubuntu, VMware, VMwareFusion, VMwareTools