Hello Chefs! I hope one of you might have a little experience with the knife
vsphere plugin. It would be sooooooo cool to make this work in our environment
and make my bosses happy so they will pay me more money
So, the problem is: even though I have full admin privileges on the Datacenter
I’m trying to deploy to, when I run ‘knife vsphere vm list’, I get the
ERROR: RbVmomi::Fault: NoPermission: Permission to perform this operation was
full stack trace:
DEBUG: Using configuration from /home/miles/.chef/knife.rb
parse_response': NoPermission: Permission to perform this operation was denied. (RbVmomi::Fault) from /home/miles/.rvm/gems/ruby-1.9.2-p318/gems/rbvmomi-1.2.3/lib/rbvmomi/connection.rb:71:incall’
_call' from /home/miles/.rvm/gems/ruby-1.9.2-p318/gems/rbvmomi-1.2.3/lib/rbvmomi/basic_types.rb:70:inblock (2 levels) in init’
find' from /home/miles/.rvm/gems/ruby-1.9.2-p318/gems/rbvmomi-1.2.3/lib/rbvmomi/vim/Folder.rb:83:intraverse’
find_datacenter' from /home/miles/.rvm/gems/ruby-1.9.2-p318/gems/knife-vsphere-0.1.6/lib/chef/knife/BaseVsphereCommand.rb:101:infind_folder’
run' from /home/miles/.rvm/gems/ruby-1.9.2-p318/gems/chef-0.10.8/lib/chef/knife.rb:391:inrun_with_pretty_exceptions’
run' from /home/miles/.rvm/gems/ruby-1.9.2-p318/gems/chef-0.10.8/lib/chef/application/knife.rb:128:inrun’
<top (required)>' from /home/miles/.rvm/gems/ruby-1.9.2-p318/bin/knife:19:inload’
from /home/miles/.rvm/gems/ruby-1.9.2-p318/bin/knife:19:in `’
My knife.rb vsphere values:
knife[:vsphere_host] = "10.10.0.4"
knife[:vsphere_user] = "miles"
knife[:vsphere_pass] = "foo"
knife[:vsphere_dc] = “Labs”
If I comment out the vsphere_dc option in my knife.rb and run knife vsphere vm
list again, it works, but selects the first datacenter it finds on the
vsphere host, which of course is not the datacenter I want. If I enable
vsphere_dc again and use a random value, it comes back with the same permission
denied error, which leads me to believe that vsphere_dc should be in some
format that’s not obvious.
I have installed rvc and am able to connect to my vcenter server and list
datacenters, which appear named exactly as I have specified in knife.rb. Don’t
know if this applicable or not.
That’s where I’m stuck. Any help is appreciated. BTW I’m chef v0.10.8. Let me
know if you guys need any additional info.