Vagrant - Box (base image)

About

Vagrant uses a base image known as Box to quickly clone a virtual machine.

Each project uses a box as an initial image to clone from, and never modifies the actual base image.

Property

Qualified Name

the username and the box name - separated by a slash.

userName/boxName

Example:

hashicorp/precise64

where:

  • “hashicorp” is the userName
  • and the box is “precise64

Storage

The box are stored in under

VAGRANT_HOME\boxes

Command

add

command line

You can also add boxes from a local file, custom URL, etc.

vagrant box add userName/BoxName

Example

vagrant box add hashicorp/precise64

hashicorp/precise64 from HashiCorp's Atlas box catalog

Vagrantfile

Then in Vagrant - Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/precise64"
end

Remove

To physically remove the box file, you can use the vagrant box remove command

vagrant box remove

List

vagrant box list

Box Directory


Powered by ComboStrap