Month: November 2012

vmware tools in Centos 5.x and 6.x


A really boring post, but I want to have this for future records. Here is a manual way of installing vmware tools running on CentOS 5/6

First, import the keys to RPM:

rpm --import rpm --import

Add the repository to yum by creating file /etc/yum.repos.d/vmware-tools.repo:

cat <<EOT > /etc/yum.repos.d/vmware-tools.repo
name=VMware Tools </span>
#baseurl=\$basearch baseurl=\$basearch

Then, install using:

# for non-PAE kernel:

yum -y install vmware-tools-esx-kmods vmware-tools-esx

# for PAE kernel:

yum -y install vmware-tools-esx-kmods-pae vmware-tools-esx

For no X windows:

yum -y install vmware-tools-esx-nox

BUT, here is a puppet manifest that does the job for you 🙂

class vmtools

if $::osfamily == 'RedHat' and $::operatingsystem != 'Fedora' {

yumrepo { 'vmware-tools-repo':
 baseurl => "$ {::os_maj_version}/${::architecture}",
 enabled => '1',
 gpgcheck => '1',
 descr => "VMware tools package for ESX 5.0 update 1"


exec { "install GPG-DSA keys":

command => "/bin/rpm --import",

unless => "/bin/rpm -q gpg-pubkey --qf
 '%{name}-%{version}-%{release} -->
 %{summary}\n' |/bin/grep VMware >
 /dev/null 2>&1"


exec { "install GPG-RSA keys":
 command => "/bin/rpm --import",

unless => "/bin/rpm -q gpg-pubkey --qf
 '%{name}-%{version}-%{release} -->
 %{summary}\n' |/bin/grep VMware >
 /dev/null 2>&1"

 package { "vmware-tools-esx-nox" : ensure => "installed" }
 } else {

notice ("Your operating system ${::operatingsystem} is not
 supported vmtools to run with this puppet manifest")