xapi-project / vagrant-xenserver

A Vagrant provider for XenServer
MIT License
120 stars 31 forks source link

Plugin fails on OSX: `conv2value': Wrong type NilClass. #41

Open wkoszek opened 7 years ago

wkoszek commented 7 years ago

To even get to this point, I had to patch vagrant-server with this: https://github.com/jonludlam/vagrant-xenserver/pull/40 (I hot patched it after vagrant plugin...: just went and edited ~/.vagrant.d/...)

Afterwards I'm getting this

vagrant up --provider=xenserver
Bringing machine 'default' up with 'xenserver' provider...
1+0 records in
1+0 records out
1048576 bytes transferred in 0.006864 secs (152762991 bytes/sec)
/opt/vagrant/embedded/lib/ruby/2.2.0/xmlrpc/create.rb:202:in `conv2value': Wrong type NilClass. Not allowed! (RuntimeError)
    from /opt/vagrant/embedded/lib/ruby/2.2.0/xmlrpc/create.rb:226:in `block in conv2value'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/xmlrpc/create.rb:223:in `each'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/xmlrpc/create.rb:223:in `collect'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/xmlrpc/create.rb:223:in `conv2value'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/xmlrpc/create.rb:118:in `block in methodCall'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/xmlrpc/create.rb:117:in `collect'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/xmlrpc/create.rb:117:in `methodCall'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/xmlrpc/client.rb:285:in `call2'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/xmlrpc/client.rb:267:in `call'
    from /Users/wk/.vagrant.d/gems/gems/xenapi-0.2.11/lib/xenapi/client.rb:245:in `_do_call'
    from /Users/wk/.vagrant.d/gems/gems/xenapi-0.2.11/lib/xenapi/client.rb:180:in `_call'
    from /Users/wk/.vagrant.d/gems/gems/xenapi-0.2.11/lib/xenapi/dispatcher.rb:45:in `method_missing'
    from /Users/wk/.vagrant.d/gems/gems/vagrant-xenserver-0.0.12/lib/vagrant-xenserver/action/create_vifs.rb:30:in `create_vif'
    from /Users/wk/.vagrant.d/gems/gems/vagrant-xenserver-0.0.12/lib/vagrant-xenserver/action/create_vifs.rb:65:in `block in call'
    from /Users/wk/.vagrant.d/gems/gems/vagrant-xenserver-0.0.12/lib/vagrant-xenserver/action/create_vifs.rb:55:in `each'
    from /Users/wk/.vagrant.d/gems/gems/vagrant-xenserver-0.0.12/lib/vagrant-xenserver/action/create_vifs.rb:55:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/wk/.vagrant.d/gems/gems/vagrant-xenserver-0.0.12/lib/vagrant-xenserver/action/set_vm_params.rb:23:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/wk/.vagrant.d/gems/gems/vagrant-xenserver-0.0.12/lib/vagrant-xenserver/action/clone_vm.rb:30:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/wk/.vagrant.d/gems/gems/vagrant-xenserver-0.0.12/lib/vagrant-xenserver/action/create_template.rb:81:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/wk/.vagrant.d/gems/gems/vagrant-xenserver-0.0.12/lib/vagrant-xenserver/action/download_xva.rb:91:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/wk/.vagrant.d/gems/gems/vagrant-xenserver-0.0.12/lib/vagrant-xenserver/action/upload_xva.rb:93:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/wk/.vagrant.d/gems/gems/vagrant-xenserver-0.0.12/lib/vagrant-xenserver/action/upload_vhd.rb:163:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/wk/.vagrant.d/gems/gems/vagrant-xenserver-0.0.12/lib/vagrant-xenserver/action/connect_xs.rb:36:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/machine.rb:225:in `action_raw'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/machine.rb:200:in `block in action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/environment.rb:561:in `lock'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/machine.rb:186:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/machine.rb:186:in `action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

This is with a config like this:

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "ubuntu"

  config.vm.provider :xenserver do |xs|
#    xs.xs_use_ssl = true
    xs.xs_host = "host"
#    xs.xs_port = 443
    xs.xs_username = "root"
    xs.xs_password = 'mypassword'
    xs.pv = true
    xs.memory = 512
    xs.use_himn = false
  end
  config.vm.network "public_network", bridge: "xenbr0"
end
soakes commented 7 years ago

Hi there, only just noticed after going though all the issues here that you have the same issue as me. Have you managed to resolve this? or get a little closer to a conclusion?

Tiki10 commented 5 years ago

Hello,

Same issue here with a Debian 9 as vagrant host.

Tiki10 commented 5 years ago

I think it's still because of the pool. It's annoying

kn0rki commented 4 years ago

mid 2020 - still not working. Same error with xmlrpc version 0.3.0