VMware Tools for Linux

Installing VMware Tools from the Command Line with the Tar Installer

The first steps are performed on the host, within Workstation menus:

1. Power on the virtual machine.

2. After the guest operating system has started, prepare your virtual machine to install VMware Tools.

Choose VM > Install VMware Tools.

The remaining steps take place inside the virtual machine.
[Not necessary when using Kali Linux].

3. As root (su -), mount the VMware Tools virtual CD-ROM image, change to a working directory (for example, /tmp), uncompress the installer, then unmount the CD-ROM image.

Note: Kali Linux and some other Linux distributions automatically mount CD-ROMs. If your distribution uses automounting, do not use the mount and umount commands below. You still must untar the VMware Tools installer to /tmp.
Some Linux distributions use different device names or organize the /dev directory differently. If your CD-ROM drive is not /dev/cdrom or if the mount point for a CD-ROM is not /mnt/cdrom, you must modify the following commands to reflect the conventions used by your distribution.

mount /dev/cdrom /mnt/cdrom
cd /tmp

Note: If you have a previous installation, delete the previous
vmware-distrib directory before installing.

The default location of this directory is*
/tmp/vmware-tools-distrib

4. Untar the VMware Tools tar file:

tar zxpf /mnt/cdrom/VMwareTools-5.0.0-i386.tar.gz
umount /dev/cdrom

Inside a terminal window, type:

echo cups enabled >> /usr/sbin/update-rc.d
echo vmware-tools enabled >> /usr/sbin/update-rc.d

apt-get install gcc make linux-headers-$(uname -r)

ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/

The next step is to edit the VM settings.

Click on the [OPTIONS] tab.
Click on Shared Folders.
On the right hand side, click on Always enabled.
Below the 'Folder sharing' box, is a box entitled 'Folders'.
Click on 'Add'. Click 'Next'.
Browse to the Windows folder that you want to share.
In the 'Name' section, whatever you call is fine.
Just don’t include any spaces on the line.

Click 'Next', then click 'Finish'.
Click 'Ok'.




5. Run the VMware Tools tar installer:

cd vmware-tools-distrib

./vmware-install.pl

Then in the terminal, type:

Reboot


Everything should all be in order just fine when you come back up.



When you install VMware Tools, an entry is made to etc/fstab to specify the
location of shared folders. You can edit this file to change or add entries.

For example, to auto-mount at startup, edit /etc/fstab and add the line:

.host:/ /mnt/hgfs vmhgfs defaults 0 0

Just make sure you leaf an extra blank line on the last line.
I don’t know why, but Fstab will be happier that way.



----

Useful Vmware-Tools commands:

$ sudo /etc/init.d/vmware-tools start
$ sudo /etc/init.d/vmware-tools stop
$ sudo /etc/init.d/vmware-tools restart
$ /etc/init.d/vmware-tools status

Check if the module vmhgfs is loaded:

lsmod | grep "vm"

Tested, tried, and works in versions:

VMware Workstation 9.02 & 10
VMware-Tools v9.2.3 & v9.6.1



----

Note: involving Vmware Workstation 9.02 and Vmware Tools v9.2.3:

If you received this error message at the end of the installation:
It means that due to a known issue as of March 2nd, 2013;
Vmware will compile with kernel 3.7, barring the shared folder module.

Creating a new initrd boot image for the kernel.
update-initramfs: Generating /boot/initrd.img-3.7-trunk-amd64
Starting Virtual Printing daemon: done
Checking acpi hot plug done
Starting VMware Tools services in the virtual machine:
Switching to guest configuration: done
VMware Automatic Kmods: done
VM communication interface: done
VM communication interface socket family: done
Guest filesystem driver: done
Mounting HGFS shares: failed
Blocking file system: done
VMware User Agent: done
Guest operating system daemon: done

The configuration of VMware Tools 9.2.3 build-1031360 for Linux for this
running kernel completed successfully.

The communication service is used in addition to the standard communication
between the guest and the host. The rest of the software provided by VMware
Tools is designed to work independently of this feature.
If you wish to have the VMCI feature, you can install the driver by running
vmware-config-tools.pl again after making sure that gcc, binutils, make and the
kernel sources for your running kernel are installed on your machine.

VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot that are not already present. By selecting yes,
you will be enabling this experimental feature. You can always disable this
feature by re-running vmware-config-tools.pl.

VM communication interface socket family: failed
/etc/init.d/vmware-tools: 1090: local: ': bad variable name
Blocking file system: