今天早上我有一个新的开发人员,Vagrant错了。它不像我以前见过的任何Vagrant错误。请帮忙。
alex@Alexs-MacBook-Pro ~/Sites/hhlvh-box - $ vagrant up
There were warnings and/or errors while loading your Vagrantfile
for the machine 'default'.
Your Vagrantfile was written for an earlier version of Vagrant,
and while Vagrant does the best it can to remain backwards
compatible, there are some cases where things have changed
significantly enough to warrant a message. These messages are
shown below.
Warnings:
* `config.vm.customize` calls are VirtualBox-specific. If you're
using any other provider, you'll have to use config.vm.provider in a
v2 configuration block.
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'hhlvh-box-v1.8.1' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
/Applications/Vagrant/embedded/lib/ruby/2.0.0/json/common.rb:328:in `read': Invalid argument - /Users/alex/Sites/hhlvh-box/debian7-hhlvh-v1.8.1.box (Errno::EINVAL)
from /Applications/Vagrant/embedded/lib/ruby/2.0.0/json/common.rb:328:in `load'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/box_metadata.rb:24:in `initialize'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/box_add.rb:448:in `new'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/box_add.rb:448:in `block in metadata_url?'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/box_add.rb:447:in `open'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/box_add.rb:447:in `metadata_url?'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/box_add.rb:72:in `block in call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/box_add.rb:70:in `map'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/box_add.rb:70:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/handle_box.rb:75:in `handle_box'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/handle_box.rb:42:in `block in call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/handle_box.rb:36:in `synchronize'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/handle_box.rb:36:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/call.rb:51:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/machine.rb:157:in `action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/batch_action.rb:72:in `block (2 levels) in run'
功能
我认为这可能与他的Vagrant文件有关,但是当试图运行vagrant box add /Users/alex/Sites/hhlvh-box/debian7-hhlvh-v1.8.1.box
时,它会导致同样的错误。
Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "hhlvh-box-v1.8.1"
config.vm.box_url = "~/Sites/hhlvh-box/debian7-hhlvh-v1.8.1.box"
config.vm.network :hostonly, "33.33.33.10"
config.vm.customize ["modifyvm", :id, "--memory", 2048]
config.vm.customize ["modifyvm", :id, "--cpus", 2]
config.vm.share_folder "v-chef", "/chef-server", "~/Sites/chef-server", :nfs => true
config.vm.share_folder "v-api", "/var/www/website.org/current", "~/Sites/api", :nfs => true
config.vm.share_folder "v-webui", "/var/www/ui/current", "~/Sites/webui", :nfs => true
config.ssh.username = "hhadmin"
end
答案 0 :(得分:2)
我通过Vagrant的Github提交了一张票,mitchellh说这是Vagrant v1.5的一个问题,将在v1.5.1中修复。我们通过下载v1.3.5来解决这个问题,它就像一个魅力。
干杯, 杰克