frapposelli / vagrant-vcenter

A Vagrant provider for VMware vCenter®
MIT License
106 stars 36 forks source link

`block in upload_ovf_as_template': undefined method `name' for nil:NilClass (NoMethodError) #27

Open brcupp opened 9 years ago

brcupp commented 9 years ago

Not sure what is going on but I'm getting an "undefined method' error - with vagrant-1.7.2

vagrant up --debug INFO global: Vagrant version: 1.7.2 INFO global: Ruby version: 2.0.0 INFO global: RubyGems version: 2.0.14 INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.2/bin/vagrant" INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/bin/../embedded" INFO global: VAGRANT_INSTALLER_VERSION="2" INFO global: VAGRANT_HOME="/git/bento/builds" INFO global: VAGRANT_DETECTED_OS="Linux" INFO global: VAGRANT_INSTALLER_ENV="1" INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1" INFO global: VAGRANT_LOG="debug" INFO global: Plugins: INFO global: - builder = 3.2.2 INFO global: - bundler = 1.7.11 INFO global: - coderay = 1.1.0 INFO global: - log4r = 1.1.10 INFO global: - method_source = 0.8.2 INFO global: - mime-types = 1.25.1 INFO global: - mini_portile = 0.6.0 INFO global: - nokogiri = 1.6.3.1 INFO global: - slop = 3.6.0 INFO global: - pry = 0.10.1 INFO global: - rdoc = 4.0.0 INFO global: - rest-client = 1.6.8 INFO global: - trollop = 2.1.1 INFO global: - vagrant-berkshelf = 4.0.2 INFO global: - vagrant-rbvmomi = 1.8.1 INFO global: - vagrant-share = 1.1.3 INFO global: - vagrant-vcenter = 0.3.2 DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/destroy/plugin.rb INFO manager: Registered plugin: destroy command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/push/plugin.rb INFO manager: Registered plugin: push command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/init/plugin.rb INFO manager: Registered plugin: init command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/provision/plugin.rb INFO manager: Registered plugin: provision command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/suspend/plugin.rb INFO manager: Registered plugin: suspend command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/ssh_config/plugin.rb INFO manager: Registered plugin: ssh-config command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/halt/plugin.rb INFO manager: Registered plugin: halt command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/resume/plugin.rb INFO manager: Registered plugin: resume command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/global-status/plugin.rb INFO manager: Registered plugin: global-status command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/reload/plugin.rb INFO manager: Registered plugin: reload command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/ssh/plugin.rb INFO manager: Registered plugin: ssh command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/up/plugin.rb INFO manager: Registered plugin: up command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/plugin/plugin.rb INFO manager: Registered plugin: plugin command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/help/plugin.rb INFO manager: Registered plugin: help command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/version/plugin.rb INFO manager: Registered plugin: version command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/status/plugin.rb INFO manager: Registered plugin: status command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/package/plugin.rb INFO manager: Registered plugin: package command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/rdp/plugin.rb INFO manager: Registered plugin: rdp command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/login/plugin.rb INFO manager: Registered plugin: vagrant-login DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/list-commands/plugin.rb INFO manager: Registered plugin: list-commands command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/commands/box/plugin.rb INFO manager: Registered plugin: box command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/plugin.rb INFO manager: Registered plugin: ssh communicator DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/winrm/plugin.rb INFO manager: Registered plugin: winrm communicator DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/synced_folders/rsync/plugin.rb INFO manager: Registered plugin: RSync synced folders DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/synced_folders/smb/plugin.rb INFO manager: Registered plugin: SMB synced folders DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/synced_folders/nfs/plugin.rb INFO manager: Registered plugin: NFS synced folders DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/docker/plugin.rb INFO manager: Registered plugin: docker-provider DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/hyperv/plugin.rb INFO manager: Registered plugin: Hyper-V provider DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/plugin.rb INFO manager: Registered plugin: VirtualBox provider DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/kernel_v1/plugin.rb INFO manager: Registered plugin: kernel DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/kernel_v2/plugin.rb INFO manager: Registered plugin: kernel DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/pushes/local-exec/plugin.rb INFO manager: Registered plugin: local-exec DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/pushes/ftp/plugin.rb INFO manager: Registered plugin: ftp DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/pushes/noop/plugin.rb INFO manager: Registered plugin: noop DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/pushes/atlas/plugin.rb INFO manager: Registered plugin: atlas DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/pushes/heroku/plugin.rb INFO manager: Registered plugin: heroku DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/bsd/plugin.rb INFO manager: Registered plugin: BSD host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/suse/plugin.rb INFO manager: Registered plugin: SUSE host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/linux/plugin.rb INFO manager: Registered plugin: Linux host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/freebsd/plugin.rb INFO manager: Registered plugin: FreeBSD host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/null/plugin.rb INFO manager: Registered plugin: null host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/redhat/plugin.rb INFO manager: Registered plugin: Red Hat host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/darwin/plugin.rb INFO manager: Registered plugin: Mac OS X host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/gentoo/plugin.rb INFO manager: Registered plugin: Gentoo host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/slackware/plugin.rb INFO manager: Registered plugin: Slackware host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/arch/plugin.rb INFO manager: Registered plugin: Arch host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/hosts/windows/plugin.rb INFO manager: Registered plugin: Windows host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/debian/plugin.rb INFO manager: Registered plugin: Debian guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/solaris11/plugin.rb INFO manager: Registered plugin: Solaris 11 guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/smartos/plugin.rb INFO manager: Registered plugin: SmartOS guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/coreos/plugin.rb INFO manager: Registered plugin: CoreOS guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/fedora/plugin.rb INFO manager: Registered plugin: Fedora guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/netbsd/plugin.rb INFO manager: Registered plugin: NetBSD guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/suse/plugin.rb INFO manager: Registered plugin: SUSE guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/linux/plugin.rb INFO manager: Registered plugin: Linux guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/nixos/plugin.rb INFO manager: Registered plugin: NixOS guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/freebsd/plugin.rb INFO manager: Registered plugin: FreeBSD guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/mint/plugin.rb INFO manager: Registered plugin: Mint guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/omnios/plugin.rb INFO manager: Registered plugin: OmniOS guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/openbsd/plugin.rb INFO manager: Registered plugin: OpenBSD guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/redhat/plugin.rb INFO manager: Registered plugin: RedHat guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/darwin/plugin.rb INFO manager: Registered plugin: Darwin guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/gentoo/plugin.rb INFO manager: Registered plugin: Gentoo guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/funtoo/plugin.rb INFO manager: Registered plugin: Funtoo guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/tinycore/plugin.rb INFO manager: Registered plugin: TinyCore Linux guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/pld/plugin.rb INFO manager: Registered plugin: PLD Linux guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/arch/plugin.rb INFO manager: Registered plugin: Arch guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/windows/plugin.rb INFO manager: Registered plugin: Windows guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/solaris/plugin.rb INFO manager: Registered plugin: Solaris guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/esxi/plugin.rb INFO manager: Registered plugin: ESXi guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/guests/ubuntu/plugin.rb INFO manager: Registered plugin: Ubuntu guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/provisioners/docker/plugin.rb INFO manager: Registered plugin: docker DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/provisioners/puppet/plugin.rb INFO manager: Registered plugin: puppet DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/provisioners/ansible/plugin.rb INFO manager: Registered plugin: ansible DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/provisioners/file/plugin.rb INFO manager: Registered plugin: file DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/provisioners/shell/plugin.rb INFO manager: Registered plugin: shell DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/provisioners/chef/plugin.rb INFO manager: Registered plugin: chef DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/provisioners/salt/plugin.rb INFO manager: Registered plugin: salt DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/provisioners/cfengine/plugin.rb INFO manager: Registered plugin: CFEngine Provisioner INFO global: Loading plugins! INFO manager: Registered plugin: vagrant-share INFO manager: Registered plugin: VMware vCenter Provider INFO vagrant: vagrant invoked: ["up", "--debug"] DEBUG vagrant: Creating Vagrant environment INFO environment: Environment initialized (#Vagrant::Environment:0x00000002e01ad0) INFO environment: - cwd: /git/bento/builds/vsphere INFO environment: Home path: /git/bento/builds INFO environment: Local data path: /git/bento/builds/vsphere/.vagrant DEBUG environment: Creating: /git/bento/builds/vsphere/.vagrant INFO environment: Running hook: environment_plugins_loaded INFO runner: Preparing hooks for middleware sequence... INFO runner: 1 hooks defined. INFO runner: Running action: #Vagrant::Action::Builder:0x00000002ff9978 INFO environment: Running hook: environment_load INFO runner: Preparing hooks for middleware sequence... INFO runner: 1 hooks defined. INFO runner: Running action: #Vagrant::Action::Builder:0x0000000251b1c8 INFO cli: CLI: [] "up" [] DEBUG cli: Invoking command class: VagrantPlugins::CommandUp::Command [] DEBUG command: 'Up' each target VM... INFO loader: Set :home = #Pathname:/git/bento/builds/Vagrantfile DEBUG loader: Populating proc cache for #Pathname:/git/bento/builds/Vagrantfile DEBUG loader: Load procs for pathname: /git/bento/builds/Vagrantfile INFO loader: Set :root = #Pathname:/git/bento/builds/vsphere/Vagrantfile DEBUG loader: Populating proc cache for #Pathname:/git/bento/builds/vsphere/Vagrantfile DEBUG loader: Load procs for pathname: /git/bento/builds/vsphere/Vagrantfile INFO loader: Loading configuration in order: [:home, :root] DEBUG loader: Loading from: home (evaluating) DEBUG loader: Loading from: root (evaluating) DEBUG loader: Configuration loaded successfully, finalizing and returning DEBUG push: finalizing DEBUG command: Getting target VMs for command. Arguments: DEBUG command: -- names: ["test1"] DEBUG command: -- options: {:provider=>nil} DEBUG command: Finding machine that match name: test1 INFO environment: Getting machine: test1 (vcenter) INFO environment: Uncached load of machine. INFO loader: Set "23924240_machine_test1" = [["2", #Proc:0x00000003082480@/git/bento/builds/vsphere/Vagrantfile:40]] DEBUG loader: Populating proc cache for ["2", #Proc:0x00000003082480@/git/bento/builds/vsphere/Vagrantfile:40] INFO loader: Loading configuration in order: [:home, :root, "23924240_machine_test1"] DEBUG loader: Loading from: home (cache) DEBUG loader: Loading from: root (cache) DEBUG loader: Loading from: 23924240_machine_test1 (evaluating) DEBUG loader: Configuration loaded successfully, finalizing and returning DEBUG push: finalizing INFO box_collection: Box found: /git/bento/builds/vmware/visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box (vmware_ovf) INFO machine: Initializing machine: test1 INFO machine: - Provider: VagrantPlugins::VCenter::Provider INFO machine: - Box: #Vagrant::Box:0x0000000215c758 INFO machine: - Data dir: /git/bento/builds/vsphere/.vagrant/machines/test1/vcenter INFO machine: Calling action: read_state on provider vCenter (new) DEBUG environment: Attempting to acquire process-lock: machine-action-6e73af48ce286e7698df6e04c1666ee5 DEBUG environment: Attempting to acquire process-lock: dotlock INFO environment: Acquired process lock: dotlock INFO environment: Released process lock: dotlock INFO environment: Acquired process lock: machine-action-6e73af48ce286e7698df6e04c1666ee5 INFO host: Autodetecting host type for [#<Vagrant::Environment: /git/bento/builds/vsphere>] DEBUG host: Trying: suse DEBUG host: Trying: freebsd DEBUG host: Trying: redhat INFO host: Detected: redhat! INFO runner: Preparing hooks for middleware sequence... INFO runner: 1 hooks defined. INFO runner: Running action: #Vagrant::Action::Builder:0x000000028dc5c8 INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x00000002970a20 INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::ConnectvCenter:0x000000029709f8 INFO connect_vCenter: Connecting to vCenter... DEBUG connect_vCenter: config.hostname: sw730vcntrda01.visa.com DEBUG connect_vCenter: config.username: svcchef@visa.com DEBUG connect_vCenter: config.password: INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::ReadState:0x00000002e022f0 INFO read_state: VM is not created yet INFO warden: Calling OUT action: #VagrantPlugins::VCenter::Action::ReadState:0x00000002e022f0 INFO warden: Calling OUT action: #VagrantPlugins::VCenter::Action::ConnectvCenter:0x000000029709f8 INFO warden: Calling OUT action: #Vagrant::Action::Builtin::ConfigValidate:0x00000002970a20 INFO environment: Released process lock: machine-action-6e73af48ce286e7698df6e04c1666ee5 DEBUG environment: Attempting to acquire process-lock: dotlock INFO environment: Acquired process lock: dotlock INFO environment: Released process lock: dotlock INFO machine: New machine ID: nil INFO command: With machine: test1 (#<VagrantPlugins::VCenter::Provider:0x000000029293f0 @machine=#<Vagrant::Machine: test1 (VagrantPlugins::VCenter::Provider)>, @cap_logger=#<Log4r::Logger:0x00000002928c20 @fullname="vagrant::capability_host::vagrantplugins::vcenter::provider", @outputters=[], @additive=true, @name="provider", @path="vagrant::capability_host::vagrantplugins::vcenter", @parent=#<Log4r::Logger:0x000000024458e8 @fullname="vagrant", @outputters=[#<Log4r::StderrOutputter:0x000000024d6230 @mon_owner=nil, @mon_count=0, @mon_mutex=#, @name="stderr", @level=0, @formatter=#<Log4r::DefaultFormatter:0x000000024f7ea8 @depth=7>, @out=#IO:>], @additive=true, @name="vagrant", @path="", @parent=#<Log4r::RootLogger:0x000000024456b8 @level=0, @outputters=[]>, @level=1, @trace=false>, @level=1, @trace=false>, @cap_host_chain=[[:vcenter, #<#Class:0x000000029293c8:0x000000029606c0>]], @cap_args=[#<Vagrant::Machine: test1 (VagrantPlugins::VCenter::Provider)>], @cap_caps={:docker=>#<Vagrant::Registry:0x00000002929238 @items={:public_address=>#Proc:0x00000002faf530@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/docker/plugin.rb:54, :proxy_machine=>#Proc:0x00000002faf418@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/docker/plugin.rb:59}, @results_cache={}>, :hyperv=>#<Vagrant::Registry:0x00000002929170 @items={:public_address=>#Proc:0x00000002fb6970@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/hyperv/plugin.rb:25}, @results_cache={}>, :virtualbox=>#<Vagrant::Registry:0x00000002929058 @items={:forwarded_ports=>#Proc:0x00000002fbc5c8@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/plugin.rb:27, :nic_mac_addresses=>#Proc:0x00000002fbc528@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/virtualbox/plugin.rb:32, :public_address=>#Proc:0x00000002d29e50@/opt/vagrant/embedded/gems/gems/vagrant-share-1.1.3/lib/vagrant-share.rb:39}, @results_cache={}>, :vcenter=>#<Vagrant::Registry:0x00000002928ef0 @items={:public_address=>#Proc:0x00000002d584d0@/git/bento/builds/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/plugin.rb:35, :read_winrm_info=>#Proc:0x00000002d58430@/git/bento/builds/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/plugin.rb:40, :rdp_info=>#Proc:0x00000002d58408@/git/bento/builds/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/plugin.rb:45}, @results_cache={}>}>) INFO interface: info: Bringing machine 'test1' up with 'vcenter' provider... Bringing machine 'test1' up with 'vcenter' provider... INFO machine: Calling action: read_state on provider vCenter (new) DEBUG environment: Attempting to acquire process-lock: machine-action-6e73af48ce286e7698df6e04c1666ee5 DEBUG environment: Attempting to acquire process-lock: dotlock INFO environment: Acquired process lock: dotlock INFO environment: Released process lock: dotlock INFO environment: Acquired process lock: machine-action-6e73af48ce286e7698df6e04c1666ee5 INFO runner: Preparing hooks for middleware sequence... INFO runner: 1 hooks defined. INFO runner: Running action: #Vagrant::Action::Builder:0x00000003d75930 INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x00000003d7f5c0 INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::ConnectvCenter:0x00000003d7f570 INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::ReadState:0x00000003db2808 INFO read_state: VM is not created yet INFO warden: Calling OUT action: #VagrantPlugins::VCenter::Action::ReadState:0x00000003db2808 INFO warden: Calling OUT action: #VagrantPlugins::VCenter::Action::ConnectvCenter:0x00000003d7f570 INFO warden: Calling OUT action: #Vagrant::Action::Builtin::ConfigValidate:0x00000003d7f5c0 INFO environment: Released process lock: machine-action-6e73af48ce286e7698df6e04c1666ee5 DEBUG environment: Attempting to acquire process-lock: dotlock INFO environment: Acquired process lock: dotlock INFO environment: Released process lock: dotlock INFO batch_action: Enabling parallelization by default. INFO batch_action: Disabling parallelization because only executing one action INFO batch_action: Batch action will parallelize: false INFO batch_action: Starting action: #Vagrant::Machine:0x000000028a3480 up {:destroy_on_error=>true, :parallel=>true, :provision_ignore_sentinel=>false, :provision_types=>nil} INFO machine: Calling action: up on provider vCenter (new) DEBUG environment: Attempting to acquire process-lock: machine-action-6e73af48ce286e7698df6e04c1666ee5 DEBUG environment: Attempting to acquire process-lock: dotlock INFO environment: Acquired process lock: dotlock INFO environment: Released process lock: dotlock INFO environment: Acquired process lock: machine-action-6e73af48ce286e7698df6e04c1666ee5 INFO runner: Preparing hooks for middleware sequence... INFO runner: 1 hooks defined. INFO runner: Running action: #Vagrant::Action::Builder:0x00000003e2de68 INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x00000004527e80 INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::ConnectvCenter:0x00000004527e30 INFO warden: Calling IN action: #Vagrant::Action::Builtin::Call:0x0000000457a658 INFO runner: Preparing hooks for middleware sequence... INFO runner: 1 hooks defined. INFO runner: Running action: #Vagrant::Action::Builder:0x00000002d5a528 INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::IsCreated:0x00000002d73140 WARN is_created: VM has not been created INFO warden: Calling OUT action: #VagrantPlugins::VCenter::Action::IsCreated:0x00000002d73140 INFO runner: Preparing hooks for middleware sequence... INFO runner: 1 hooks defined. INFO runner: Running action: #Vagrant::Action::Warden:0x000000030839c0 INFO warden: Calling IN action: #<Proc:0x00000003bdd0f0@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:94 (lambda)> INFO warden: Calling IN action: #Vagrant::Action::Builtin::HandleBox:0x000000030838d0 INFO handle_box: Machine already has box. HandleBox will not run. INFO warden: Calling IN action: #<Proc:0x00000003106aa0@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:94 (lambda)> INFO warden: Calling IN action: #VagrantPlugins::VCenter::Action::InventoryCheck:0x0000000457a608 DEBUG inventory_check: This is the box we're looking for: -git-bento-builds-vmware-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box DEBUG inventory_check: Sleeping 2.278719014020014 to avoid race conditions. INFO interface: info: Uploading [-git-bento-builds-vmware-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box]... INFO interface: info: ==> test1: Uploading [-git-bento-builds-vmware-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box]... ==> test1: Uploading [-git-bento-builds-vmware-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box]... DEBUG inventory_check: OVF File: file:///git/bento/builds/boxes/-VAGRANTSLASH-git-VAGRANTSLASH-bento-VAGRANTSLASH-builds-VAGRANTSLASH-vmware-VAGRANTSLASH-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box/0/vmware_ovf/visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box.ovf INFO interface: info: Adding [-git-bento-builds-vmware-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box] INFO interface: info: ==> test1: Adding [-git-bento-builds-vmware-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box] ==> test1: Adding [-git-bento-builds-vmware-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box] ERROR warden: Error occurred: undefined method name' for nil:NilClass INFO warden: Beginning recovery process... INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x0000000457a658> INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Recovery complete. ERROR warden: Error occurred: undefined methodname' for nil:NilClass INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: undefined method name' for nil:NilClass 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-6e73af48ce286e7698df6e04c1666ee5 INFO environment: Running hook: environment_unload INFO runner: Preparing hooks for middleware sequence... INFO runner: 1 hooks defined. INFO runner: Running action: #<Vagrant::Action::Builder:0x000000024c8b08> /git/bento/builds/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/utils/deploy.rb:123:inblock in upload_ovf_as_template': undefined method name' for nil:NilClass (NoMethodError) from /git/bento/builds/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/utils/deploy.rb:123:ineach' from /git/bento/builds/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/utils/deploy.rb:123:in map' from /git/bento/builds/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/utils/deploy.rb:123:inupload_ovf_as_template' from /git/bento/builds/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/action/inventory_check.rb:82:in vcenter_upload_box' from /git/bento/builds/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/action/inventory_check.rb:122:invcenter_check_inventory' from /git/bento/builds/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/action/inventory_check.rb:21: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/warden.rb:95:in block in finalize_action' 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/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/handle_box.rb:56:incall' 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 /git/bento/builds/gems/gems/vagrant-vcenter-0.3.2/lib/vagrant-vcenter/action/connect_vcenter.rb:32: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/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'

tsugliani commented 9 years ago

Hi @brcupp,

Did the box upload process start and finish and fail just after that ?

If yes, check this solution: https://github.com/gosddc/vagrant-vcenter/issues/23#issuecomment-63323760 (it's actually fixed on the develop branch)

brcupp commented 9 years ago

Thanks for the response. No it looks as if a connection to vcenter is established but fails during the upload.

INFO interface: info: Uploading [-git-bento-builds-vmware-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box]... INFO interface: info: ==> test1: Uploading [-git-bento-builds-vmware-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box]... ==> test1: Uploading [-git-bento-builds-vmware-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box]... DEBUG inventory_check: OVF File: file:///git/bento/builds/boxes/-VAGRANTSLASH-git-VAGRANTSLASH-bento-VAGRANTSLASH-builds-VAGRANTSLASH-vmware-VAGRANTSLASH-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box/0/vmware_ovf/visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box.ovf INFO interface: info: Adding [-git-bento-builds-vmware-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box] INFO interface: info: ==> test1: Adding [-git-bento-builds-vmware-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box] ==> test1: Adding [-git-bento-builds-vmware-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box] ERROR warden: Error occurred: undefined method `name' for nil:NilClass INFO warden: Beginning recovery process... INFO warden: Calling recover: #Vagrant::Action::Builtin::Call:0x000000035fbce0 INFO warden: Beginning recovery process...

tsugliani commented 9 years ago

Can you share you Vagrantfile (remove credentials/hostnames if required)

file:///git/bento/builds/boxes/-VAGRANTSLASH-git-VAGRANTSLASH-bento-VAGRANTSLASH-builds-VAGRANTSLASH-vmware-VAGRANTSLASH-visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box/0/vmware_ovf/visa-rhel-6.5-x86_64-2014.2-large-vmware-vcenter.box.ovf

Is this the correct filename ? I see many "-" and "VAGRANTSLASH" in it, just wondering if that is expected ? Does this fail with another box, or only this one ?

brcupp commented 9 years ago

I built the system using packer with the vagrant-vmware-ovf plugin. No issues there. The "-" and "VAGRANTSLASH" I had never seen before when using other plugins like vagrant-vsphere but I assumed it was expected behavior. But to answer you question it does pick up the correct file name.

Vagrantfile - Just mainly took the defaults from the example Vagrantfile and was working back from there. Seeing things in action is how I learn... :)

ENV['VAGRANT_DEFAULT_PROVIDER'] = 'vcenter'

nodes = []

[*1..1].each do |n| nodes << { hostname: "test#{n}", box: '/git/bento/builds/vmware/packer_vmware-iso_vmware_ovf.box', ip: "REDACTED"

mem: 1024 * n,

cpu: n }

       }

end

[*1..5].each do |n|

nodes << { hostname: "precise#{n}",

box: 'gosddc/precise32',

ip: "10.250.22.#{n}",

mem: 1024 * n,

cpu: n }

end

Vagrant.configure('2') do |config|

Go through nodes and configure each of them.

nodes.each do |node|

config.vm.provider :vcenter do |vcenter|
  vcenter.hostname = 'REDACTED'
  vcenter.username = 'REDACTED'
  vcenter.password = 'REDACTED'
  vcenter.folder_name = 'test'
  vcenter.datacenter_name = 'REDACTED'
  vcenter.computer_name = 'REDACTED'
  vcenter.datastore_name = 'REDACTED'
  vcenter.network_name = 'REDACTED'
  vcenter.linked_clones = false
end

config.vm.define node[:hostname] do |node_config|
  node_config.vm.box = node[:box]
  node_config.vm.hostname = node[:hostname]

  # Let's configure the network for the VM, only the ip changes and is
 # coming from the nodes array
  node_config.vm.network :public_network,
                         ip: node[:ip],
                         netmask: '255.255.255.0',
                         gateway: '10.250.254.0',
                         dns_server_list: ['8.8.4.4', '8.8.8.8'],
                         dns_suffix_list: ['visa.com']

  # Let's override some provider settings for specific VMs
  node_config.vm.provider :vcenter do |override|
    # Override number of cpu and memory based on what's in the nodes array
    override.num_cpu = node[:cpu]
    override.memory = node[:mem]
    case node[:hostname]
    # Override the folder name based on the hostname of the VM
    when /centos/
      override.folder_name = 'Vagrant/centos'
    when /precise/
      override.folder_name = 'Vagrant/ubuntu/precise'
      override.enable_vm_customization = false
    end
  end
  node_config.nfs.functional = false
end

end end

ejber-ozkan commented 9 years ago

I came across this issue recently too , We found that if our Network name is not correct or permissions against it are not correct across the 'related' cluster on Vsphere this will happen. hope that helps.