我在 Ubuntu 12.04 上使用 Ruby 2.1.1 和 Vagrant 1.6.1。运行:
vagrant box add chef/centos-6.5
我不断得到:
==> box: Box download was interrupted. Exiting.
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and try again. The
output from attempting to unpackage (if any):
x Vagrantfile
x box.ovf
x metadata.json
x packer-centos-6.5-x86_64-disk1.vmdk: truncated gzip input
bsdtar: Error exit delayed from previous errors.
我执行了几次 wget -c [下载 URL] 来手动继续下载。现在我不知道如何告诉 vagrant 使用已完成的 virtualbox.box 镜像而不是尝试新的下载。将其放在 .vagrant.d/boxes/vagrantcloud.com/chef/centos-6.5/version/1/provider 中并没有成功。
最佳答案
如果您已经手动下载了该框 centos-6.5 ,您可以告诉 vagrant 使用本地盒子而不是从 URL 下载。
做
vagrant box 添加 centos-6.5/path/to/opscode_centos-6.5_chef-provisionerless.box
然后从那里开始。
关于vagrant - vagrantcloud 下载中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23553847/