xapi-project / vagrant-xenserver

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

Error when trying to provision VM on Xenserver #15

Closed leigh507 closed 9 years ago

leigh507 commented 9 years ago

Hi, I get the following error when trying to bring up a new VM

[root@controller-vg ~]# vagrant up --provider=xenserver Bringing machine 'default' up with 'xenserver' provider... 1+0 records in 1+0 records out 1048576 bytes (1.0 MB) copied, 0.0033535 s, 313 MB/s /root/.vagrant.d/gems/gems/vagrant-xenserver-0.0.9/lib/vagrant-xenserver/action/upload_vhd.rb:33:in call': undefined methodfind' for nil:NilClass (NoMethodError) from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:inblock in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:inblock in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in busy' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:inrun' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/call.rb:53:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:incall' from /root/.vagrant.d/gems/gems/vagrant-xenserver-0.0.9/lib/vagrant-xenserver/action/connect_xs.rb:28:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/config_validate.rb:25:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/handle_box.rb:56:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:inblock in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in busy' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:inrun' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:214:in action_raw' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:191:inblock in action' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:516:in lock' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:178:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:178:in action' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/batch_action.rb:82:inblock (2 levels) in run'

Any help would be great! Leigh

leigh507 commented 9 years ago

If it helps here are the variables

[root@controller-vg xenserver]# vagrant up --provider=xenserver Bringing machine 'default' up with 'xenserver' provider... vhd file is /root/.vagrant.d/boxes/centos/0/xenserver/box.vhd hostname is 172.31.250.105 session is OpaqueRef:7b75bacc-bf5c-bf26-41d1-8783f61491a9 env is {:action_runner=>#<Vagrant::Action::Runner:0x0000000335c480 @globals={}, @lazy_globals=#Proc:0x0000000335c430@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:202, @logger=#<Log4r::Logger:0x0000000335c3b8 @fullname="vagrant::action::runner", @outputters=[], @additive=true, @name="runner", @path="vagrant::action", @parent=#<Log4r::RootLogger:0x000000029f1d28 @level=0, @outputters=[]>, @level=0, @trace=false>>, :box_collection=>#<Vagrant::BoxCollection:0x0000000338e520 @directory=#<Pathname:/root/.vagrant.d/boxes>, @hook=#<Method: Vagrant::Environment#hook>, @lock=#<Monitor:0x0000000338e4f8 @mon_owner=nil, @mon_count=0, @mon_mutex=#>, @temp_root=#Pathname:/root/.vagrant.d/tmp, @logger=#<Log4r::Logger:0x0000000338e458 @fullname="vagrant::box_collection", @outputters=[], @additive=true, @name="box_collection", @path="vagrant", @parent=#<Log4r::RootLogger:0x000000029f1d28 @level=0, @outputters=[]>, @level=0, @trace=false>>, :hook=>#<Method: Vagrant::Environment#hook>, :host=>#<Vagrant::Host:0x00000003378388 @cap_logger=#<Log4r::Logger:0x00000003378270 @fullname="vagrant::capability_host::vagrant::host", @outputters=[], @additive=true, @name="host", @path="vagrant::capability_host::vagrant", @parent=#<Log4r::RootLogger:0x000000029f1d28 @level=0, @outputters=[]>, @level=0, @trace=false>, @cap_host_chain=[[:redhat, #VagrantPlugins::HostRedHat::Host:0x000000033aef28], [:linux, #VagrantPlugins::HostLinux::Host:0x000000033aedc0]], @cap_args=[#<Vagrant::Environment: /root/.vagrant.d/boxes/centos/0/xenserver>], @cap_caps={:gentoo=>#<Vagrant::Registry:0x00000003378d38 @items={:nfs_check_command=>#Proc:0x00000002401760@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/gentoo/plugin.rb:16, :nfs_start_command=>#Proc:0x00000002401580@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/gentoo/plugin.rb:21}, @results_cache={}>, :redhat=>#<Vagrant::Registry:0x00000003378c48 @items={:nfs_check_command=>#Proc:0x0000000243bb68@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/redhat/plugin.rb:16, :nfs_start_command=>#Proc:0x0000000243b870@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/redhat/plugin.rb:21}, @results_cache={}>, :bsd=>#<Vagrant::Registry:0x00000003378b30 @items={:nfs_export=>#Proc:0x000000024583f8@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/bsd/plugin.rb:14, :nfs_exports_template=>#Proc:0x0000000245beb8@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/bsd/plugin.rb:19, :nfs_installed=>#Proc:0x0000000245bd78@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/bsd/plugin.rb:24, :nfs_prune=>#Proc:0x0000000245bc38@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/bsd/plugin.rb:29, :nfs_restart_command=>#Proc:0x0000000245ba80@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/bsd/plugin.rb:34}, @results_cache={}>, :suse=>#<Vagrant::Registry:0x000000033789f0 @items={:nfs_installed=>#Proc:0x000000024a0d38@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/suse/plugin.rb:14, :nfs_check_command=>#Proc:0x000000024a08b0@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/suse/plugin.rb:19, :nfs_start_command=>#Proc:0x000000024a05b8@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/suse/plugin.rb:24}, @results_cache={}>, :slackware=>#<Vagrant::Registry:0x00000003378928 @items={:nfs_check_command=>#Proc:0x00000002537558@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/slackware/plugin.rb:16, :nfs_start_command=>#Proc:0x000000025373c8@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/slackware/plugin.rb:21}, @results_cache={}>, :linux=>#<Vagrant::Registry:0x00000003378838 @items={:nfs_export=>#Proc:0x0000000256b380@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/linux/plugin.rb:14, :nfs_installed=>#Proc:0x0000000256b1a0@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/linux/plugin.rb:19, :nfs_prune=>#Proc:0x0000000256b088@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/linux/plugin.rb:24, :rdp_client=>#Proc:0x0000000256af48@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/linux/plugin.rb:29, :nfs_apply_command=>#Proc:0x0000000256ad40@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/linux/plugin.rb:36, :nfs_check_command=>#Proc:0x0000000256ab60@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/linux/plugin.rb:41, :nfs_start_command=>#Proc:0x0000000256aa20@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/linux/plugin.rb:46}, @results_cache={}>, :darwin=>#<Vagrant::Registry:0x000000033786f8 @items={:rdp_client=>#Proc:0x0000000257a650@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/darwin/plugin.rb:14}, @results_cache={}>, :arch=>#<Vagrant::Registry:0x00000003378608 @items={:nfs_installed=>#Proc:0x000000025a92e8@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/arch/plugin.rb:14, :nfs_check_command=>#Proc:0x000000025a8cd0@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/arch/plugin.rb:21, :nfs_start_command=>#Proc:0x000000025a8b90@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/arch/plugin.rb:26}, @results_cache={}>, :freebsd=>#<Vagrant::Registry:0x000000033784f0 @items={:nfs_export=>#Proc:0x000000025d60b8@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/freebsd/plugin.rb:14, :nfs_exports_template=>#Proc:0x000000025d5dc0@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/freebsd/plugin.rb:20, :nfs_restart_command=>#Proc:0x000000025d5960@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/freebsd/plugin.rb:25}, @results_cache={}>, :windows=>#<Vagrant::Registry:0x00000003378428 @items={:nfs_installed=>#Proc:0x000000025fad50@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/windows/plugin.rb:14, :rdp_client=>#Proc:0x000000025fac10@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/windows/plugin.rb:19}, @results_cache={}>}>, :machine_index=>#<Vagrant::MachineIndex:0x00000003372e88 @data_dir=#<Pathname:/root/.vagrant.d/data/machine-index>, @index_file=#Pathname:/root/.vagrant.d/data/machine-index/index, @lock=#<Monitor:0x00000003371880 @mon_owner=nil, @mon_count=0, @mon_mutex=#>, @machines={}, @machine_locks={}>, :gems_path=>#Pathname:/root/.vagrant.d/gems, :home_path=>#Pathname:/root/.vagrant.d, :root_path=>#Pathname:/root, :tmp_path=>#Pathname:/root/.vagrant.d/tmp, :ui=>#<Vagrant::UI::Prefixed:0x000000029f56a8 @logger=#<Log4r::Logger:0x000000029f5658 @fullname="vagrant::ui::interface", @outputters=[], @additive=true, @name="interface", @path="vagrant::ui", @parent=#<Log4r::RootLogger:0x000000029f1d28 @level=0, @outputters=[]>, @level=0, @trace=false>, @opts={}, @prefix=:default, @ui=#<Vagrant::UI::Colored:0x000000032ad458 @logger=#<Log4r::Logger:0x000000032ad250 @fullname="vagrant::ui::interface", @outputters=[], @additive=true, @name="interface", @path="vagrant::ui", @parent=#<Log4r::RootLogger:0x000000029f1d28 @level=0, @outputters=[]>, @level=0, @trace=false>, @opts={:color=>:default}, @lock=#Mutex:0x000000033434a8>>, :action_name=>:machine_action_up, :machine=>#<Vagrant::Machine: default (VagrantPlugins::XenServer::Provider)>, :machine_action=>:up, :destroy_on_error=>true, :parallel=>true, :provision_ignore_sentinel=>false, :provision_types=>nil, :provider=>"xenserver", :action_hooks=>[#<Vagrant::Action::Hook:0x000000033ea2f8 @before_hooks={Vagrant::Action::Builtin::SyncedFolderCleanup=>[[VagrantPlugins::SyncedFolderNFS::ActionCleanup, [], nil]]}, @after_hooks={}, @prepend_hooks=[], @append_hooks=[]>], :action_hooks_already_ran=>true, :xc=>#<XMLRPC::Client:0x000000033ce9e0 @http_header_extra=nil, @http_last_response=#<Net::HTTPOK 200 OK readbody=true>, @cookie=nil, @host="172.31.250.105", @path="/", @proxy_host=nil, @proxy_port=nil, @use_ssl=false, @timeout=30, @port=80, @password=nil, @user=nil, @auth=nil, @http=#<Net::HTTP 172.31.250.105:80 open=true>, @parser=#<XMLRPC::XMLParser::REXMLStreamParser:0x000000033d7248 @parser_class=XMLRPC::XMLParser::REXMLStreamParser::StreamListener>, @create=#<XMLRPC::Create:0x000000033ce7b0 @writer=#>>, :session=>"OpaqueRef:7b75bacc-bf5c-bf26-41d1-8783f61491a9", :result=>false} vdis is

leigh507 commented 9 years ago

Fixed by removing the xs.pv line - this will need to be fixed in the code