Vagrant vsphere--nil:NilClass的未定义方法“[]”

Vagrant vsphere--nil:NilClass的未定义方法“[]”,vagrant,vagrantfile,vsphere,Vagrant,Vagrantfile,Vsphere,这真是个奇怪的海森堡。有时,当我给流浪汉打电话时,我会得到这样的结果: Bringing machine 'default' up with 'vsphere' provider... ==> default: Calling vSphere CloneVM with the following settings: ==> default: -- Template VM: COLUMBIA/vm/DirectChannel/vagrantchefnode ==> defaul

这真是个奇怪的海森堡。有时,当我给流浪汉打电话时,我会得到这样的结果:

Bringing machine 'default' up with 'vsphere' provider...
==> default: Calling vSphere CloneVM with the following settings:
==> default:  -- Template VM: COLUMBIA/vm/DirectChannel/vagrantchefnode
==> default:  -- Target VM: COLUMBIA/vm/DirectChannel/dirchantsrv1
==> default: Waiting for SSH to become available...
undefined method `[]' for nil:NilClass
我完全忘记了最后一行是什么样子,我正试图从使用-debug标记运行的日志中重新创建它

在我建立了流浪者档案之后,它第一次就这样做了,然后在流浪者销毁之后,就没有问题了。有一次我让它每次都这样做,所以我将调试输出发送到一个日志文件。然后我编辑了这个文件,它停止了。然后我把这个流浪汉的档案编辑回原来的样子,现在仍然没有再发生。我需要知道是什么原因导致的,这样我才能确保它不会再次发生

以下是日志文件中包含nil的行:

DEBUG command:  -- options: {:provider=>nil}
 INFO batch_action: Starting action: #<Vagrant::Machine:0x000000018bb658> up {:destroy_on_error=>true, :parallel=>true, :provision_ignore_sentinel=>false, :provision_types=>nil}
 INFO machine: New machine ID: nil
ERROR warden: Error occurred: undefined method `[]' for nil:NilClass
ERROR warden: Error occurred: undefined method `[]' for nil:NilClass
ERROR warden: Error occurred: undefined method `[]' for nil:NilClass
ERROR warden: Error occurred: undefined method `[]' for nil:NilClass
ERROR vagrant: #<VagrantPlugins::VSphere::Errors::VSphereError: undefined method `[]' for nil:NilClass>
ERROR vagrant: undefined method `[]' for nil:NilClass
 INFO interface: error: undefined method `[]' for nil:NilClass
undefined method `[]' for nil:NilClass
 INFO interface: Machine: error-exit ["VagrantPlugins::VSphere::Errors::VSphereError", "undefined method `[]' for nil:NilClass"]
2我的主目录~/.vagrant.d中的vagrant文件:

-*-模式:ruby-*- vi:set ft=ruby: Vagrant.configure2 do | config| config.vm.box='vsphere' config.vm.provider:vsphere do | vsphere| vsphere.template_name='VagarantchefNode' 终止 config.vm.provision chef_客户端,id:chef do|chef| chef.provisioning\u path=/etc/chef chef.chef\u服务器\u url=https://chefserver.myorg.com chef.validation\u key\u path=/home/user/.vagrant.d/chef/validation.pem chef.client\u key\u path=/etc/chef/client.pem chef.validation\u client\u name=chef validator chef.custom_config_path=/home/user/.vagrant.d/Vagrantfile.chef chef.delete_node=true chef.delete_client=true chef.add_角色库 终止 终止 3项目目录~/.vagrant.d/box/chefnode1中的vagrant文件:

-*-模式:ruby-*- vi:set ft=ruby: Vagrant.configure2 do | config| config.vm.provider:vsphere do | vsphere| vsphere.template_name='chefnode' vsphere.customization\u规范\u名称='test2' vsphere.name='test2' 终止 config.vm.provision chef_客户端,id:chef do|chef| chef.node_name=test2 chef.add_角色开发 终止 终止
在我看来,VMware方面似乎出了问题,但我对VMware主机没有完全访问权限。有什么想法吗?

我很少使用VMware。vagrant是分配主机id还是vmware分配主机id?我在想可能是某种比赛条件,在id被分配之前它会要求一个machineid。我会向mitchell提交一份bug报告,包括尽可能多的信息,看看他有什么建议。我不知道你问题的答案。不确定漏洞是来自vagrant还是来自vsphere插件。事实证明,基本映像仍然是一个正在运行的VM,并且没有被转换回模板,因此可能会随机引入问题。我会等到事情再次发生再升级。谢谢你的帮助。