How To: Install VMware Tools in Ubuntu

I’m testing VMware Workstation 15 on my new laptop these days, and thought it’s a great opportunity to finally test and document the procedures for installing and upgrading VMware Tools.

Install VMware Tools for a VM

Kick off the VMware Tools install

Preferably when VM is shutdown, select the VMware Workstation menu to install the VMware Tools. Would still work even if VM is online like shown below:

Snag_c33a532.png

Log in and mount the virtual CD that has VMware Tools

Snag_c36bcc3.png

Unpack the VMware Tools

This will show a lot of files, but I’m just showing you the first few lines of the output:

root@ubuntu:/mnt# cd /tmp
root@ubuntu:/tmp# tar xvf /mnt/VMwareTools-10.3.2-9925305.tar.gz
vmware-tools-distrib/
vmware-tools-distrib/bin/
vmware-tools-distrib/bin/vm-support
vmware-tools-distrib/bin/vmware-config-tools.pl
vmware-tools-distrib/bin/vmware-uninstall-tools.pl
vmware-tools-distrib/vgauth/
vmware-tools-distrib/vgauth/schemas/
vmware-tools-distrib/vgauth/schemas/xmldsig-core-schema.xsd
vmware-tools-distrib/vgauth/schemas/XMLSchema.xsd
...

Run the VMware Tools installer

root@ubuntu:/tmp# cd vmware-tools-distrib/
root@ubuntu:/tmp/vmware-tools-distrib# ls
bin caf doc etc FILES INSTALL installer lib vgauth vmware-install.pl
root@ubuntu:/tmp/vmware-tools-distrib# ./vmware-install.pl
The installer has detected an existing installation of open-vm-tools packages
on this system and will not attempt to remove and replace these user-space
applications. It is recommended to use the open-vm-tools packages provided by
the operating system. If you do not want to use the existing installation of
open-vm-tools packages and use VMware Tools, you must uninstall the
open-vm-tools packages and re-run this installer.
The packages that need to be removed are:
open-vm-tools
Packages must be removed with the --purge option.
The installer will next check if there are any missing kernel drivers. Type yes
if you want to do this, otherwise type no [yes]

INPUT: [yes] default

Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

In which directory do you want to install the binary files?
[/usr/bin]

INPUT: [/usr/bin] default

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]

INPUT: [/etc] default

What is the directory that contains the init scripts?
[/etc/init.d]

INPUT: [/etc/init.d] default

In which directory do you want to install the daemon files?
[/usr/sbin]

INPUT: [/usr/sbin] default

In which directory do you want to install the library files?
[/usr/lib/vmware-tools]

INPUT: [/usr/lib/vmware-tools] default

The path "/usr/lib/vmware-tools" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]

INPUT: [yes] default

In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]

INPUT: [/usr/share/doc/vmware-tools] default

The path "/usr/share/doc/vmware-tools" does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes]

INPUT: [yes] default

The installation of VMware Tools 10.3.2 build-9925305 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes]

INPUT: [yes] default


You have chosen to install VMware Tools on top of an open-vm-tools package.
You will now be given the option to replace some commands provided by
open-vm-tools. Please note that if you replace any commands at this time and
later remove VMware Tools, it may be necessary to re-install the open-vm-tools.

WARNING: It appears your system is missing the required /usr/bin/vmhgfs-fuse

Initializing...


Making sure services for VMware Tools are stopped.

Stopping VMware Tools services in the virtual machine:
VMware User Agent (vmware-user): done
Unmounting HGFS shares: done
Guest filesystem driver: done


The module vmci has already been installed on this system by another installer
or package and will not be modified by this installer.

The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer.

The module vmxnet3 has already been installed on this system by another
installer or package and will not be modified by this installer.

The module pvscsi has already been installed on this system by another
installer or package and will not be modified by this installer.

The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer.

The VMware Host-Guest Filesystem allows for shared folders between the host OS
and the guest OS in a Fusion or Workstation virtual environment. Do you wish
to enable this feature? [yes]

INPUT: [yes] default

The vmxnet driver is no longer supported on kernels 3.3 and greater. Please
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)

VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot that are not already present. This feature can
be enabled/disabled by re-running vmware-config-tools.pl.

Would you like to enable VMware automatic kernel modules?
[yes]

INPUT: [yes] default

Creating a new initrd boot image for the kernel.
update-initramfs: Generating /boot/initrd.img-4.4.0-116-generic
The configuration of VMware Tools 10.3.2 build-9925305 for Linux for this
running kernel completed successfully.

Enjoy,

--the VMware team

Found VMware Tools CDROM mounted at /mnt. Ejecting device /dev/sr0 ...
umount: /mnt: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
/usr/bin/eject: unmount of `/mnt' failed
Eject Failed: If possible manually eject the Tools installer from the guest
cdrom mounted at /mnt before canceling tools install on the host.

Reboot the VM and check VMware Tools kernel modules

Finally, reboot the VM and check that VMware Tools modules are loaded:

Snag_c46277a.png

That’s it, let me know if you want me to answer any other questions!

See Also