|Purpose||Helps you automate the management of VMware Tools.|
|Platforms||RHEL, CentOS, SUSE, OEL|
What are VMWare Tools & What is this module?
From VMWare: “VMware Tools is a suite of utilities that enhances the performance of the virtual machine’s guest operating system and improves management of the virtual machine.” In lieu of ntpd on the managed system, it can also be useful for keeping the virtual machine’s clock in sync with its host.
The razorsedge/vmwaretools module installs the VMware Operating System Specific Packages and manages the vmware-tools service. If you’re spending a bunch of time installing VMware tools on your machines or have stale tools in your VMware templates, this module is meant to automate the problem away.
Installing the Module
|Installation Time||5 minutes|
To install this module, use the Puppet Module Tool (available in Puppet ≥2.7.14 or Puppet ≥2.5.).
[root@learn ~]# puppet module install razorsedge-vmwaretools Preparing to install into /etc/puppetlabs/puppet/modules ... Downloading from http://forge.puppetlabs.com ... Installing -- do not interrupt ... /etc/puppetlabs/puppet/modules └── razorsedge-vmwaretools (v4.0.2)
What does the module do?
By default, the ‘vmwaretools’ class does the following.
- Detects if the agent is a VMware based virtual machine & if so,
- Configures a YUM repository for the VMware OSPs.
- Installs the VMware Tools package from that repo.
- Configures and ensures the vmware-tools service is running.
It provides a number of class parameters in case you want to modify the class behavior (see documentation in init.pp).
- The version of VMware Tools to install (default: 4.1latest).
- Upgrade package automatically, if there is a newer version (default: false).
- Ensure if the service is running or stopped (default: running).
The last example, service_ensure is handy if you want the extra device drivers, but would rather manage your machines time through NTP.
Using the class parameters is beyond the scope of the blog post, but we’ve provided further information on how to do this in the addendum.
In the simplest case, all you need to automatically provision VMWare tools is install the module, declare the vmwaretools class on your agents and make a sandwich.
Since I’m using the Learning Puppet VM with Puppet Enterprise pre-installed, I’ll simply declare the class in the enterprise console and assign it to my CentOS node.
Step 1: Add the vmwaretools class to the Puppet Enterprise Console (Supporting Doc)
Step 2: Configure my learn.localdomain agent to use the vmwaretools class (Supporting Doc)
Step 3. Save my changes and run Puppet via Live Management!
Step 4. Take a look at a report to see the change in state.
In about five simple steps, you can download the razorsedge/vmwaretools module from the Puppet Forge, assign the vmwaretools class to your RedHat family machines and immediately install and manage VMware Tools.
This blog post walks you through a basic case of managing VMware Tools with the default settings built into the razorsedge/vmwaretools Puppet module. If the default settings are not appropriate for you, you can specify different settings by declaring the parameterized class in your node definition. Doing this is beyond the scope of this particular post but see the links for supporting documentation and example declarations on the razorsedge/vmewaretools Puppet Forge page.
We want to blog about your module!
This post was written in collaboration with the module author, Mike Arnold. Razorsedge has several other modules on the Puppet Forge that may interest you. We love writing blog posts about community-driven modules, and we love MOTW blog posts written by the community! If you’re interested in nominating a module considered for module of the week or in writing one with us, please email firstname.lastname@example.org.