Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack trace on "vagrant up --provider=vsphere" #47

Closed
tehranian opened this issue Mar 20, 2014 · 15 comments · Fixed by #52
Closed

stack trace on "vagrant up --provider=vsphere" #47

tehranian opened this issue Mar 20, 2014 · 15 comments · Fixed by #52

Comments

@tehranian
Copy link

Hi there,

How can I figure out what the issue is here:

$ vagrant up --provider=vsphere
Bringing machine 'default' up with 'vsphere' provider...
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:in `connect'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:in `block in connect'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:in `connect'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:857:in `start'
/Users/tehranian/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/trivial_soap.rb:56:in `restart_http'
/Users/tehranian/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/trivial_soap.rb:20:in `initialize'
/Users/tehranian/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:31:in `initialize'
/Users/tehranian/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/vim.rb:36:in `new'
/Users/tehranian/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/vim.rb:36:in `connect'
/Users/tehranian/.vagrant.d/gems/gems/vagrant-vsphere-0.7.0/lib/vSphere/action/connect_vsphere.rb:15:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:147:in `action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'
No error message

It doesn't seem to be making any outbound http connection to vSphere, as the whole invocation fails within 1/2 second.

FWIW I'm running OS X Mavericks and am seeing this with Vagrant 1.4.3 and 1.5.1.

Thanks,
Dan

@tehranian
Copy link
Author

Hmmm, I get the same stack trace when I try this on an Ubuntu 12.04 LTS machine as my original OS X Mavericks machine.

@juliacollins
Copy link

Hi Dan,

Could you confirm that you're building the gem from the latest version (0.7.1)? It restricts the version of rbvmomi to 1.6.x and may solve your problem.

Julia

@tehranian
Copy link
Author

Hi Julia,

When I follow the plugin's installation instructions I get version 0.7.0 of the gem. Looking at the gem repo, I do not see a version 0.7.1 having been published yet. Ex:

$ vagrant plugin update vagrant-vsphere
Installing the 'vagrant-vsphere' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vsphere (0.7.0)'!

$ gem list vagrant-vsphere --remote --all
*** REMOTE GEMS ***
vagrant-vsphere (0.7.0, 0.6.0, 0.5.1, 0.5.0)

Are you saying I should clone the git repo and install the non-released 0.7.1?

Thanks,
Dan

@tehranian
Copy link
Author

FWIW the README.md says that 0.7.1 is available on RubyGems.org but when I go there I see 0.7.0: https://rubygems.org/gems/vagrant-vsphere

@flamingbear
Copy link
Member

Hi Dan,
I apologize for that, It's taking a little longer to get the rubygem pushed. I reached out to the original developer and had the wrong email address so getting a gem on RubyGems.org is taking just a bit longer than expected. I'm in touch with Andy and expect this to be remedied very shortly.

Thanks for your patience.
Matt

@flamingbear
Copy link
Member

Hi Dan,

And like that we're back. I think you should be able to pull the latest 0.7.1 version from rubygems.org now.

Cheers,
Matt

@tehranian
Copy link
Author

Thanks all. I was able to install "vagrant-vsphere-0.7.1" which depends on "rbvmomi-1.6.0". Unfortunately I'm still getting the same stack trace upon "vagrant up" on both OS X Mavericks and Ubuntu 12.04.

vagrant@my-vm:~$ v up --provider=vsphere 
Bringing machine 'default' up with 'vsphere' provider...
/opt/vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:in `connect'
/opt/vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:in `block in connect'
/opt/vagrant/embedded/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
/opt/vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:in `connect'
/opt/vagrant/embedded/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
/opt/vagrant/embedded/lib/ruby/2.0.0/net/http.rb:857:in `start'
/home/vagrant/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/trivial_soap.rb:56:in `restart_http'
/home/vagrant/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/trivial_soap.rb:20:in `initialize'
/home/vagrant/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/connection.rb:31:in `initialize'
/home/vagrant/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim.rb:34:in `new'
/home/vagrant/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim.rb:34:in `connect'
/home/vagrant/.vagrant.d/gems/gems/vagrant-vsphere-0.7.1/lib/vSphere/action/connect_vsphere.rb:15:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/machine.rb:157:in `action'
/opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/batch_action.rb:72:in `block (2 levels) in run'
No error message

@PierrePaul
Copy link

I've got the same issue as well. By adding a bit of debugging I got : VagrantPlugins::VSphere::Action::Clone::Error

Will try to find what's going on.

@PierrePaul
Copy link

For testing purposes I've put a vsphere.template_name = 'lorem ipsum' in my Vagrant file. Of course the template/vm 'lorem ipsum' doesn't exist and vagrant-vsphere was crashing. Maybe we should check if the template exists before doing... what exactly?

@sneal
Copy link

sneal commented Mar 28, 2014

running VAGRANT_LOG=debug vagrant up --provider=vsphere I see another error before this:

 INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::Clone:0x00000002f0b728>
ERROR warden: Error occurred: NoPermission: Permission to perform this operation was denied.
...
/home/teamcity/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/connection.rb:61:in `parse_response'
/home/teamcity/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/connection.rb:90:in `call'
/home/teamcity/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/basic_types.rb:203:in `_call'
/home/teamcity/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/basic_types.rb:74:in `block (2 levels) in init'
/home/teamcity/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim/Folder.rb:7:in `find'
/home/teamcity/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim/Folder.rb:83:in `traverse'
/home/teamcity/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim/ServiceInstance.rb:8:in `find_datacenter'
/home/teamcity/.vagrant.d/gems/gems/vagrant-vsphere-0.7.1/lib/vSphere/util/vim_helpers.rb:8:in `get_datacenter'
/home/teamcity/.vagrant.d/gems/gems/vagrant-vsphere-0.7.1/lib/vSphere/action/clone.rb:22:in `call'

The clone step is attempting to find my data center - which is failing. Using the same data center and user with knife vsphere works fine. Not sure what's going on.

@johnsmyth
Copy link

Did anyone find a resolution to this? I'm experiencing the exact same issue....

@PierrePaul
Copy link

@johnsmyth Are you sure your template has no typo and is accessible?

@johnsmyth
Copy link

I cut and pasted the template name into the vagrant file just to be 100% sure, and I can clone that VM running as the same vcenter user through the vsphere web client...

@johnsmyth
Copy link

FYI - my issue was permissions related. Though I had read on the QA datacenter, I needed read on ALL the data centers in order for vagrant-vsphere to work, even though i specified the QA data center in my vagrantfile.

@rbugajewski
Copy link

It looks like I have the same issue. When running vagrant up --provider=vsphere (0.8.2) I get the following output:

Bringing machine 'default' up with 'vsphere' provider...
/Users/rafael/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/connection.rb:61:in `parse_response'
/Users/rafael/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/connection.rb:90:in `call'
/Users/rafael/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/basic_types.rb:203:in `_call'
/Users/rafael/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/basic_types.rb:74:in `block (2 levels) in init'
/Users/rafael/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim/Folder.rb:7:in `find'
/Users/rafael/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim/Folder.rb:80:in `block in traverse'
/Users/rafael/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim/Folder.rb:79:in `each'
/Users/rafael/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim/Folder.rb:79:in `inject'
/Users/rafael/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim/Folder.rb:79:in `traverse'
/Users/rafael/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim/Datacenter.rb:14:in `find_vm'
/Users/rafael/.vagrant.d/gems/gems/vagrant-vsphere-0.8.2/lib/vSphere/action/clone.rb:23:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/call.rb:53:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
/Users/rafael/.vagrant.d/gems/gems/vagrant-vsphere-0.8.2/lib/vSphere/action/connect_vsphere.rb:19:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:196:in `action_raw'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:173:in `block in action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:434:in `lock'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
No error message

When outputting debug messages this also seems to be relevant:

 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 1 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x000001019c5c00>
 INFO warden: Calling IN action: #<Vagrant::Action::Builtin::ConfigValidate:0x000001041983e0>
 INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x000001041983b8>
 INFO warden: Calling IN action: #<Vagrant::Action::Builtin::Call:0x00000104198390>
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 1 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000102146920>
 INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::IsCreated:0x0000010215df30>
 INFO machine: Calling action: get_state on provider vSphere (new)
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 1 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x000001032b9298>
 INFO warden: Calling IN action: #<Vagrant::Action::Builtin::ConfigValidate:0x000001032e8b88>
 INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x000001032e8b38>
 INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::GetState:0x000001032e8ae8>
 INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::CloseVSphere:0x000001032e8a98>
 INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::CloseVSphere:0x000001032e8a98>
 INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::GetState:0x000001032e8ae8>
 INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x000001032e8b38>
 INFO warden: Calling OUT action: #<Vagrant::Action::Builtin::ConfigValidate:0x000001032e8b88>
 INFO machine: New machine ID: nil
 INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::IsCreated:0x0000010215df30>
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 1 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Warden:0x000001048f8dd8>
 INFO warden: Calling IN action: #<Proc:0x000001058c8678@/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:94 (lambda)>
 INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::Clone:0x000001048f8c70>
ERROR warden: Error occurred: NoPermission: Permission to perform this operation was denied.
 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.
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:0x00000104198390>
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.

My Vagrantfile looks like this:

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

  config.vm.provider :vsphere do |vsphere|
    vsphere.host = '10.123.123.123'
    vsphere.resource_pool_name = 'COMPANY-NAME-Production'
    vsphere.compute_resource_name = 'esxp-4101.DOMAIN.COM'
    vsphere.template_name = 'COMPANY-NAME/Test-Minimalmigration/lnxv-template-ubuntu'
    vsphere.name = 'lnxv-test-001'
    vsphere.user = 'pooladmin@OTHER-DOMAIN.local'
    vsphere.password = 'PASSWORD'
    vsphere.insecure = true
  end
end

The resource pool is also a cluster in my case. I’ve seen that there is a different (slightly outdated) branch that added some cluster improvements. I checked it out, but got the same error messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants