» Boxes
Boxes are the package format for Vagrant environments. A box can be used byanyone on any platform that Vagrant supports to bring up an identicalworking environment.
The vagrant box
utility provides all the functionality for managingboxes. You can read the documentation on the vagrant boxcommand for more information.
The easiest way to use a box is to add a box from thepublicly available catalog of Vagrant boxes.You can also add and share your own customized boxes on this website.
Boxes also support versioning so that members of your team using Vagrantcan update the underlying box easily, and the people who create boxescan push fixes and communicate these fixes efficiently.
You can learn all about boxes by reading this page as well as thesub-pages in the navigation to the left.
» Discovering Boxes
The easiest way to find boxes is to look on thepublic Vagrant box catalogfor a box matching your use case. The catalog contains most major operatingsystems as bases, as well as specialized boxes to get you up and runningquickly with LAMP stacks, Ruby, Python, etc.
The boxes on the public catalog work with many differentproviders. Whether you are using Vagrant withVirtualBox, VMware, AWS, etc. you should be able to find a box you need.
Adding a box from the catalog is very easy. Each box shows you instructionswith how to add it, but they all follow the same format:
$ vagrant box add USER/BOX
For example: vagrant box add hashicorp/precise64
. You can also quicklyinitialize a Vagrant environment with vagrant init hashicorp/precise64
.
Namespaces do not guarantee canonical boxes! A common misconception isthat a namespace like "ubuntu" represents the canonical space for Ubuntu boxes.This is untrue. Namespaces on Vagrant Cloud behave very similarly to namespaces onGitHub, for example. Just as GitHub's support team is unable to assist withissues in someone's repository, HashiCorp's support team is unable to assistwith third-party published boxes.
» Official Boxes
HashiCorp (the makers of Vagrant) publish a basic Ubuntu 12.04 (32 and 64-bit) box that is available for minimal use cases. It is highly optimized, small in size, and includes support for Virtualbox and VMware. You can use it like this:
$ vagrant init hashicorp/precise64
or you can update your Vagrantfile
as follows:
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise64"
end
For other users, we recommend the Bento boxes. The Bento boxes are open source and built for a number of providers including VMware, Virtualbox, and Parallels. There are a variety of operating systems and versions available.
These are the only two officially-recommended box sets.
It is often a point of confusion, but Canonical (the company that makes the Ubuntu operating system) publishes boxes under the "ubuntu" namespace on Vagrant Cloud. These boxes only support Virtualbox and do not provide an ideal experience for most users. If you encounter issues with these boxes, please try the Bento boxes instead.