nsidc / vagrant-vsphere

VMware vSphere provider for Vagrant
Other
607 stars 166 forks source link

Undefined namespace prefix: //soapenv:Body/* #106

Open nabello opened 10 years ago

nabello commented 10 years ago

My VM is correctly cloned in my vsphere infrastructure after a 'vagrant up --debug --provider=vsphere' however I'm left with the following error:

ERROR warden: Error occurred: Undefined namespace prefix: //soapenv:Body/ INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: Undefined namespace prefix: //soapenv:Body/ INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: Undefined namespace prefix: //soapenv:Body/ INFO warden: Beginning recovery process... INFO warden: Calling recover: #Vagrant::Action::Builtin::Call:0x000001028c6a38 INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Recovery complete. ERROR warden: Error occurred: Undefined namespace prefix: //soapenv:Body/ 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 warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO environment: Released process lock: machine-action-a5f8f05af32062e6f04c680ec9e775b1 INFO environment: Running hook: environment_unload INFO runner: Preparing hooks for middleware sequence... INFO runner: 3 hooks defined. INFO runner: Running action: #Vagrant::Action::Builder:0x000001029bfa70 ERROR vagrant: Vagrant experienced an error! Details: ERROR vagrant: # ERROR vagrant: Undefined namespace prefix: //soapenv:Body/ ERROR vagrant: /Users/kevinmitchell/.vagrant.d/gems/gems/vagrant-vsphere-0.16.0/lib/vSphere/action/connect_vsphere.rb:23:in rescue in call' /Users/kevinmitchell/.vagrant.d/gems/gems/vagrant-vsphere-0.16.0/lib/vSphere/action/connect_vsphere.rb:14:incall' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/config_validate.rb:25:incall' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in call' /Users/kevinmitchell/.vagrant.d/gems/gems/vagrant-berkshelf-3.0.1/lib/berkshelf/vagrant/action/configure_chef.rb:13:incall' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in call' /Users/kevinmitchell/.vagrant.d/gems/gems/vagrant-berkshelf-3.0.1/lib/berkshelf/vagrant/action/load_shelf.rb:13:incall' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/env_set.rb:19:incall' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/handle_box.rb:56:incall' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builder.rb:116:incall' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/runner.rb:66:in block in run' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/util/busy.rb:19:inbusy' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/runner.rb:66:in run' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:196:inaction_raw' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:173:in block in action' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:474:inlock' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:161:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:161:inaction' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run' INFO interface: error: Undefined namespace prefix: //soapenv:Body/ Undefined namespace prefix: //soapenv:Body/ INFO interface: Machine: error-exit ["VagrantPlugins::VSphere::Errors::VSphereError", "Undefined namespace prefix: //soapenv:Body/"]

Anyone have an idea what this is all about ? (Undefined namespace prefix: //soapenv:Body/*)

Thanks, Nicola

alexis-gruet-deel commented 9 years ago

the same for me, Did you fixed your issue ? BTW could you tell me which version of ESX you use ? this your IaaS platform or through a provider such as rackspace or other ?

Thanks

motarski commented 9 years ago

Any news on this guys, I ended up with the same thing.. VM is correctly deployed but vagrant throws Undefined namespace prefix: //soapenv:Body/* ... Any Solutions?

jwbraucher commented 9 years ago

This may be a problem with the rubygem that provides the vSphere connectivity for this plugin, rbvmomi. See https://github.com/vmware/rbvmomi/issues/67.

Try setting "vsphere.insecure = true" in your Vagrantfile, and let us know if that fixes the problem.

motarski commented 9 years ago

Thanks for trying to help @jwbraucher I appreciate it unfortunately that setting in my Vagrantfile didn't work for me. I have tried different templates and I am still having the error after 3-4 minutes after fire, vagrant breaks, but cloning continues on vmware. I am using dummy box and template is on the host. Now I didn't timed, but I bet it breaks on same time after fire on both templates. It's like it is timeouting something, and the error pops... Don't know, I am stuck

jwbraucher commented 9 years ago

OK, I think we need more information to help figure out what's happening. What version of vCenter are you using? Can you post your Vagrantfile and the full debug output?

motarski commented 9 years ago

Thank you again for trying to help. Ok, for the info required. The Vmware Vcenter Server version is 5.1.0 Build 1123961 it's Enterprise Plus license. The Vagrant version installed on my workstation box (Ubuntu 15.04) is Vagrant 1.7.4. This is vagrant File ...(I will leave out the host ip and credentials for the obvious reasons)

VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "dummy" config.vm.box_url = "dummybox_data/dummy.box"

config.vm.provider :vsphere do |vsphere|
vsphere.host = 'datacentar_addr'
vsphere.compute_resource_name = 'Cluster1'
vsphere.template_name = '/Templates/Linux/Debian8_80GB'
vsphere.vm_base_path = '/Boxes/Linux/'
vsphere.name = 'debvag01'
vsphere.user = 'user'
vsphere.password = 'password'

end end

And finally this is the log generated with VAGRANT_LOG=debug vagrant up --provider=vsphere

==> default: Calling vSphere CloneVM with the following settings: INFO interface: info: -- Template VM: /Templates/Linux/Debian8_80GB INFO interface: info: ==> default: -- Template VM: /Templates/Linux/Debian8_80GB ==> default: -- Template VM: /Templates/Linux/Debian8_80GB INFO interface: info: -- Target VM: /Boxes/Linux/debvag01 INFO interface: info: ==> default: -- Target VM: /Boxes/Linux/debvag01 ==> default: -- Target VM: /Boxes/Linux/debvag01 ERROR warden: Error occurred: Undefined namespace prefix: //soapenv:Body/ INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: Undefined namespace prefix: //soapenv:Body/ INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: Undefined namespace prefix: //soapenv:Body/ INFO warden: Beginning recovery process... INFO warden: Calling recover: #Vagrant::Action::Builtin::Call:0x000000025affa8 INFO warden: Beginning recovery process... INFO warden: Recovery complete. 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-213810f8418d2f8be4ef88ce4297030d INFO environment: Running hook: environment_unload INFO runner: Preparing hooks for middleware sequence... INFO runner: 1 hooks defined. INFO runner: Running action: environment_unload #Vagrant::Action::Builder:0x000000039ccdb0 ERROR vagrant: Vagrant experienced an error! Details: ERROR vagrant: #<VagrantPlugins::VSphere::Errors::VSphereError: Undefined namespace prefix: //soapenv:Body/> ERROR vagrant: Undefined namespace prefix: //soapenv:Body/ ERROR vagrant: /home/ivan/.vagrant.d/gems/gems/vagrant-vsphere-1.5.0/lib/vSphere/action/clone.rb:88:in rescue in call' /home/ivan/.vagrant.d/gems/gems/vagrant-vsphere-1.5.0/lib/vSphere/action/clone.rb:28:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:inblock in finalize_action' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:inblock in run' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in busy' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:inrun' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/call.rb:53:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:incall' /home/ivan/.vagrant.d/gems/gems/vagrant-vsphere-1.5.0/lib/vSphere/action/connect_vsphere.rb:19:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/config_validate.rb:25:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/handle_box.rb:56:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:inblock in run' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in busy' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:inrun' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:214:in action_raw' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:191:inblock in action' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:516:in lock' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:in action' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/batch_action.rb:82:inblock (2 levels) in run' INFO interface: error: Undefined namespace prefix: //soapenv:Body/ Undefined namespace prefix: //soapenv:Body/ INFO interface: Machine: error-exit ["VagrantPlugins::VSphere::Errors::VSphereError", "Undefined namespace prefix: //soapenv:Body/"]

Once again, thank you for trying to help.

jwbraucher commented 9 years ago

I'm glad to help. If this is actually a bug, I'd like to find the cause and hopefully help get it fixed.

It's interesting that the CloneVM operation is still being initiated even with these error messages. That says to me that you are mostly configured correctly. I wonder if this might be a permissions problem, though I would expect to see a more informative error message if that were the case. You might be able to find more information in your vCenter server logs, though it can sometimes be difficult to find those. Double-check the permissions you have granted to the vsphere account that you have in your Vagrantfile.

Here are the vCenter permissions that we are using in our environment (you may not need all of these depending on the features you are using in your environment) : Datastore -> Allocate space Global -> Set custom attribute Network -> Assign network Resource -> Assign virtual machine To resource pool Virtual Machine -> Configuration -> Add new disk Virtual Machine -> Configuration -> Change CPU count Virtual Machine -> Configuration -> Change resource Virtual Machine -> Configuration -> Memory Virtual Machine -> Configuration -> Modify device settings Virtual Machine -> Configuration -> Settings Virtual Machine -> Interaction -> Device connection Virtual Machine -> Interaction -> Power Off Virtual Machine -> Interaction -> Power On Virtual Machine -> Interaction -> Reset Virtual Machine -> Inventory -> Create from existing Virtual Machine -> Inventory -> Create new Virtual Machine -> Inventory -> Remove Virtual Machine -> Provisioning -> Customize Virtual Machine -> Provisioning -> Deploy template Virtual Machine -> Provisioning -> Read customization specifications

motarski commented 9 years ago

You just might be right. All this could be permission related. Since I am 'renting' the Cloud from a provider I do not have full Administrator privileges and permissions. I am assigned in a role of Data center and Network Administrator, and as such I can:

Datacenter Administrator Perform actions on global items, folders, datacenters, datastores, hosts, virtual machines, resources, and alarms. Set up datacenters, but with limited ability to interact with virtual machines. This includes: • All privileges for folder, datacenter, datastore, network, resource, alarms, and scheduled task privileges groups. • Selected privileges for global items, host, and virtual machine privileges groups. • No privileges for session, performance, and permission privileges groups.

Since I have no access for sessions, and permission privileges groups, I couldn't know the exact permission assigned to me, as well I don't have access to the logs. So, that's that. Dead end for me.

Since I said that even if Vagrant breaks, the machine continue and finishes with cloning from template on the Vsphere, I wonder what will happen when I run vagrant provision after the VM finishes with deploy.

I will test that, and write of results.

abondis commented 8 years ago

@motarski did you have any chance figuring out the problem ? is this permissions or something else ?

abondis commented 8 years ago

Maybe it can help, I've been able to use https://gist.github.com/rubiojr/1195252 without issue. I finally got figured out my problem. The library sends a 'WaitForUpdates' request. The proxy on the provider side has a 5 minutes timeout and cloning takes more then that. In the end, their proxy returns a 502 error. Adding debug: true to the connect call allowed me to identify this issue.

otwieracz commented 7 years ago

Were you able to resolve this issue? I am unable to use vsphere because of that.