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

[Issue] vagrant up --provider=xenserver #48

Open
soakes opened this issue Aug 27, 2017 · 1 comment
Open

[Issue] vagrant up --provider=xenserver #48

soakes opened this issue Aug 27, 2017 · 1 comment

Comments

@soakes
Copy link

soakes commented Aug 27, 2017

Hi Guys,

I am using a MacBook running MacOS Sierra 10.12.6 using brew.

I have installed vagrant as per instructions on their website and it works with my local virtualbox instance but now I am trying to get it now to spin up a VM on a remote xenserver which has been converted from VirtualBox to Xen but every time I run it, I get the following error.

Error

$ vagrant up --provider=xenserver
Bringing machine 'default' up with 'xenserver' provider...
/opt/vagrant/embedded/lib/ruby/2.3.0/xmlrpc/create.rb:203:in `conv2value': Wrong type NilClass. Not allowed! (RuntimeError)
	from /opt/vagrant/embedded/lib/ruby/2.3.0/xmlrpc/create.rb:227:in `block in conv2value'
	from /opt/vagrant/embedded/lib/ruby/2.3.0/xmlrpc/create.rb:224:in `each'
	from /opt/vagrant/embedded/lib/ruby/2.3.0/xmlrpc/create.rb:224:in `collect'
	from /opt/vagrant/embedded/lib/ruby/2.3.0/xmlrpc/create.rb:224:in `conv2value'
	from /opt/vagrant/embedded/lib/ruby/2.3.0/xmlrpc/create.rb:119:in `block in methodCall'
	from /opt/vagrant/embedded/lib/ruby/2.3.0/xmlrpc/create.rb:118:in `collect'
	from /opt/vagrant/embedded/lib/ruby/2.3.0/xmlrpc/create.rb:118:in `methodCall'
	from /opt/vagrant/embedded/lib/ruby/2.3.0/xmlrpc/client.rb:286:in `call2'
	from /opt/vagrant/embedded/lib/ruby/2.3.0/xmlrpc/client.rb:268:in `call'
	from /Users/simon.oakes/.vagrant.d/gems/2.3.4/gems/xenapi-0.2.11/lib/xenapi/client.rb:245:in `_do_call'
	from /Users/simon.oakes/.vagrant.d/gems/2.3.4/gems/xenapi-0.2.11/lib/xenapi/client.rb:180:in `_call'
	from /Users/simon.oakes/.vagrant.d/gems/2.3.4/gems/xenapi-0.2.11/lib/xenapi/dispatcher.rb:45:in `method_missing'
	from /Users/simon.oakes/.vagrant.d/gems/2.3.4/gems/vagrant-xenserver-0.0.14/lib/vagrant-xenserver/action/create_template.rb:57:in `block in call'
	from /Users/simon.oakes/.vagrant.d/gems/2.3.4/gems/vagrant-xenserver-0.0.14/lib/vagrant-xenserver/action/create_template.rb:27:in `synchronize'
	from /Users/simon.oakes/.vagrant.d/gems/2.3.4/gems/vagrant-xenserver-0.0.14/lib/vagrant-xenserver/action/create_template.rb:27:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/warden.rb:34:in `call'
	from /Users/simon.oakes/.vagrant.d/gems/2.3.4/gems/vagrant-xenserver-0.0.14/lib/vagrant-xenserver/action/download_xva.rb:96:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/warden.rb:34:in `call'
	from /Users/simon.oakes/.vagrant.d/gems/2.3.4/gems/vagrant-xenserver-0.0.14/lib/vagrant-xenserver/action/upload_xva.rb:95:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/warden.rb:34:in `call'
	from /Users/simon.oakes/.vagrant.d/gems/2.3.4/gems/vagrant-xenserver-0.0.14/lib/vagrant-xenserver/action/upload_vhd.rb:159:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/warden.rb:34:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/warden.rb:34:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/builder.rb:116:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/runner.rb:66:in `block in run'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/util/busy.rb:19:in `busy'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/runner.rb:66:in `run'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/builtin/call.rb:53:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/warden.rb:34:in `call'
	from /Users/simon.oakes/.vagrant.d/gems/2.3.4/gems/vagrant-xenserver-0.0.14/lib/vagrant-xenserver/action/connect_xs.rb:42:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/warden.rb:34:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/warden.rb:34:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/warden.rb:34:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/builder.rb:116:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/runner.rb:66:in `block in run'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/util/busy.rb:19:in `busy'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/runner.rb:66:in `run'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/machine.rb:227:in `action_raw'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/machine.rb:202:in `block in action'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/environment.rb:631:in `lock'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/machine.rb:188:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/machine.rb:188:in `action'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

Does anyone have an idea. There doesn't seem to be any logs so I am at a loss of trying to figure this out.

I am also including my Vagrant file in case ive made some silly issue in here which I dont think I have.

Vagrantfile

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

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.

  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://vagrantcloud.com/search.
  config.vm.box = "xenserver-devvm"

  # Disable automatic box update checking. If you disable this, then
  # boxes will only be checked for updates when the user runs
  # `vagrant box outdated`. This is not recommended.
  # config.vm.box_check_update = false

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,
  # accessing "localhost:8080" will access port 80 on the guest machine.
  # NOTE: This will enable public access to the opened port
  # config.vm.network "forwarded_port", guest: 80, host: 8080

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine and only allow access
  # via 127.0.0.1 to disable public access
  # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"

  # Create a private network, which allows host-only access to the machine
  # using a specific IP.
  # config.vm.network "private_network", ip: "192.168.33.10"

  # Create a public network, which generally matched to bridged network.
  # Bridged networks make the machine appear as another physical device on
  # your network.
  # config.vm.network "public_network"

  # Share an additional folder to the guest VM. The first argument is
  # the path on the host to the actual folder. The second argument is
  # the path on the guest to mount the folder. And the optional third
  # argument is a set of non-required options.
  # config.vm.synced_folder "../data", "/vagrant_data"

  # Provider-specific configuration so you can fine-tune various
  # backing providers for Vagrant. These expose provider-specific options.
  # Example for VirtualBox:
  #
  # config.vm.provider "virtualbox" do |vb|
  #   # Display the VirtualBox GUI when booting the machine
  #   vb.gui = true
  #
  #   # Customize the amount of memory on the VM:
  #   vb.memory = "1024"
  # end
  #
  # View the documentation for the provider you are using for more
  # information on available options.

  # Enable provisioning with a shell script. Additional provisioners such as
  # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
  # documentation for more information about their specific syntax and use.
  # config.vm.provision "shell", inline: <<-SHELL
  #   apt-get update
  #   apt-get install -y apache2
  # SHELL

  config.vm.provider :xenserver do |xs|
    xs.xs_host = "10.xxx.xxx.5"
    xs.xs_username = "root"
    xs.xs_password = "xxxxxxxx"
    xs.pv = true
    xs.memory = 2048
    xs.use_himn = false
  end

  config.vm.network "public_network", bridge: "xenbr0"

end

I have also tried setting xs.use_him to true but this didn't help and resulted to the same error.

May I ask what am I doing wrong?

With regards to converting the image from VirtualBox to XEN, I used the guide in this Readme.
http://www.rubydoc.info/gems/vagrant-xenserver/0.0.4

Hope someone can point me into the right direction.

Kind Regards,

Simon

Linked issues:
#41

Update
I have just span up a Debian 9 VM and installed vagrant and this plugin. I can confirm its throwing out the exact same error as macOS

@teneri66
Copy link
Contributor

Seems duplicate of #41

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

No branches or pull requests

2 participants