VMware Tools in Kali 2017.3

The Problem

I'm using VMware Fusion on a Mac.

I downloaded the 32-bit Kali 2017.3 VMware machine from Kali Linux Downloads -- Virtual Images

I got this file: kali-linux-2017.3-vm-i386.ova.

I imported it into VMware. It ran, and could resize the desktop, but I could not copy and paste text from Kali to the host (Mac), or vice versa.

To see the problem, try uninstalling open-vm-tools-desktop:

apt remove open-vm-tools-desktop -y
As shown below, the package cannot be uninstalled because of a "fuse.mount" error. This seems to be a nasty bug in open-vm-tools that has been around for years. Attempts have been made to fix it, but apparently, problems remain.

Removing open-vm-tools

I found a bug report with an update that claims to have fixed this problem.

To install the "fixed" version, execute these commands:

apt install libxml-security-c17v5 -y

wget http://ftp.us.debian.org/debian/pool/main/o/open-vm-tools/open-vm-tools_10.1.5-5055683-4+deb9u1_i386.deb

dpkg -i open-vm-tools_10.1.5-5055683-4+deb9u1_i386.deb

wget http://ftp.us.debian.org/debian/pool/main/o/open-vm-tools/open-vm-tools-desktop_10.1.5-5055683-4+deb9u1_i386.deb

dpkg -i open-vm-tools-desktop_10.1.5-5055683-4+deb9u1_i386.deb

reboot
Kali will warn you that this is a downgrade, and this version of open-vm-tools doesn't work either. But now it's working well enough to be removed.

Execute these commands:

apt purge open-vm-tools-desktop -y
apt purge open-vm-tools -y

Adjusting the OS Version

We need to tell VMware Fusion what version of Linux we are using in order to use its version of VMware tools.

Click the power button at the top right of the Kali desktop and power down your virtual machine.

With your Kali 2017.3 virtual machine powered off, open Settings, as shown below.

In the "System Settings", click General.

The OS is set to "Other". Change it to "Linux", "Debian 8.x", as shown below.

Installing VMware's Version

Start the Kali virtual machine and log in.

From the VMware menu bar, click "Virtual Machine", "Install VMware Tools".

Click Install.

A CD icon appears on your Kali desktop, as shown below.

Double-click the CD icon. Right-click VMwareTools...tar.gz and click "Copy to...", as shown below.

In the "Select Copy Destination" box, on the left side, click Downloads.

At the top right, click Select, as shown below.

Close the VMware Tools window.

Open a Terminal and execute these commands:

cd Downloads
tar xzf VMwareTools*
cd vmware-tools-distrib
./vmware-install.pl

The installer asks many questions. Accept the default directories, but make sure the answer to every yes/no question is yes, including this one, which is "no" by default:

Reboot your virtual machine.

Execute this command to start VMware tools:

service vmware-tools start
Now you can copy and paste text between the Kali VM and the Mac host!

Making VMware Tools Start Automatically

This is a very old-fashioned way to do it, but it works.

Execute this command to make a Bash script:

nano /usr/local/bin/startvm
Paste in the code below:
#!/bin/bash
if [ $(/usr/sbin/service vmware-tools status | grep Active: | grep inactive | wc -l) -gt 0 ]
then
  /usr/sbin/service vmware-tools start
fi

Press Ctrl+X, Y, Enter to save the file.

Execute this command to make the script executable:

chmod +x /usr/local/bin/startvm
Execute this command to create a cron job:
crontab -e
Press Enter to use nano.

Add this line at the end of the file, as shown below.

* * * * * /usr/local/bin/startvm

Press Ctrl+X, Y, Enter to save the file.

Now VMware Tools will start automatically :)

Posted 12-20-17 by Sam Bowne