I am happy to announce that we have recently open sourced our Chef provisioning driver for vSphere. This driver makes it easy to provision Chef nodes on VMware vSphere infrastructure.

What is Chef-Provisioning?

Chef-Provisioning (formerly known as Chef-Metal) is a fairly new offering from Chef that allows you to create Chef recipes to bootstrap machines. It extends the functionality of a recipe typically used for defining an individual node to potentially define all infrastructure for a distributed application or even an entire data center.

Chef-Provisioning introduces a collection of new resources to your recipes and at the center of these is the machine resource. With the machine resource one describes:

  • Hypervisor or cloud-specific properties of a machine
  • Node attributes to associate with the machine
  • A runlist that the created machine will converge

Chef Provisioning exposes a driver interface making it possible for any hypervisor, cloud or even some bare metal infrastructures to interact with these machine resources. There are currently several drivers available and today, CenturyLink introduces our own driver for vSphere.

Chef Provisioning for the Enterprise

The CenturyLink-released driver fills in a significant gap for provisioning Chef nodes in enterprise shops that use VMware for their core virtualization technology. We began working on this in the spring of 2014 when we initially forked the GitHub repo maintained by Rally Software and developed by Brian Dupras. Internally at CenturyLink, we have been keeping our fork up to date with the latest Chef-provisioning driver interface throughout its evolution and have also been adding several features here and there to support our own provisioning needs.

Provisioning a node

Here is a very simple example recipe that provisions a Chef node using our Chef-provisioning-vSphere driver:

Chef_gem 'Chef-provisioning-vSphere' do
  action :install
  compile_time true

require 'Chef/provisioning/vSphere_driver'

with_vSphere_driver host: 'vcenter-host-name',
  insecure: true,
  user:     'you_user_name',
  password: 'your_mothers_maiden_name'

with_machine_options :bootstrap_options => {
  use_linked_clone: true,
  num_cpus: 2,
  memory_mb: 4096,
  network_name: ["vlan_20_172.21.20"],
  datacenter: 'datacenter_name',
  resource_pool: 'cluster',
  template_name: 'path to template',
  customization_spec: {
    ipsettings: {
      dnsServerList: ['','']
    :domain => 'local'
  :ssh => {
    :user => 'root',
    :password => 'password',
    :paranoid => false,

machine "my_machine_name" do
  run_list ['my_cookbook::default']

You will find more examples and documentation for all supported machine options in the README of our driver repo. Here are some feature highlights supported by our driver:

  • Both SSH and WinRM-based provisioning for the creation of Linux and Windows servers
  • Ability to provide customization metadata for domain joining and registering licenses for provisioned Windows servers
  • Support for linked clones which provide fast provision times and are great for testing
  • Ability to add multiple NICs
  • Includes a Test-Kitchen driver for vSphere for testing your Chef cookbooks on vSphere test instances

Send us your pull requests!

We intended to make our contributions public from the beginning and have made an effort all along to ensure our driver code is publicly consumable and free of any "specialness" with respect to our own infrastructure. That said, there may be corners of the codebase that may not be ideally suited for everyone. We welcome all issues raised and any pull requests submitted and would like to see this driver continually improved upon to provide a better provisioning experience for all VMware Chefs.