The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #15177

Cloud Provisioner should work with VSphere 5.0

Added by Gary Larizza almost 2 years ago. Updated 4 months ago.

Status:AcceptedStart date:06/22/2012
Priority:UrgentDue date:
Assignee:-% Done:

0%

Category:cloud provisioner
Target version:-
Keywords: cloud_provisioner Affected URL:
Branch: Affected PE version:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the ENTERPRISE project on JIRA using the button below:


Description

Attempted to use the node_vmware face to provision a node in a Vsphere 5.0 environment and got the following error:


root@master:~# puppet node_vmware create --template /Datacenters/dc1/vm/templates/Ubuntu-Precise-gdl --name /Datacenters/dc1/vm/SELab/CPTEST --trace
notice: Connecting ...
notice: Connected to vsphere.dc1.puppetlabs.net as selabmco (API version 4.1)
notice: Locating VM at /Datacenters/dc1/vm/templates/Ubuntu-Precise-gdl (Started at 08:52:58 PM)
notice: Control will be returned to you in 10 minutes at 09:02 PM if locating (1/2) is unfinished.
Locating (1/2):    100% |ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:01
notice: Starting the clone process (Started at 08:53:00 PM)
notice: Control will be returned to you in 10 minutes at 09:03 PM if starting (2/2) is unfinished.
Starting (2/2):    100% |ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:00
/opt/puppet/lib/gems/1.8/gems/rbvmomi-1.3.0/lib/rbvmomi/connection.rb:47:in `parse_response'
/opt/puppet/lib/gems/1.8/gems/rbvmomi-1.3.0/lib/rbvmomi/connection.rb:71:in `call'
/opt/puppet/lib/gems/1.8/gems/rbvmomi-1.3.0/lib/rbvmomi/basic_types.rb:186:in `_call'
/opt/puppet/lib/gems/1.8/gems/rbvmomi-1.3.0/lib/rbvmomi/basic_types.rb:70:in `CloneVM_Task'
/opt/puppet/lib/gems/1.8/gems/fog-1.0.0e/lib/fog/vsphere/requests/compute/vm_clone.rb:81:in `vm_clone'
/opt/puppet/lib/gems/1.8/gems/fog-1.0.0e/lib/fog/vsphere/models/compute/server.rb:67:in `clone'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:76:in `create'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:221:in `call'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:221:in `do_in_progress_bar'
/opt/puppet/lib/ruby/1.8/timeout.rb:67:in `timeout'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:220:in `do_in_progress_bar'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:74:in `create'
/opt/puppet/lib/site_ruby/1.8/puppet/face/node_vmware/create.rb:61:in `create implementation, required on Ruby 1.8'
/opt/puppet/lib/site_ruby/1.8/puppet/interface/action.rb+eval[wrapper]:207:in `__send__'
/opt/puppet/lib/site_ruby/1.8/puppet/interface/action.rb+eval[wrapper]:207:in `create'
/opt/puppet/lib/site_ruby/1.8/puppet/application/face_base.rb:242:in `send'
/opt/puppet/lib/site_ruby/1.8/puppet/application/face_base.rb:242:in `main'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:317:in `run_command'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:309:in `run'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:416:in `hook'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:309:in `run'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:407:in `exit_on_fail'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:309:in `run'
/opt/puppet/lib/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute'
/usr/local/bin/puppet:4
err: NoPermission: Permission to perform this operation was denied.
err: Try 'puppet help node_vmware create' for usage

Also tried it with a plain name (and without trace):

root@master:~# puppet node_vmware create --template /Datacenters/dc1/vm/templates/Ubuntu-Precise-gdl --name 'CP Test'
notice: Connecting ...
notice: Connected to vsphere.dc1.puppetlabs.net as selabmco (API version 4.1)
notice: Locating VM at /Datacenters/dc1/vm/templates/Ubuntu-Precise-gdl (Started at 04:12:01 PM)
notice: Control will be returned to you in 10 minutes at 04:22 PM if locating (1/2) is unfinished.
Locating (1/2):    100% |ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:01
notice: Starting the clone process (Started at 04:12:03 PM)
notice: Control will be returned to you in 10 minutes at 04:22 PM if starting (2/2) is unfinished.
Starting (2/2):    100% |ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:00
err: NoPermission: Permission to perform this operation was denied.
err: Try 'puppet help node_vmware create' for usage

I had thought it was a permissions issue, but then had Zach give me full administrative permissions to all functions in Vsphere…and got the same error.

History

#1 Updated by Nigel Kersten almost 2 years ago

  • Status changed from Unreviewed to Accepted
  • Priority changed from Normal to Urgent

#2 Updated by Nigel Kersten almost 2 years ago

Gary, do you know if anyone has tried newer Fog releases on the off-chance that fixes it?

#3 Updated by Gary Larizza almost 2 years ago

Just updated to Fog 1.4.0, see below:

root@master:/etc/puppetlabs/puppet# gem list

*** LOCAL GEMS ***

activerecord (2.3.14)
activesupport (2.3.14)
ar-extensions (0.9.5)
builder (3.0.0)
dalli (1.1.2)
excon (0.14.3, 0.13.4, 0.7.4)
fog (1.4.0)
formatador (0.2.0)
guid (0.1.1)
hiera (0.3.0)
hiera-puppet (0.3.0)
mime-types (1.16)
multi_json (1.0.3)
net-scp (1.0.4)
net-ssh (2.1.4)
nokogiri (1.5.0)
rack (1.1.3)
rbvmomi (1.3.0)
ruby-augeas (0.4.1)
ruby-hmac (0.4.0)
sinatra (1.2.6)
stomp (1.1.9)
tilt (1.3.3)
trollop (1.16.2)


root@master:/etc/puppetlabs/puppet# puppet node_vmware create --template /Datacenters/dc1/vm/templates/Ubuntu-Precise-gdl --name /Datacenters/dc1/vm/SELab/CPTEST --trace 
notice: Connecting ...
notice: Connected to vsphere.dc1.puppetlabs.net as selabmco (API version 4.1)
notice: Locating VM at /Datacenters/dc1/vm/templates/Ubuntu-Precise-gdl (Started at 12:19:27 PM)
notice: Control will be returned to you in 10 minutes at 12:29 PM if locating (1/2) is unfinished.
Locating (1/2):    100% |ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:01
notice: Starting the clone process (Started at 12:19:29 PM)
notice: Control will be returned to you in 10 minutes at 12:29 PM if starting (2/2) is unfinished.
Starting (2/2):    100% |ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:00
/opt/puppet/lib/gems/1.8/gems/rbvmomi-1.3.0/lib/rbvmomi/connection.rb:47:in `parse_response'
/opt/puppet/lib/gems/1.8/gems/rbvmomi-1.3.0/lib/rbvmomi/connection.rb:71:in `call'
/opt/puppet/lib/gems/1.8/gems/rbvmomi-1.3.0/lib/rbvmomi/basic_types.rb:186:in `_call'
/opt/puppet/lib/gems/1.8/gems/rbvmomi-1.3.0/lib/rbvmomi/basic_types.rb:70:in `CloneVM_Task'
/opt/puppet/lib/gems/1.8/gems/fog-1.4.0/lib/fog/vsphere/requests/compute/vm_clone.rb:128:in `vm_clone'
/opt/puppet/lib/gems/1.8/gems/fog-1.4.0/lib/fog/vsphere/models/compute/server.rb:98:in `clone'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:76:in `create'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:221:in `call'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:221:in `do_in_progress_bar'
/opt/puppet/lib/ruby/1.8/timeout.rb:67:in `timeout'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:220:in `do_in_progress_bar'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:74:in `create'
/opt/puppet/lib/site_ruby/1.8/puppet/face/node_vmware/create.rb:61:in `create implementation, required on Ruby 1.8'
/opt/puppet/lib/site_ruby/1.8/puppet/interface/action.rb+eval[wrapper]:207:in `__send__'
/opt/puppet/lib/site_ruby/1.8/puppet/interface/action.rb+eval[wrapper]:207:in `create'
/opt/puppet/lib/site_ruby/1.8/puppet/application/face_base.rb:242:in `send'
/opt/puppet/lib/site_ruby/1.8/puppet/application/face_base.rb:242:in `main'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:317:in `run_command'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:309:in `run'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:416:in `hook'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:309:in `run'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:407:in `exit_on_fail'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:309:in `run'
/opt/puppet/lib/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute'
/opt/puppet/bin/puppet:4
err: NoPermission: Permission to perform this operation was denied.
err: Try 'puppet help node_vmware create' for usage


root@master:/etc/puppetlabs/puppet# puppet node_vmware create --template /Datacenters/dc1/vm/templates/Ubuntu-Precise-gdl --name 'CP Test' --trace
notice: Connecting ...
notice: Connected to vsphere.dc1.puppetlabs.net as selabmco (API version 4.1)
notice: Locating VM at /Datacenters/dc1/vm/templates/Ubuntu-Precise-gdl (Started at 12:20:37 PM)
notice: Control will be returned to you in 10 minutes at 12:30 PM if locating (1/2) is unfinished.
Locating (1/2):    100% |ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:01
notice: Starting the clone process (Started at 12:20:39 PM)
notice: Control will be returned to you in 10 minutes at 12:30 PM if starting (2/2) is unfinished.
Starting (2/2):    100% |ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:00
/opt/puppet/lib/gems/1.8/gems/rbvmomi-1.3.0/lib/rbvmomi/connection.rb:47:in `parse_response'
/opt/puppet/lib/gems/1.8/gems/rbvmomi-1.3.0/lib/rbvmomi/connection.rb:71:in `call'
/opt/puppet/lib/gems/1.8/gems/rbvmomi-1.3.0/lib/rbvmomi/basic_types.rb:186:in `_call'
/opt/puppet/lib/gems/1.8/gems/rbvmomi-1.3.0/lib/rbvmomi/basic_types.rb:70:in `CloneVM_Task'
/opt/puppet/lib/gems/1.8/gems/fog-1.4.0/lib/fog/vsphere/requests/compute/vm_clone.rb:128:in `vm_clone'
/opt/puppet/lib/gems/1.8/gems/fog-1.4.0/lib/fog/vsphere/models/compute/server.rb:98:in `clone'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:76:in `create'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:221:in `call'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:221:in `do_in_progress_bar'
/opt/puppet/lib/ruby/1.8/timeout.rb:67:in `timeout'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:220:in `do_in_progress_bar'
/opt/puppet/lib/site_ruby/1.8/puppet/cloudpack/vmware.rb:74:in `create'
/opt/puppet/lib/site_ruby/1.8/puppet/face/node_vmware/create.rb:61:in `create implementation, required on Ruby 1.8'
/opt/puppet/lib/site_ruby/1.8/puppet/interface/action.rb+eval[wrapper]:207:in `__send__'
/opt/puppet/lib/site_ruby/1.8/puppet/interface/action.rb+eval[wrapper]:207:in `create'
/opt/puppet/lib/site_ruby/1.8/puppet/application/face_base.rb:242:in `send'
/opt/puppet/lib/site_ruby/1.8/puppet/application/face_base.rb:242:in `main'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:317:in `run_command'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:309:in `run'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:416:in `hook'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:309:in `run'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:407:in `exit_on_fail'
/opt/puppet/lib/site_ruby/1.8/puppet/application.rb:309:in `run'
/opt/puppet/lib/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute'
/opt/puppet/bin/puppet:4
err: NoPermission: Permission to perform this operation was denied.
err: Try 'puppet help node_vmware create' for usage

I REALLY hope it’s just me, but I’m able to use the other commands:

root@master:/etc/puppetlabs/puppet# puppet node_vmware list
notice: Connecting ...
notice: Connected to vsphere.dc1.puppetlabs.net as selabmco (API version 4.1)
notice: Finding all Virtual Machines ... (Started at 12:21:55 PM)
notice: Control will be returned to you in 10 minutes at 12:31 PM if locating is unfinished.
Locating:          100% |ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:09
notice: Complete

(SNIP)

/Datacenters/dc1/vm/templates/Ubuntu-Precise-gdl
  powerstate: poweredOff
  name:       Ubuntu-Precise-gdl
  hostname:   --------
  instanceid: 502171aa-d968-38a3-bc4b-a8e09c7f22ee
  ipaddress:  ---.---.---.---
  template:   true

#4 Updated by Reid Vandewiele over 1 year ago

I just spun up a virtualized ESXi hypervisor (5.0.0.update01-623860) and accompanying vSphere Server Appliance (5.0.0.5239-759855) to test the node_vmware face in a “vanilla” VMware environment and the verdict is: in a cleanroom with vSphere root credentials, the node_vmware face does work with vSphere 5. This seems to suggest that the problems we’re having using it on the production environment are related to access controls / role permissions. I will continue to investigate and will update when I figure out more.

Experiment

  1. Create a new VM to act as an ESXi host. I called mine /Datacenters/dc1/vm/SELab/vsphere/selabesxi1
  2. Deploy and set up an instance of the vSphere Server Appliance. I called mine /Datacenters/dc1/vm/SELab/vsphere/selabvsphere
  3. Create a new datacenter. I called mine saleseng
  4. Add the ESXi hypervisor to the new datacenter.
  5. Create a new x86 virtual machine
  6. Convert the new x86 vm to a template. For my purposes, I didn’t need an OS (yet) since I just wanted to see if node_vmware could clone it.
  7. Verify that with the root credentials for the new vSphere environment node_vmware can list, create and terminate instances

Notes

Versions:

  • rbvmomi => 1.5.1
  • fog => 1.5.0
  • cloud_provisioner_vmware => git, 6eaab647

Using rbvmomi 1.3.0 also works to an extent; it will work to list and create instances, but the terminate method will fail with

err: InvalidPowerState: The attempted operation cannot be performed in the current state (Powered off).
err: Try 'puppet help node_vmware terminate' for usage

#5 Updated by Charlie Sharpsteen 4 months ago

  • Project changed from Cloud-Provisioner to Puppet Enterprise (Public)

#6 Updated by Kenn Hussey 4 months ago

  • Category set to cloud provisioner

Also available in: Atom PDF