How to install VMware Tools on Linux guest machine

Learn to install VMware tools in Linux VMs like RedHat, Suse, Debian, Ubuntu, CentOS, etc. The article includes screenshots, commands, and a complete installation log.

VMware tools installation on Linux

Even the cloud market is bursting nowadays, many corporations still prefer to have in-house Infra virtualization using technologies like VMware. A wide variety of Operating systems can be hosted on virtual machines created under it.

Linux servers like Red Hat, Ubuntu, Suse, Fedora are hosted on VMware infra. After fresh installation you will see warning under VMware console that VMware Tools are not installed on your guest machine. Like below :

VMware Tools is not installed on this virtual machine!

vmware tools warning

It is not mandatory to install these tools but recommended having them on the guest machine so that host and guest can communicate properly. As a result, your VMware console has more power, visibility over your guest machine.

In this article, we will walk through steps on how to install VMWare tools on Linux guest OS like Red Hat, Ubuntu, Kali, Suse, Debian, etc.

Step 1.

First make sure you have one empty CD-ROM drive attached with the guest machine. Click on the Install VMware Tools” link in the warning shown above. That will be under the ‘Summary‘ tab of your virtual machine in the VMware console. This will pop up a message confirming to mount VMware tools cdrom on your guest OS.

Mounting VMware tools disc

Click ‘Mount‘ on the pop-up and it will mount VMware tools disc on your guest Linux machine. If you have VMware tools ISO, you can mount ISO as well.

Step 2.

Login to guest Linux machine and you will notice disc is automatically mounted on /media/VMware Tools. Verify it using df command.

root@kerneltalks # df -h
Filesystem                 Size  Used Avail Use% Mounted on
/dev/sr0                    71M   71M     0 100% /media/VMware Tools

If it’s not mounted automatically, you can mount it manually with below set of commands –

root@kerneltalks # mkdir /mnt/cdrom
root@kerneltalks # mount /dev/cdrom /mnt/cdrom
root@kerneltalks # df -h
Filesystem                 Size  Used Avail Use% Mounted on
/dev/sr0                    71M   71M     0 100% /mnt/cdrom

Once mounted confirm the content of discs are visible to you.

root@kerneltalks # cd "/media/VMware Tools"
root@kerneltalks # ll
total 71888
-r--r--r-- 1 root root 72162730 Feb 17  2016 VMwareTools-10.0.6-3560309.tar.gz
-r-xr-xr-x 1 root root     2012 Feb 17  2016 manifest.txt
-r-xr-xr-x 1 root root     1850 Feb 17  2016 run_upgrader.sh
-r-xr-xr-x 1 root root   687524 Feb 17  2016 vmware-tools-upgrader-32
-r-xr-xr-x 1 root root   757944 Feb 17  2016 vmware-tools-upgrader-64

It is important to copy files from disc to local directory. Since if you try to directly run things from the disc you may encounter permission related errors because the disc is mounted as read-only.

Step 3.

Copy installers in the local directory. Goto disc and copy tar file in it to local directory e.g. /tmp/vmware

root@kerneltalks # mkdir /tmp/vmware
root@kerneltalks # cp VMwareTools-10.0.6-3560309.tar.gz /tmp/vmware

Now, untar and unzip this file. You will see newly created directory named vmware-tools-distrib

root@kerneltalks # cd /tmp/vmware
root@kerneltalks # tar -zxpf VMwareTools-10.0.6-3560309.tar.gz
root@kerneltalks # ll
total 140944
-r--r--r-- 1 root root 72162730 Sep 23 09:46 VMwareTools-10.0.6-3560309.tar.gz
drwxr-xr-x 1 root root      162 Feb 17  2016 vmware-tools-distrib

Navigate to vmware-tools-distrib where the actual installer script is located. Its a Perl script vmware-install.pl so make sure you have Perl installed on your server.

root@kerneltalks  # cd vmware-tools-distrib
root@kerneltalks  # ll
total 488
-rw-r--r-- 1 root root 282475 Feb 17  2016 FILES
-rw-r--r-- 1 root root   2538 Feb 17  2016 INSTALL
drwxr-xr-x 1 root root    114 Feb 17  2016 bin
drwxr-xr-x 1 root root     18 Feb 17  2016 caf
drwxr-xr-x 1 root root     74 Feb 17  2016 doc
drwxr-xr-x 1 root root    598 Feb 17  2016 etc
drwxr-xr-x 1 root root    114 Feb 17  2016 installer
drwxr-xr-x 1 root root    158 Feb 17  2016 lib
drwxr-xr-x 1 root root     14 Feb 17  2016 vgauth
-rwxr-xr-x 1 root root    243 Feb 17  2016 vmware-install.pl
-rwxr-xr-x 1 root root 205571 Feb 17  2016 vmware-install.real.pl

Step 4.

Install VMware tools. The final step is to run the Perl script and install tools. It will ask you a couple of questions regarding directory structures, you can customize or just accept defaults.

All the below installation logs are minimized for the better reading experience. To view them, click on them to expand code.

root@kerneltalks # ./vmware-install.pl
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]

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

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

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

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

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]

In which directory do you want to install the common agent library files?
[/usr/lib]

In which directory do you want to install the common agent transient files?
[/var/lib]

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

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]

The installation of VMware Tools 10.0.6 build-3560309 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]

Once it receives all the answers, installation begins –

Initializing...


Making sure services for VMware Tools are stopped.

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


Found a compatible pre-built module for vmci.  Installing it...


Found a compatible pre-built module for vsock.  Installing it...


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.

During installation it will ask you if you want to enable specific features or not. Submit your choices accordingly.

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? [no]

Found a compatible pre-built module for vmxnet.  Installing it...


The vmblock enables dragging or copying files between host and guest in a
Fusion or Workstation virtual environment.  Do you wish to enable this feature?
[no]

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?
[no]


Disabling timer-based audio scheduling in pulseaudio.

Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed
if you want to enable Common Agent (caf). [yes]

Do you want to enable Common Agent (caf)? [yes]

Finally it will detect and confirms  GUI related parameters and builds boot image.

Detected X server version 1.6.5


Unable to detect guest resolution.


Please choose one of the following display sizes that X will start with:

[1]< 640x480
[2]  800x600
[3]  1024x768
[4]  1280x800
Please enter a number between 1 and 4:

[1] 2


X is running fine with the new config file.

Creating a new initrd boot image for the kernel.

Kernel image:   /boot/vmlinuz-3.0.101-63-default
Initrd image:   /boot/initrd-3.0.101-63-default
Root device:    UUID=6b24d38e-094f-471b-8215-aaf85a47fe8e (/dev/dm-2) (mounted on / as btrfs)
Resume device:  /dev/swapvg/swaplv
modprobe: Module crct10dif not found.
WARNING: no dependencies for kernel module 'crct10dif' found.
Kernel Modules: hwmon thermal_sys thermal processor fan scsi_mod libata libahci ahci scsi_transport_spi mptbase mptscsih mptspi ata_piix ata_generic vmxnet3 

vmw_pvscsi vmxnet dm-mod dm-log dm-region-hash dm-mirror dm-snapshot scsi_dh scsi_dh_alua scsi_dh_emc scsi_dh_hp_sw scsi_dh_rdac libcrc32c zlib_deflate btrfs 

usb-common usbcore ohci-hcd uhci-hcd ehci-hcd xhci-hcd hid usbhid linear crc-t10dif sd_mod crc32c
Features:       acpi dm block usb lvm2 btrfs resume.userspace resume.kernel
Bootsplash:     SLES (800x600)
51984 blocks
>>> Network: auto
>>> Calling mkinitrd -k /boot/vmlinuz-3.0.101-63-default -i /tmp/mkdumprd.XwBasPAr7V -f 'kdump network' -B  -s ''
Regenerating kdump initrd ...

Kernel image:   /boot/vmlinuz-3.0.101-63-default
Initrd image:   /tmp/mkdumprd.XwBasPAr7V
Root device:    UUID=6b24d38e-094f-471b-8215-aaf85a47fe8e (/dev/dm-2) (mounted on / as btrfs)
Resume device:  /dev/swapvg/swaplv
Dump device:    UUID=cbc439cd-3514-442e-bb42-b80f7823bdc1 (/dev/dm-3)
Boot device:    /dev/disk/by-uuid/9278503b-3bed-45b0-968a-6de4c9264d94 (/dev/sda1)
modprobe: Module crct10dif not found.
WARNING: no dependencies for kernel module 'crct10dif' found.
Kernel Modules: hwmon thermal_sys thermal processor fan scsi_mod libata libahci ahci scsi_transport_spi mptbase mptscsih mptspi ata_piix ata_generic vmxnet3 

vmw_pvscsi vmxnet dm-mod dm-log dm-region-hash dm-mirror dm-snapshot scsi_dh scsi_dh_alua scsi_dh_emc scsi_dh_hp_sw scsi_dh_rdac libcrc32c zlib_deflate btrfs 

usb-common usbcore ohci-hcd uhci-hcd ehci-hcd xhci-hcd hid usbhid af_packet linear nls_utf8 mbcache jbd ext3 crc-t10dif sd_mod crc32c
Features:       acpi dm block usb network lvm2 btrfs resume.userspace resume.kernel kdump
64862 blocks
Generating the key and certificate files.
Successfully generated the key and certificate files.
   Checking acpi hot plug                                              done
Starting VMware Tools services in the virtual machine:
   Switching to guest configuration:                                   done
   VM communication interface:                                         done
   VM communication interface socket family:                           done
   Guest operating system daemon:                                      done
   VGAuthService:                                                      done
   Common Agent:                                                       done
The configuration of VMware Tools 10.0.6 build-3560309 for Linux for this
running kernel completed successfully.

In the end, it presents you with the command to be used for VMware tools, greets and un-mount VMware tools disc (if it was mounted automatically in beginning)

You must restart your X session before any mouse or graphics changes take
effect.

You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the
command line.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

Enjoy,

--the VMware team

Found VMware Tools CDROM mounted at /media/VMware Tools. Ejecting device
/dev/sr0 ...

VMware tools silent install on Linux VM

If you do not want to customize any of the answers asked during installation and want to go with all default values then you can use below command for starting non-interactive installation :

root@kerneltalks # ./vmware-install.pl -d default

This will install VMware tools in silent mode. No human interaction required and all default settings will be used for installation.

That’s it! You have successfully installed VMware tools on your Linux guest machine in VMware. You can now see IP details of guests in the VMware console. Also VMware tools status will be shown as ‘Installed and running‘.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.