Cobbler, ESXi, CentOS, and VMWare Tools
Introduction
This short article will detail a Cobbler snippet for automatically installing the ESXi VMWare Tools.
Table of Contents
Method
This method was inspired by this blog post. It imports the VMWare RPM key and then creates a Yum repository to download the VMWare RPMs. I simply took these instructions and modified them to be able to done automatically via Cobbler.
VMWare Repo
Create a file called vmware.repo with the following contents:
[vmware-tools] name=VMware Tools for Red Hat Enterprise Linux $releasever – $basearch baseurl=http://packages.vmware.com/tools/esx/4.1/rhel5/i686 enabled=1 gpgcheck=1
Note the 4.1 and i686. Replace these with your version of ESXi and the RedHat/CentOS architecture you are using.
Next, place this file on a web server that your VMs can access during installation. For this article, the address will be http://192.168.255.1/vmware.repo.
Cobbler Snippet
The next step is to create a Cobbler snippet in /var/lib/cobbler/snippets. I called mine vmware_tools, but feel free to name it whatever you’d like.
The snippet looks like this:
wget http://192.168.255.1/vmware.repo -O /etc/yum.repos.d/vmware.repo rpm --import http://packages.vmware.com/tools/VMWARE-PACKAGING-GPG-KEY.pub yum -y install vmware-tools
The snippet is easy enough to understand — it can be thought of as just a short shell script.
It first downloads the repo made in the last step, imports the VMWare RPM GPG key, and then installs the vmware-tools.
Snippet Inclusion
Edit your kickstart template in /var/lib/cobbler/kickstarts and add a call for this snippet in the %post section:
$SNIPPET('vmware_tools')
Finally, sync cobbler and everything is ready to go.
Conclusion
This short article detailed how to set up Cobbler to automatically install the VMWare tools to Cobbler-built virtual machines during the installation process.

Delicious Bookmarks for June 27th through June 28th « Lâmôlabs said,
[...] Cobbler, ESXi, CentOS, and VMWare Tools » Terrarum – June 27th ( tags: cobbler snippet example vmware ) [...]
Add A Comment