Skip to content

Instantly share code, notes, and snippets.

@joshaven
Last active September 20, 2019 10:27
Show Gist options
  • Save joshaven/6346527 to your computer and use it in GitHub Desktop.
Save joshaven/6346527 to your computer and use it in GitHub Desktop.
Install vmware tools from vSphere via script
#!/bin/sh
# This script installs VMWare Tools on Ubuntu
# Although untested this should work on any distro that uses apt as a package manager.
#
# First open vSphere Client, right-click on this host
# Then choose [Guest] -> [Install VMWare Tools].
# Select Interactive Tools Upgrade and press ok then re-run this script.
#
apt-get install -y build-essential linux-headers-`uname -r` psmisc
mkdir -p /media/cdrom
mount /dev/cdrom /media/cdrom && tar xvf /media/cdrom/VMwareTools-*.tar.gz -C /tmp/
/tmp/vmware-tools*/vmware-install.pl -d
rm -r /tmp/vmware-tools-*
@joshaven
Copy link
Author

To download and execute the script in one shot use (as root):
wget https://gist.github.com/joshaven/6346527/raw/19f833274aa3dba231701f9ceb3d9a8eaef8128d/install-vmware-tools.sh -O - | sh

@joshaven
Copy link
Author

If you find that you don't have a /dev/cdrom then you may have a cdrom1 or such... you can modify the script above or link a cdrom to the proper location ie: ( ln -s /dev/sr0 /dev/cdrom )... the correct location can be seen form ls -l /dev and noticing where the cdrom1 or other reference links to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment