Tuesday, October 04, 2011

Installing VMware Tools for Ubuntu 10.04+

Update your system to the latest packages

This updates your system with the catalog of the latest packages available, then upgrades any packages on your system that may have updates available.

sudo apt-get update -y
sudo apt-get dist-upgrade -y

Install the dynamic kernel modules

These modules will allow you to dymanically load modules with the kernel. I’m of the understanding that this prevents you from having to re-install the VMware Tools everytime the Linux kernel is updated.

sudo apt-get install dkms -y

Install VMware Tools

First you’ll need to initiate the VMware Tools install from the VMware Host system. This can usually be found on a “Tools –> VMware Tools Install” like menu.

Next we install the Linux build commands that are needed to compile the kernel with the VMware Tools extensions. This also requires the correct Linux headers for our system, which are determined using a system variable. Then we remove any packages that are no longer used (generally none, but just to be sure).

Finally we install the VMware Tools by doing the following:

  1. Create a directory to mount the tools CD-ROM to
  2. Mount the CD-ROM to the directory
  3. Copy the tools archive to the temporary directory on the system
  4. Unmount the CD-ROM
  5. Change to the temporary directory
  6. Extract the archive of the VMware Tools
  7. Change to the VMware Tools extraction directory
  8. Execute the VMware Tools installer script and indicate to use the defaults for all choices during the installation
sudo apt-get install build-essential gcc -y
sudo apt-get install linux-headers-$(uname -r) -y
sudo apt-get autoremove -y
sudo mkdir -p /media/cdrom
sudo mount /dev/cdrom /media/cdrom
cp /media/cdrom/VM* /tmp
sudo umount /media/cdrom
cd /tmp
tar -xzvf VMware*.gz
cd vmware-tools-distrib/
sudo ./vmware-install.pl -d

Restart the system

Last we want to restart the system for all of the changes to take affect.

sudo shutdown -r now

No comments: