Unable to provision VM on VMware with Chef


#1

I was trying to provision VM on VMWare using Chef but it is unable to recognize the template location. Following is the content of my file

==========================================
chef_gem ‘chef-provisioning-vsphere’ do
action :install
compile_time true
end

require ‘chef/provisioning/vsphere_driver’

with_vsphere_driver host: ‘192.168.5.4’,
insecure: true,
user: ‘xxxxxxx’,
password: ‘xxxxxxx’

with_machine_options :bootstrap_options => {
use_linked_clone: true,
num_cpus: 2,
memory_mb: 4096,
network_name: [“VM Network”],
datacenter: ‘AWS Practice’,
resource_pool: ‘Sample’,
template_folder: ‘[Cert-DS]ubuntu-16.04-template’,
template_name: ‘ubuntu-16.04-template.vmtx’,
datastore: “Cert-DS”,
additional_disk_size_gb: [50,20],
customization_spec: {
ipsettings: {
ip: ‘192.168.5.14’,
subnetMask: ‘255.255.255.0’,
gateway: [“192.168.5.1”],
dnsServerList: [‘8.8.8.8’,‘8.8.4.4’]
},
:domain => ‘local’
},
:ssh => {
:user => ‘root’,
:password => ‘password’,
:paranoid => false,
}
}

machine “machine1” do
run_list [‘InstallationManager::default’]
end

==================================
I am getting the error as follows:

vSphere Folder not found [[Cert-DS]ubuntu-16.04-template]


#2

Answered at https://github.com/CenturyLinkCloud/chef-provisioning-vsphere/issues/101