What are 'VMware Tools'?
- VMware Network acceleration
- VMware Video acceleration
- Host to Guest time synchronization
- Seamless mouse movement between host and guest
Cut & Paste - Guest to Host and Guest to Guest (with VMware Toolbox) (possibly only on gnome)
- Disk Shrink (with VMware Toolbox running at root)
- Startup/Shutdown Scripts (with VMware Toolbox running at root)
This page explains how to install the VMware Tools on an Ubuntu guest VM.
Installing VMware tools on an Ubuntu guest
VMware tools can be obtained from:
the open-vm-tools package in Ubuntu
- your VMware host (this method does not use .deb packages)
Installing from Ubuntu package open-vm-tools
# on 12.04 LTS you can simply install the package: apt-get install open-vm-tools # on earlier versions, use this workaround: # install kernel headers so modules will work # needed this on a 10.04 guest running in a Fusion 3 host apt-get install linux-headers-virtual # install kernel modules apt-get install --no-install-recommends open-vm-dkms # EITHER: install tools for an xorg install apt-get install open-vm-tools # OR: a headless install apt-get install --no-install-recommends open-vm-tools
(Note: on earlier versions than 12.04 LTS a plain install will also install Xorg - bug #628039. This is probably not what you want for a headless VM. Use the "--no-install-recommends" workaround)
Installing from packages.vmware.com
VMware provide packages for Ubuntu. The install procedure is documented in VMware Tools Installation Guide: Operating System Specific Packages.
To add the repository and install tools do:
ESX 4.1: apt-add-repository 'deb http://packages.vmware.com/tools/esx/4.1latest/ubuntu lucid main restricted' ESX 5.0: apt-add-repository 'deb http://packages.vmware.com/tools/esx/5.0latest/ubuntu lucid main restricted' wget http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub -q -O- | \ apt-key add - # (The above links to the ESX "4.1latest" builds of VMware-tools; however, # these packages should be compatible with all VMware servers, not just ESX 4.1)
Note: using apt-add-repository will also add an entry for sources, which are not available in the vmware repository. You'll need to manually delete the deb-src entry for "packages.vmware.com", which should be at the bottom of your /etc/apt/sources.list file
apt-get update apt-get install vmware-open-vm-tools-kmod-source module-assistant prepare module-assistant build vmware-open-vm-tools-kmod-source # depending on your kernel version, you may need to specify the path to headers like this # module-assistant build vmware-open-vm-tools-kmod-source -v -t -k /usr/src/linux-headers-2.6.35-25-server/ module-assistant install vmware-open-vm-tools-kmod # EITHER: install tools for headless system apt-get install vmware-open-vm-tools-nox # OR: install for Xorg system apt-get install vmware-open-vm-tools
Installing from your VMware host
Warning: This install method does not use Ubuntu packages. Instead, it bypasses dpkg and writes files directly to your system. This is generally not recommended.
Start up a terminal window and do the following to ensure that you have the required packages for building VMware Tools or your kernel.
sudo apt-get install build-essential linux-headers-`uname -r` psmisc
NOTE: linux-headers-uname -r is not required on a default build as these headers already exist. They are listed here in case you have made kernel modifications.
From the VMware menu, choose VM->Install VMware Tools. You should see a mounted CD image show up on the desktop. In the File Browser that pops up, right-click the VMwareTools*.tar.gz file and extract to the Desktop.
If the cdrom was not automatically mounted, mount the cdrom (in your guest OS) by doing
# make a mount point if needed : sudo mkdir /media/cdrom # Mount the CD sudo mount /dev/cdrom /media/cdrom # Copy and extract VMWareTools sudo cp /media/cdrom/VMwareTools*.tar.gz ~/Desktop # You can extract with archive manager, right click on the archive and extract ... or tar xvf VMwareTools*.tar.gz # Install as below
Open a terminal window, and run the following commands.
cd ~/Desktop/vmware-tools-distrib sudo ./vmware-install.pl
During vmware-install.pl, choose the default answers to everything (just hit the <enter> key).
You can configure the tools as root
Otherwise run them as a user (not root)
- In order for the synchronized clipboard and mouse to function as well as the host shared folders feature, you must have vmware-toolbox running, although you can minimize the window.
To have vmware tools auto start with your sessions, go to System->Preferences->Sessions->Startup Programs. Click Add, enter vmware-toolbox, Ok, Close.
If you are running a Kubuntu guest OS.
echo "/usr/bin/vmware-toolbox" > ~/.kde/Autostart/vmware-toolbox.sh chmod +x ~/.kde/Autostart/vmware-toolbox.sh
In order to get the scroll wheel to work again after the above install, you will need to make a minor change to the xorg.conf file.
In the "Configured Mouse" section, change the following line as indicated:
Option "Protocol" "imps/2"
If you have more than five buttons (scroll wheel counts as three), then you might need the following line:
Option "Protocol" "ExplorerPS/2"
VMware-tools for Windows (for running Windows in VMware on Ubuntu)
Power on the virtual machine. When the guest operating system starts, right-click VM and select "Install VMware Tools" (or for ESXi right-click and select "Guest"->"Install VMware tools). A "VMware Tools" ISO should appear in the Windows guest and auto-run. For more information see vmware.com : Installing VMware tools
Workarounds for guests running old Ubuntu releases
Installing from Host Ubuntu 10.10
This method installs VMware tools and makes the crucial auto start entry sorted for you as well.
First got to the Console Virtual Machine > Install VMware Tools.
#Mount the CD drom sudo mkdir /mnt/cdrom sudo mount /dev/cdrom /mnt/cdrom
#Run this command to find the exact name of the VMware Tools bundle; the file name varies depending on your version of Fusion: ls /mnt/cdrom
#Extract contents of cdrom to tmp directory tar -zxvf /mnt/cdrom/VMwareTools-<x.x.x-xxxx>.tar.gz -C /tmp/
Note: <x.x.x-xxxx> is the version discovered in the previous step which at the time of writing was VMwareTools-8.3.7-341836.tar.gz
#now move into the vmware tools directory in tmp directory. cd /tmp/vmware-tools-distrib/
#Run the installer with the -d switch to accept defaults. sudo ./vmware-install.pl -d
Note: The -d switch assumes that you want to accept the defaults. If you do not use -d, press Return to accept the defaults or supply your own answers.
#If the installer can't find GCC compiler , run sudo apt-get install gcc
Auto start of vmware tools is essential to a stress free admin life.
Run this command to reboot the virtual machine after the installation completes:
#Rebooting to test persistence of the vmware tools across reboots. sudo reboot
Check if the VMware Tools status shows 'OK'on the vm summary tab of vSphere server. This method ensure proper permissions for executable and puts the file in startup as well.
Resolving VMware Tools compilation errors under Ubuntu 11.04 (Natty) and VMware Fusion 3.1.2