Forge Home


vcenter puppet module


21,948 latest version

3.2 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.2.0 (latest)
  • 0.1.0
released Jan 23rd 2013

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppetlabs-vcenter', '0.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppetlabs-vcenter
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppetlabs-vcenter --version 0.2.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



puppetlabs/vcenter — version 0.2.0 Jan 23rd 2013

VMware vCenter module for Puppet

This module deploys VMware vCenter and manages folders, datacenter, ESX host and clusters.


The vCenter module depends on the following modules:

The modules can be installed via puppet module tool (require version 2.7.14+):

puppet module install puppetlabs/vcenter
Preparing to install into /Users/nan/.puppet/modules ...
Downloading from ...
Installing -- do not interrupt ...
└─┬ puppetlabs-vcenter (v0.1.0)
  ├─┬ puppetlabs-mssql (v0.1.0)
  │ └── puppetlabs-dism (v0.1.0)
  └── puppetlabs-registry (v0.1.1)



  • media: vCenter installation software media location.
  • sql_media: Microsoft SQL installation software media location.
  • username: vcenter service account (default: VCENTER).
  • password: vcenter service account password (default: 'vC3nt!2008demo'),
  • jvm_memory_option: vcenter sql server size, support S, M, L.
  • client: install vsphere client software (default: true).


class vcenter {
  media => 's:\\',
  jvm_memory_option => 'M',

If you already have vCenter deployed or are using vCSA, rbvmomi package is the only dependency for vCenter resources:

package { 'rbvmomi':
  ensure   => present,
  provider => 'gem',

Vc_folder {
  require => Pakcage['rbvmomi'],
Vc_host {
  require => Pakcage['rbvmomi'],


Manages vCenter folders.

vc_folder { 'lab1':
  path       => '/stumptown_lab1', # namevar
  ensure     => present,
  connection => 'administrator:puppet@vcenter.puppetlabs.lan',


Manages vCenter datacenter.

vc_datacenter { 'dc1':
  path       => '/stumptown_lab1/datacenter1', # namevar
  ensure     => present,
  connection => 'administrator:puppet@vcenter.puppetlabs.lan',


Manages vCenter cluster.

vc_cluster { 'cl1':
  path       => '/stumptown_lab1/datacenter1/cluster1', # namevar
  ensure     => present,
  connection => 'administrator:puppet@vcenter.puppetlabs.lan',


Manages vCenter host.

vc_cluster { '':
  path       => '/stumptown_lab1/datacenter1/cluster1', # namevar
  ensure     => present,
  username   => 'root',  # ESX host username
  password   => 'demo1', # ESX host password
  connection => 'administrator:puppet@vcenter.puppetlabs.lan',

Export and Collect vc_host resources:

In puppet.conf enable storeconfig to support export resources on the Puppet master. The following section is an example for mysql, see documentation other databases such as puppetdb.

  storeconfigs         = true
  storeconfigs_backend = mysql
  dbuser               = puppet
  dbpassword           = password
  dbserver             = master.puppetlabs.local

The provision host can export vc_host resources to be managed by vCenter controlled by puppet:

@@vc_host { '':
  ensure   => 'present',
  username => 'root',
  password => 'demo1',
  tag      => 'beaker',

On the puppet master specify where these tags get collected for the vCenter system.

node vcenter.puppetlabs.local {
  vc_folder { '/lab':
    ensure => present,

  vc_datacenter { [ '/lab/ny', '/lab/ca' ]:
    ensure => present,

  vc_cluster { [ '/lab/ny/kermit', '/lab/ca/beaker' ]:
    ensure => present,

  # Collect resource specify path and connection for vc_host:
  Vc_host <<| tag=='kermit' |>> {
    ensure     => present,
    path       => '/lab/ny/kermit',
    connection => 'administrator:vmware@',

  Vc_host <<| tag=='dc2' |>> {
    ensure     => present,
    path       => '/lab/ca/beaker',
    connection => 'administrator:vmware2@',