在哪里下载 vagrant boxes

在哪里下载 vagrant boxes

我知道http://www.vagrantbox.es/提供了很多vagrant boxes供我们使用,但是我发现很多他们的url下载地址已经过时了。vagrantcloud.com或者https://atlas.hashicorp.com/boxes/search对我来说是替代方案。但是当我运行时,vagrant up ubuntu/trusty64 --provider virtualbox我得到了这个:

sean@apptest:~$ vagrant up ubuntu/trusty64 --provider virtualbox
A Vagrant environment or target machine is required to run this
command. Run `vagrant init` to create a new Vagrant environment. Or,
get an ID of a target machine from `vagrant global-status` to run
this command on. A final option is to change to a directory with a
Vagrantfile and to try again.

sean@apptest:~$ vagrant global-status
id       name   provider state  directory                           
--------------------------------------------------------------------
There are no active Vagrant environments on this computer! Or,
you haven't destroyed and recreated Vagrant environments that were
started with an older version of Vagrant.

sean@apptest:~$ vagrant init
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.

sean@apptest:~$ vagrant up ubuntu/trusty64 --provider virtualbox
The machine with the name 'ubuntu/trusty64' was not found configured for
this Vagrant environment.

似乎我无法从网上下载 vagrant up 一个 box。但我没有找到下载地址https://atlas.hashicorp.com/ubuntu/boxes/trusty64还有没有更好的方法来获得这些盒子?

如果我想下载https://atlas.hashicorp.com/laravel/boxes/homesteadv0.2.3 ?

谢谢〜

答案1

感谢@jordanm,问题解决了。在一个干净的目录中(没有Vagrantfile): vagrant init ubuntu/trusty64

然后运行vagrant up --provider virtualbox。这将导致搜索框来自https://atlas.hashicorp.com/search/boxes

或者直接跑vagrant box add ubuntu/trusty64

如果你想下载 box 文件,你可以看到 box 所在的完整 url 地址

相关内容