Module of the Week: razorsedge/vmwaretools – Manage VMWare Virtualization Tools
| Purpose | Helps you automate the management of VMware Tools. |
| Module | rasorsedge/vmwaretools |
| Puppet Version | 2.6+ |
| 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.
For the purpose of this blog post, I’m going to use razorsedge/vmwaretools to establish the vmware-tools service on the Learning Puppet VM.
Installing the Module
| Complexity | Easy |
| 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).
- ‘tools_version’
- The version of VMware Tools to install (default: 4.1latest).
- ‘autoupgrade’
- Upgrade package automatically, if there is a newer version (default: false).
- ‘service_ensure’
- 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.
Example usage
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.
Conclusion
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.
Addendum
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 michelle@puppetlabs.com.
Learn More:




8 Comments
I’m a bit disappointed by this module-of-the-week article. It’s lacking depth and focussing on the wrong subject, namely Puppet Enterprise features.
Most of the article is about how to install a module (could’ve been any module) via the Module Tool and PE Dashboard, and how to get it deployed on a client. It’s generic info. The actual vmwaretools module is not reviewed, there is no advice for other module developers on the good and bad parts of the module. There’s no mention of its limitations, such as RedHat-only,and strenghts. I found the module’s homepage and its source far more illuminating, with some nice solutions by the module’s author.
Previous articles, like the ones about puppetlabs/registry or puppetlabs/mysql, were a lot more interesting, even if (understandably) Puppet Labs’ modules get a lot of attention. Keep up the quality writing, please!
Thank you for your feedback Martijn. I should have been more explicit about the intent for this post and I apologize for that.
This post is intended to cover the simplest, lowest barrier case to managing VMWare Tools with Puppet. It’s meant for those brand new to Puppet that just want to install Puppet in their VMWare VSphere infrastructure and start to experiment with what Puppet can do for them, before they dive into docs.puppetlabs.com/learning and figure out how everything works.
I’m currently drafting a second blog post that covers razorsedge/vmwaretools more in-depth, including a review of how the module is structured. Again, I apologize that our intentions weren’t made clear in this post and I look forward to your feedback on the followup post.
–Ryan
P.S. If you’ve written a module or know of a module that you’d like to see in a module of the week post, we’d love to have you as a guest writer. If you’re interested in something like that, please send a note to the awesome michelle@puppetlabs.com.
To bad that the module in Puppet Forge is old, and that the latest version is available on Github. Kinda defeats the purpose of using Forge, if you need to check github if there is a newer version present.
It is probably the authors responsability to push changes to Forge, but will they in a long term perspective?
Hello Tore,
The latest release on the Puppet Forge and what we reviewed in this post is version 4.0.2, released July 18th of this year. You’re completely right, since the author made that release, there have been two commits to the master branch on GitHub since this release (July 24 & July 25).
This does not quite mean the latest version is available on GitHub. It’s more a sign that the author is actively developing and maintaining their module. When the author has finished a development iteration, has tested it to their satisfaction and written up the relevant release notes, they will create a release and push it to the Forge. Razors Edge has a consistent history of doing that on a regular basis, take a look at their Forge releases compared to the tags on GitHub.
Looking at it another way, there are commits to Puppet nearly every day on GitHub but most people do not run from the source code, they run from a package that our Release & QA teams have tested and released into the wild. We’re just making a distinction between code development and code release.
If there’s a particular commit that interests you and hasn’t made it into a release, feel free to ping the author! I’m sure they’ll be as eager to push a release that you’ll use as much as you’re eager to use it.
Thanks for the feedback and for reading the post, I hope I helped clarify the situation.
Cheers!
–Ryan
Technology Short Take #26 - blog.scottlowe.org - The weblog of an IT pro specializing in virtualization, storage, and servers
[...] to manage VMware Tools using Puppet? Check out this module, one of several that offer this [...]
Module of the Week: razorsedge/vmwaretools – Manage VMWare Virtualization Tools | Puppet Labs
[...] a previous MOTW, I covered what problem this module solves and addressed a very simple workflow for using the [...]
Tried to use this but forge.puppetlabs.com is not accessible behind a firewall using PE 2.7. This is a known bug that has been hanging around for six months with a known fix but no updates to the the release.
Hi Jeff, sorry to hear that. Would you please provide the ticket # for this bug? I’ll alert our team.