但是我得到了以下错误信息:Vagrant 1.4.3 user@machine:~$ vagrant box add ffuenf/debian-6.0.9-amd64
显然,命令格式不正确,但我应该如何获取box呢?该命令未正确调用。此命令的帮助信息如下。
https://vagrantcloud.com/ffuenf/debian-6.0.9-amd64
来自 Vagrant Cloud?
但是我得到了以下错误信息:Vagrant 1.4.3 user@machine:~$ vagrant box add ffuenf/debian-6.0.9-amd64
显然,命令格式不正确,但我应该如何获取box呢?该命令未正确调用。此命令的帮助信息如下。
https://vagrantcloud.com/ffuenf/debian-6.0.9-amd64
来自 Vagrant Cloud?
vagrant box add "ffuenf/debian-6.0.9-amd64"
是你的答案。
编辑:我的上一个答案基于最新的 Vagrant 版本。在 1.4.3 版本中,你不能以这种方式添加盒子,因为它与 Vagrantcloud 不兼容。相反,你需要手动指定盒子的 URL,如下所示:
$ vagrant box add "ffuenf/debian-6.0.9-amd64" https://vagrantcloud.com/ffuenf/debian-6.0.9-amd64/version/7/provider/virtualbox.box --provider virtualbox
你应该会看到以下内容:从 URL 下载盒子:https://vagrantcloud.com/ffuenf/debian-6.0.9-amd64/version/7/provider/virtualbox.box
正在提取盒子...te: 1591k/s,剩余时间估计为:0:00:02)
已成功添加了提供程序为“virtualbox”的盒子 'ffuenf/debian-6.0.9-amd64'!
我曾经为此苦恼了一段时间。关键是要获取最新版本的vagrant--在我写这篇文章时是1.7.4。我使用的下载链接是:https://www.vagrantup.com/downloads.html
我正在Mac OS X 10.7.5上运行MacBook Pro。为了下载ubuntu/trusty64,我访问了https://atlas.hashicorp.com/boxes/search?utm_source=vagrantcloud.com&vagrantcloud=1网站,该网站列出了当前可用的盒子。您可以通过描述搜索盒子。例如,输入“debian”作为搜索词返回一个列表。我选择了一个盒子并按照其页面上的说明进行操作(在我的情况下,页面是https://atlas.hashicorp.com/ubuntu/boxes/trusty64)。以下是我接下来的日志:
$ vagrant init ubuntu/trusty64
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
$ vagrant up --provider virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
default: URL: https://atlas.hashicorp.com/ubuntu/trusty64
==> default: Adding box 'ubuntu/trusty64' (v20150923.0.0) for provider: virtualbox
default: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20150923.0.0/providers/virtualbox.box
default: Progress: 56% (Rate: 111k/s, Estimated time remaining: 0:28:59)
使用以下方式添加框的URL:
vagrant box add "puppetlabs/ubuntu-14.04-32-puppet" https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-32-puppet/versions/1/providers/virtualbox.box --provider virtualbox
这不完全是你问题的答案,但我使用了:
vagrant box add precise32 http://files.vagrantup.com/precise32.box
然后只需在配置文件(Vagrantfile)中将ffuenf/debian-6.0.9-amd64名称更改为precise32。看起来它正在正常运行。可能有一个ffuenf的盒子文件,但我不知道。