引发EC2实例与vagrant-aws错误

我试图通过使用vagrant自动化验收testing带来亚马逊的EC2服务的机器,所以我添加了虚拟框,并从Github复制Vagrantfile,但是当我尝试运行vagrant up --provider=aws我得到输出下面:我对ruby相当陌生,所以我不确定到底发生了什么问题。

将机器“默认”与“aws”供应商…

[默认]警告! AWS提供商不支持任何stream量
高级networkingconfiguration( config.vm.network )。 他们
会被默默的忽略。
[默认]使用以下设置启动实例…
[默认] – types:m1.small
[默认] – AMI:ami-5344d263
[default] – Region:us-east-1
[默认] – 密钥对:vagrant-keypair
/home/vagrant/.vagrant.d/gems/gems/excon-0.25.0/lib/excon/middlewares/expects.rb:10:in response_call': Expected(200) <=> Actual(400 Bad Request) (Excon::Errors::BadRequest) from /home/vagrant/.vagrant.d/gems/gems/excon-0.25.0/lib/excon/connection.rb:353:in response from /home/vagrant/.vagrant .d / gems / gems / excon-0.25.0 / lib / excon / connection.rb:247:in request' from /home/vagrant/.vagrant.d/gems/gems/fog-1.10.1/lib/fog/core/connection.rb:21:in /home/vagrant/.vagrant.d/gems/gems/fog-1.10.1/lib/fog/aws/compute.rb:384:in _request' from /home/vagrant/.vagrant.d/gems/gems/fog-1.10.1/lib/fog/aws/compute.rb:379:in request'from /home/vagrant/.vagrant.d/gems/gems/fog从/home/vagrant/.vagrant.d/gems/gems/fog-1.10.1/lib/fog/aws获得-1.10.1 / lib / fog / aws / requests / compute / run_instances.rb:119:在run_instances' from /home/vagrant/.vagrant.d/gems/gems/fog-1.10.1/lib/fog/aws/models/compute/server.rb:173:in save'from /home/vagrant/.vagrant.d/gems/gems/fog-1.10.1/lib/fog/core/collection.rb:52:in create' from /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.2.2/lib/vagrant-aws/action/run_instance.rb:76:in create' from /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.2.2/lib/vagrant-aws/action/run_instance.rb:76:in /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in从/ opt / vagrant / embedded / call' from /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.2.2/lib/vagrant-aws/action/warn_networks.rb:14:in call'调用' gems / gems / vagrant-1.2.2 / lib / vagrant / action / warden.rb:34:in call' from /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.2.2/lib/vagrant-aws/action/sync_folders.rb:21:in从/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in call'from call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/provision.rb:45:in call'from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2 /lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61中call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in block in run /opt/vagrant/embedded/gems/gems/vagrant-1.2中的busy' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in 从/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in busy' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in运行' call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in call'from /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.2。 2 / lib / vagrant-aws / action / connect_aws.rb:41: call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in调用/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/config_validate.rb:25:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in call'从/ opt / vagrant / embedded / gems / gems /中call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in :在busy' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in vagrant-1.2.2 / lib / vagrant / util / busy.rb:19: busy' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in从/ opt / va运行“ grant / embedded / gems / gems / vagrant-1.2.2 / lib / vagrant / machine.rb:147:in action' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/batch_action.rb:63:in块(2级)运行'

重新编译后运行时出错:

并行执行多个操作时发生错误。 发生的任何错误如下所示。

 An unexpected error ocurred when executing the action on the 'default' machine. Please report this as a bug: undefined method `Errors' for Excon:Module /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.3.0.dev/lib/vagrant-aws/action/run_instance.rb:91:in `rescue in call' /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.3.0.dev/lib/vagrant-aws/action/run_instance.rb:61:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.3.0.dev/lib/vagrant-aws/action/warn_networks.rb:14:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.3.0.dev/lib/vagrant-aws/action/sync_folders.rb:21:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/provision.rb:45:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.3.0.dev/lib/vagrant-aws/action/connect_aws.rb:41:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/handle_box_url.rb:72:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/machine.rb:147:in `action' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run' 

您可能会从这个补丁中受益,这个补丁会logging实际的错误响应: https : //github.com/mitchellh/vagrant-aws/pull/101

这可能与#101区域的错误有关。

这已经在最近的vagrant-aws ,所以请通过以下方式升级您的gem :

 vagrant plugin update 

或者通过以下步骤从拉取请求中应用修补程序:

 cd ~/.vagrant.d/gems/gems/vagrant-aws-*/ patch -p1 <(curl https://patch-diff.githubusercontent.com/raw/mitchellh/vagrant-aws/pull/101.patch)