Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 100 servers with RHEL that I would like to run VMware tools. I have written a Puppet-module that can install VMware tools, just using package {}:

package { 'vmware-tools-esx-nox':
    ensure => installed,
}

It would be nice to have a list of servers that do not have the vmware-tools package installed. How can Puppet help me find out what servers do not have VMware Tools installed?

share|improve this question

4 Answers 4

If you have applied that module to all nodes, then the answer should be 'none'. The puppetmaster reporting will tell you as each server is brought into compliance.

The vSphere client will tell you which VMs have vmware tools installed NOW though.

Here's a sample in PowerShell (using VMWare's PowerCLI), listing VMs having no (or no current) tools installed:

get-VM | Get-View | `
   ? { $_.Guest.ToolsStatus -match "toolsNotInstalled" -or `
      $_.Guest.ToolsVersionStatus -ne "guestToolsCurrent" } | `
   select Name, `
      @{Name="Status"; Expression={$_.Guest.ToolsStatus}}, `
      @{Name="Version"; Expression={$_.Guest.ToolsVersionStatus}} | `
   format-table
share|improve this answer

Yes, you can use Puppet for this... You can check files, or the service or installation bundle. The PowerCLI approach works, too, but it probably less helpful in your environment.

Another consideration is to use the VMware Operating System Specific Packages (OSPs).

See: How do I make sure VMware Tools is installed and running?

This allows you to manage the VMware tools packages with native RPMs and YUM, versus the clunky vSphere client approach. It's probably a good idea for an environment with the number of systems yours has.

share|improve this answer

I do realise that this could be construed as plugging my own solution, but I have actually written a Puppet module (PuppetForge) to control VMware Tools installations via the tarball archive distributed with vSphere/ESX, rather than using the OSP or open-vm-tools packages.

Once you're using the module (or any module for that matter), you can easily use the vSphere client to see which of your VMs doesn't have the tools configured and running.

share|improve this answer
up vote 0 down vote accepted

I decided to work with my own custom facts to analyze the current set-up on multiple servers. This data will be mined with PuppetDB and can provide beautiful reports.

/etc/puppet/modules/facter/lib/facter/extra_info.rb:

# vmware installed?
Facter.add("vmtools_installed") do
  setcode do
    File.exists?('/usr/bin/vmware-toolbox-cmd')
  end
end

# vmware-running?
Facter.add("vmtools_version") do
  setcode do
    Facter::Util::Resolution::exec('/usr/bin/vmware-toolbox-cmd -v')
  end
end

Another module called "VMTools" installs the VMWare Tools rpm-package (from RHN Satellite) if VMWare Tools is not installed. The same module will update VMWare Tools to the latest package if it's not running the latest version of VMware Tools.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.