chef-boneyard / chef-provisioning-vsphere

DEPRECATED: A chef-provisioning provisioner for VMware vSphere
MIT License
17 stars 15 forks source link

Question: cannot realize if it is a bug or my misunderstanding #68

Open ysyvachenko opened 6 years ago

ysyvachenko commented 6 years ago

Versions:

Platform Details

Scenario:

I am trying to create and converge ubuntu VM from template using Chef Zero. My goal is to use git repository to manage a few of Ubuntu VMs.

Steps to Reproduce:

  1. Execute 'chef generate repo test'
  2. Execute 'chef generate cookbook cookbooks/provision'
  3. Modify file cookbooks/provision/recipes/default.rb to have
chef_gem 'chef-provisioning-vsphere' do
  action :install
  compile_time true
end

require 'chef/provisioning/vsphere_driver'

with_vsphere_driver host: 'host-vcenter',
  insecure: true,
  user:     'some-user',
  password: 'some-password'

with_machine_options :bootstrap_options => {
  use_linked_clone: true,
  num_cpus: 2,
  memory_mb: 4096,
  datacenter: 'Datacenter',
  resource_pool: 'some-cluster',
  template_name: 'ubuntu-desktop-16.04',
  template_folder: 'Templates',
  vm_folder: 'some-folder',
  datastore: 'some-datastore',
  customization_spec: {
    :domain => 'local'
  },
  :ssh => {
    :user => 'root',
    :password => 'root-password',
    :paranoid => false,
  }
}

machine 'mymachinename' do
  action :setup
end
  1. Execute 'chef-client -z -o 'provision''

Expected Result:

  1. VM is cloned from template (done).
  2. VM is powered up (done).
  3. VM customized with vSphere (done).
  4. PKI keys created (done)
  5. chef-client installed (failure) - or something else related to convege

Actual Result:

Command 'chef-client -z -o 'provision'' fails with an error:

'FATAL: RuntimeError: machine[mymachinename] (provision::default line 40) had an error: RuntimeError: Cannot forward a socketless Chef Zero server, see https://docs.chef.io/deprecations_local_listen.html for more information'

ysyvachenko commented 6 years ago

And there is a full log output:

full-log.txt