frapposelli / vagrant-vcenter

A Vagrant provider for VMware vCenter®
MIT License
106 stars 36 forks source link

vagrant-rbvmomi-1.8.1/lib/rbvmomi/connection.rb:61:in `parse_response': NoPermission: Permission to perform this operation was denied. (RbVmomi::Fault) #40

Closed asifiqbal closed 8 years ago

asifiqbal commented 8 years ago

EBUG cli: Invoking command class: VagrantPlugins::CommandUp::Command [] DEBUG command: 'Up' each target VM... INFO loader: Set :root = ["#Pathname:/home/iqbala/vagrant-vcenter/Vagrantfile"] DEBUG loader: Populating proc cache for #Pathname:/home/iqbala/vagrant-vcenter/Vagrantfile DEBUG loader: Load procs for pathname: /home/iqbala/vagrant-vcenter/Vagrantfile INFO loader: Loading configuration in order: [:home, :root] DEBUG loader: Loading from: root (evaluating) DEBUG loader: Configuration loaded successfully, finalizing and returning DEBUG push: finalizing INFO host: Autodetecting host type for [#<Vagrant::Environment: /home/iqbala/vagrant-vcenter>] DEBUG host: Trying: suse DEBUG host: Trying: slackware DEBUG host: Trying: gentoo DEBUG host: Trying: redhat DEBUG host: Trying: freebsd DEBUG host: Trying: darwin DEBUG host: Trying: arch DEBUG host: Trying: null DEBUG host: Trying: bsd DEBUG host: Trying: linux INFO host: Detected: linux! DEBUG host: Searching for cap: provider_install_vcenter DEBUG host: Checking in: linux DEBUG command: Getting target VMs for command. Arguments: DEBUG command: -- names: ["dca-webrt-02"] DEBUG command: -- options: {:provider=>nil} DEBUG command: Finding machine that match name: dca-webrt-02 INFO environment: Getting machine: dca-webrt-02 (vcenter) INFO environment: Uncached load of machine. INFO loader: Set "29932120_machine_dca-webrt-02" = ["[\"2\", #Proc:0x000000034dea38@/home/iqbala/vagrant-vcenter/Vagrantfile:24]"] DEBUG loader: Populating proc cache for ["2", #Proc:0x000000034dea38@/home/iqbala/vagrant-vcenter/Vagrantfile:24] INFO loader: Loading configuration in order: [:home, :root, "29932120_machine_dca-webrt-02"] DEBUG loader: Loading from: root (cache) DEBUG loader: Loading from: 29932120_machine_dca-webrt-02 (evaluating) DEBUG loader: Configuration loaded successfully, finalizing and returning DEBUG push: finalizing INFO box_collection: Box found: gosddc/precise32 (vmware_ovf) INFO environment: Running hook: authenticate_box_url INFO runner: Preparing hooks for middleware sequence... INFO runner: 3 hooks defined. INFO runner: Running action: authenticate_box_url #Vagrant::Action::Builder:0x0000000406f118 INFO warden: Calling IN action: #VagrantPlugins::LoginCommand::AddAuthentication:0x000000035b9390 DEBUG client: Using authentication token from disk at /home/iqbala/.vagrant.d/data/vagrant_login_token INFO warden: Calling OUT action: #VagrantPlugins::LoginCommand::AddAuthentication:0x000000035b9390 INFO loader: Set :"33686380_gosddc/precise32_vmware_ovf" = ["#Pathname:/home/iqbala/.vagrant.d/boxes/gosddc-VAGRANTSLASH-precise32/1.1.0/vmware_ovf/Vagrantfile"] DEBUG loader: Populating proc cache for #Pathname:/home/iqbala/.vagrant.d/boxes/gosddc-VAGRANTSLASH-precise32/1.1.0/vmware_ovf/Vagrantfile DEBUG loader: Load procs for pathname: /home/iqbala/.vagrant.d/boxes/gosddc-VAGRANTSLASH-precise32/1.1.0/vmware_ovf/Vagrantfile INFO loader: Loading configuration in order: [:"33686380_gosddc/precise32_vmware_ovf", :home, :root, "29932120_machine_dca-webrt-02"] DEBUG loader: Loading from: root (cache) DEBUG loader: Loading from: 29932120_machine_dca-webrt-02 (cache) DEBUG loader: Configuration loaded successfully, finalizing and returning DEBUG push: finalizing INFO machine: Initializing machine: dca-webrt-02 INFO machine: - Provider: VagrantPlugins::VCenter::Provider INFO machine: - Box: #Vagrant::Box:0x0000000354ef40 INFO machine: - Data dir: /home/iqbala/vagrant-vcenter/.vagrant/machines/dca-webrt-02/vcenter INFO machine: Calling action: read_state on provider vCenter (new) DEBUG environment: Attempting to acquire process-lock: machine-action-16e6e3833cba26c2a2c7f4bef6e5c58d DEBUG environment: Attempting to acquire process-lock: dotlock INFO environment: Acquired process lock: dotlock INFO environment: Released process lock: dotlock INFO environment: Acquired process lock: machine-action-16e6e3833cba26c2a2c7f4bef6e5c58d INFO interface: Machine: action ["read_state", "start", {:target=>:"dca-webrt-02"}] INFO runner: Preparing hooks for middleware sequence... INFO runner: 2 hooks defined. INFO runner: Running action: machine_action_read_state #Vagrant::Action::Builder:0x0000000317d808 INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x000000030ba970 INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::ConnectvCenter:0x000000030ba920 INFO connect_vCenter: Connecting to vCenter... DEBUG connect_vCenter: config.hostname: hlr-vctr-01.oss.centurylink.net DEBUG connect_vCenter: config.username: ctl-jpscript DEBUG connect_vCenter: config.password: INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::ReadState:0x00000002f40248 INFO read_state: VM is not created yet INFO warden: Calling OUT action: #VagrantPlugins::VCenter::Action::ReadState:0x00000002f40248 INFO warden: Calling OUT action: #VagrantPlugins::VCenter::Action::ConnectvCenter:0x000000030ba920 INFO warden: Calling OUT action: #Vagrant::Action::Builtin::ConfigValidate:0x000000030ba970 INFO interface: Machine: action ["read_state", "end", {:target=>:"dca-webrt-02"}] INFO environment: Released process lock: machine-action-16e6e3833cba26c2a2c7f4bef6e5c58d DEBUG environment: Attempting to acquire process-lock: dotlock INFO environment: Acquired process lock: dotlock INFO environment: Released process lock: dotlock INFO machine: New machine ID: nil INFO interface: Machine: metadata ["provider", :vcenter, {:target=>:"dca-webrt-02"}] INFO command: With machine: dca-webrt-02 (#<VagrantPlugins::VCenter::Provider:0x000000033c1498 @machine=#<Vagrant::Machine: dca-webrt-02 (VagrantPlugins::VCenter::Provider)>, @cap_logger=#<Log4r::Logger:0x000000033c0db8 @fullname="vagrant::capability_host::vagrantplugins::vcenter::provider", @outputters=[], @additive=true, @name="provider", @path="vagrant::capability_host::vagrantplugins::vcenter", @parent=#<Log4r::Logger:0x00000003d0dd80 @fullname="vagrant", @outputters=[#<Log4r::StderrOutputter:0x00000003be4b70 @mon_owner=nil, @mon_count=0, @mon_mutex=#, @name="stderr", @level=0, @formatter=#<Log4r::DefaultFormatter:0x00000003d31bb8 @depth=7>, @out=#IO:>], @additive=true, @name="vagrant", @path="", @parent=#<Log4r::RootLogger:0x00000003d0dc68 @level=0, @outputters=[]>, @level=1, @trace=false>, @level=1, @trace=false>, @cap_host_chain=[[:vcenter, #<#Class:0x000000033c1470:0x0000000339d778>]], @cap_args=[#<Vagrant::Machine: dca-webrt-02 (VagrantPlugins::VCenter::Provider)>], @cap_caps={:hyperv=>#<Vagrant::Registry:0x000000033c1330 @items={:public_address=>#Proc:0x00000003ff6bf0@/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/hyperv/plugin.rb:25}, @results_cache={}>, :virtualbox=>#<Vagrant::Registry:0x000000033c1290 @items={:forwarded_ports=>#Proc:0x00000004003b48@/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/plugin.rb:27, :nic_mac_addresses=>#Proc:0x00000004003aa8@/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/plugin.rb:32, :public_address=>#Proc:0x0000000394a4f0@/opt/vagrant/embedded/gems/gems/vagrant-share-1.1.5/lib/vagrant-share.rb:39, :snapshot_list=>#Proc:0x00000004003a58@/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/plugin.rb:42}, @results_cache={}>, :docker=>#<Vagrant::Registry:0x000000033c11f0 @items={:public_address=>#Proc:0x0000000400f448@/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/plugin.rb:54, :proxy_machine=>#Proc:0x0000000400f358@/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/plugin.rb:59}, @results_cache={}>, :vsphere=>#<Vagrant::Registry:0x000000033c1128 @items={:public_address=>#Proc:0x000000039416e8@/home/iqbala/.vagrant.d/gems/gems/vagrant-vsphere-1.7.1/lib/vSphere/plugin.rb:33}, @results_cache={}>, :libvirt=>#<Vagrant::Registry:0x000000033c1088 @items={:nic_mac_addresses=>#Proc:0x00000003934970@/home/iqbala/.vagrant.d/gems/gems/vagrant-libvirt-0.0.33/lib/vagrant-libvirt/plugin.rb:44}, @results_cache={}>, :vmware_appcatalyst=>#<Vagrant::Registry:0x000000033c0fe8 @items={:public_address=>#Proc:0x0000000366c378@/home/iqbala/.vagrant.d/gems/gems/vagrant-vmware-appcatalyst-1.1.1/lib/vagrant-vmware-appcatalyst/plugin.rb:50}, @results_cache={}>, :vcenter=>#<Vagrant::Registry:0x000000033c0f48 @items={:public_address=>#Proc:0x00000003614d30@/home/iqbala/.vagrant.d/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/plugin.rb:35, :read_winrm_info=>#Proc:0x00000003614c90@/home/iqbala/.vagrant.d/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/plugin.rb:40, :rdp_info=>#Proc:0x00000003614c68@/home/iqbala/.vagrant.d/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/plugin.rb:45}, @results_cache={}>}>) INFO interface: info: Bringing machine 'dca-webrt-02' up with 'vcenter' provider... Bringing machine 'dca-webrt-02' up with 'vcenter' provider... INFO machine: Calling action: read_state on provider vCenter (new) DEBUG environment: Attempting to acquire process-lock: machine-action-16e6e3833cba26c2a2c7f4bef6e5c58d DEBUG environment: Attempting to acquire process-lock: dotlock INFO environment: Acquired process lock: dotlock INFO environment: Released process lock: dotlock INFO environment: Acquired process lock: machine-action-16e6e3833cba26c2a2c7f4bef6e5c58d INFO interface: Machine: action ["read_state", "start", {:target=>:"dca-webrt-02"}] INFO runner: Preparing hooks for middleware sequence... INFO runner: 2 hooks defined. INFO runner: Running action: machine_action_read_state #Vagrant::Action::Builder:0x00000002749738 INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x0000000273b7a0 INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::ConnectvCenter:0x0000000273b778 INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::ReadState:0x00000002624998 INFO read_state: VM is not created yet INFO warden: Calling OUT action: #VagrantPlugins::VCenter::Action::ReadState:0x00000002624998 INFO warden: Calling OUT action: #VagrantPlugins::VCenter::Action::ConnectvCenter:0x0000000273b778 INFO warden: Calling OUT action: #Vagrant::Action::Builtin::ConfigValidate:0x0000000273b7a0 INFO interface: Machine: action ["read_state", "end", {:target=>:"dca-webrt-02"}] INFO environment: Released process lock: machine-action-16e6e3833cba26c2a2c7f4bef6e5c58d DEBUG environment: Attempting to acquire process-lock: dotlock INFO environment: Acquired process lock: dotlock INFO environment: Released process lock: dotlock INFO batch_action: Enabling parallelization by default. INFO batch_action: Disabling parallelization because only executing one action INFO batch_action: Batch action will parallelize: false INFO batch_action: Starting action: #Vagrant::Machine:0x00000003409400 up {:destroy_on_error=>true, :install_provider=>true, :parallel=>true, :provision_ignore_sentinel=>false, :provision_types=>nil} INFO machine: Calling action: up on provider vCenter (new) DEBUG environment: Attempting to acquire process-lock: machine-action-16e6e3833cba26c2a2c7f4bef6e5c58d DEBUG environment: Attempting to acquire process-lock: dotlock INFO environment: Acquired process lock: dotlock INFO environment: Released process lock: dotlock INFO environment: Acquired process lock: machine-action-16e6e3833cba26c2a2c7f4bef6e5c58d INFO interface: Machine: action ["up", "start", {:target=>:"dca-webrt-02"}] INFO runner: Preparing hooks for middleware sequence... INFO runner: 2 hooks defined. INFO runner: Running action: machine_action_up #Vagrant::Action::Builder:0x0000000248c360 INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x00000003ece2f0 INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::ConnectvCenter:0x00000003ece2a0 INFO warden: Calling IN action: #Vagrant::Action::Builtin::Call:0x000000043baac0 INFO runner: Preparing hooks for middleware sequence... INFO runner: 2 hooks defined. INFO runner: Running action: machine_action_up #Vagrant::Action::Builder:0x00000003b72098 INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::IsCreated:0x00000003b3b6d8 WARN is_created: VM has not been created INFO warden: Calling OUT action: #VagrantPlugins::VCenter::Action::IsCreated:0x00000003b3b6d8 INFO runner: Preparing hooks for middleware sequence... INFO runner: 2 hooks defined. INFO runner: Running action: machine_action_up #Vagrant::Action::Warden:0x00000003916d58 INFO warden: Calling IN action: #<Proc:0x000000035c3e30@/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:94 (lambda)> INFO warden: Calling IN action: #Vagrant::Action::Builtin::HandleBox:0x00000003916c18 INFO handle_box: Machine already has box. HandleBox will not run. INFO warden: Calling IN action: #<Proc:0x000000036d1318@/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:94 (lambda)> INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::InventoryCheck:0x000000043ba9f8 DEBUG inventory_check: This is the box we're looking for: gosddc-precise32 DEBUG inventory_check: Sleeping 1.2994294229018908 to avoid race conditions. INFO interface: info: Uploading [gosddc-precise32]... INFO interface: info: ==> dca-webrt-02: Uploading [gosddc-precise32]... ==> dca-webrt-02: Uploading [gosddc-precise32]... DEBUG inventory_check: OVF File: file:///home/iqbala/.vagrant.d/boxes/gosddc-VAGRANTSLASH-precise32/1.1.0/vmware_ovf/precise32.ovf INFO interface: info: Adding [gosddc-precise32] INFO interface: info: ==> dca-webrt-02: Adding [gosddc-precise32] ==> dca-webrt-02: Adding [gosddc-precise32] 2016-03-31 14:42:10 -0400: networks: nat = AppMgt 2016-03-31 14:42:10 -0400: Uploading OVF to example.net... DEBUG: Timeout: 300 Iteration 1: Trying to get host's IP address ... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 652M 100 652M 0 0 2237k 0 0:04:58 0:04:58 --:--:-- 2311k Iteration 1: Trying to access nfcLease.info.entity ... HttpNfcLeaseComplete succeeded ERROR warden: Error occurred: NoPermission: Permission to perform this operation was denied. INFO warden: Beginning recovery process... INFO warden: Calling recover: #Vagrant::Action::Builtin::Call:0x000000043baac0 INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Recovery complete. ERROR warden: Error occurred: NoPermission: Permission to perform this operation was denied. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: NoPermission: Permission to perform this operation was denied. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO environment: Released process lock: machine-action-16e6e3833cba26c2a2c7f4bef6e5c58d INFO environment: Running hook: environment_unload INFO runner: Preparing hooks for middleware sequence... INFO runner: 2 hooks defined. INFO runner: Running action: environment_unload #Vagrant::Action::Builder:0x007f97d114eab8 /home/iqbala/.vagrant.d/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/connection.rb:61:in parse_response': NoPermission: Permission to perform this operation was denied. (RbVmomi::Fault) from /home/iqbala/.vagrant.d/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/connection.rb:90:incall' from /home/iqbala/.vagrant.d/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/basic_types.rb:205:in _call' from /home/iqbala/.vagrant.d/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/basic_types.rb:74:inblock (2 levels) in init' from /home/iqbala/.vagrant.d/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/utils/deploy.rb:203:in block in upload_ovf_as_template' from /home/iqbala/.vagrant.d/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/utils/deploy.rb:66:in_run_without_interruptions' from /home/iqbala/.vagrant.d/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/utils/deploy.rb:168:in upload_ovf_as_template' from /home/iqbala/.vagrant.d/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/action/inventory_check.rb:82:invcenter_upload_box' from /home/iqbala/.vagrant.d/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/action/inventory_check.rb:122:in `vcenter_check_inventory'

MichaelPereira commented 8 years ago

@asifiqbal I had similar errors that were fixed by upgrading the access level of the account used to connect to vcenter. You should check with your sysadmin or the person in charge of your local vcenter.

asifiqbal commented 8 years ago

when I ran vagrant up .. I did not pick any username. I have a username that has full admin privilege. Where I define the user name in Vagrantfile ?

MichaelPereira commented 8 years ago

You should have the following section in your VagrantFile to define all the require parameters:

Vagrant.configure(2) do |config|

  nodes.each do |node|

    config.vm.provider :vcenter do |vcenter|
      vcenter.hostname = ''
      vcenter.username = ''
      vcenter.password = ''
      vcenter.folder_name = ''
      vcenter.template_folder_name = ''
      vcenter.datacenter_name = ''
      vcenter.computer_name = ''
      vcenter.datastore_name = '
      vcenter.network_name = ''
      vcenter.resourcepool_name = ''
asifiqbal commented 8 years ago

sweet! it worked! How do I change the vm name from Vagrant-long-name..... to hostname?

MichaelPereira commented 8 years ago

I am having the same issue and I'm still looking how to configure it. In the mean time you should close this issue as the original problem is now resolved.