Month: November 2012

vmware tools in Centos 5.x and 6.x

vmtools 

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 http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub

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=http://packages.vmware.com/tools/esx/5.0u1/rhel5/\$basearch baseurl=http://packages.vmware.com/tools/esx/5.0u1/rhel6/\$basearch
enabled=1
gpgcheck=1
EOT

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

</div>
<div>
<pre>
if $::osfamily == 'RedHat' and $::operatingsystem != 'Fedora' {

yumrepo { 'vmware-tools-repo':
 baseurl => "http://packages.vmware.com/tools/esx/5.0u1/rhel$ {::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 http://packages.vmware.com/tools/keys/
 VMWARE-PACKAGING-GPG-DSA-KEY.pub",

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 http://packages.vmware.com/tools/keys/
 VMWARE-PACKAGING-GPG-RSA-KEY.pub",

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")

}
 }