Skip to content

Instantly share code, notes, and snippets.

@trodemaster
Created June 2, 2015 16:11
Show Gist options
  • Save trodemaster/4b387f408e9e0b2acc5d to your computer and use it in GitHub Desktop.
Save trodemaster/4b387f408e9e0b2acc5d to your computer and use it in GitHub Desktop.
cenos/rhel6 tools
#!/bin/sh
# Install latest vmware tools from vmware.com repo for rhel 6
# get cert
wget -P /tmp http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub
# install cert
sudo rpm --import /tmp/VMWARE-PACKAGING-GPG-RSA-KEY.pub
# Setup repo
sudo sh -c "cat > /etc/yum.repos.d/vmware-tools.repo" <<EOF
[vmware-tools]
name=VMware Tools for CentOS or RHEL
baseurl=http://packages.vmware.com/tools/esx/latest/rhel6/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///srv/crypto/VMWARE-PACKAGING-GPG-RSA-KEY.pub
EOF
# install the tools packages
sudo yum -y install vmware-tools-esx-nox
sudo yum -y install vmware-tools-esx-kmods
# add debug tools config file
#sudo mkdir -p /etc/vmware-tools/
sudo sh -c "echo 'log = "TRUE"' > /etc/vmware-tools/tools.conf"
sudo sh -c "echo 'log.file = "/var/log/vmtools.log"' >> /etc/vmware-tools/tools.conf"
# Report the version of tools installed
if [ -x `which vmware-toolbox-cmd` ]
then
echo "VMware tools version `vmware-toolbox-cmd --version`"
else
echo "VMware Tools Failed to install!!"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment