2013-09-03 18:08:28 +00:00
|
|
|
---
|
2013-09-06 16:50:43 +00:00
|
|
|
page_title: "vagrant box - Command-Line Interface"
|
2013-09-03 18:08:28 +00:00
|
|
|
sidebar_current: "cli-box"
|
|
|
|
---
|
|
|
|
|
|
|
|
# Box
|
|
|
|
|
|
|
|
**Command: `vagrant box`**
|
|
|
|
|
2013-09-15 23:48:22 +00:00
|
|
|
This is the command used to manage (add, remove, etc.) [boxes](/v2/boxes.html).
|
2013-09-03 18:08:28 +00:00
|
|
|
|
|
|
|
The main functionality of this command is exposed via even more subcommands:
|
|
|
|
|
|
|
|
* `add`
|
|
|
|
* `list`
|
|
|
|
* `remove`
|
|
|
|
* `repackage`
|
|
|
|
|
|
|
|
# Box Add
|
|
|
|
|
|
|
|
**Command: `vagrant box add NAME URL`**
|
|
|
|
|
2013-09-03 18:59:49 +00:00
|
|
|
This adds a box at the given URL to Vagrant and stores it under the
|
2013-09-03 18:08:28 +00:00
|
|
|
logical name `NAME`.
|
|
|
|
|
|
|
|
The URL may be a file path or an HTTP URL. For HTTP, basic authentication
|
|
|
|
is supported and `http_proxy` environmental variables are respected. HTTPS
|
|
|
|
is also supported.
|
|
|
|
|
|
|
|
The name argument of this command is a _logical name_, meaning you can
|
|
|
|
effectively choose whatever you want. This is the name that Vagrant searches
|
|
|
|
for to match with the `config.vm.box` setting in Vagrantfiles.
|
|
|
|
|
2013-11-24 00:00:43 +00:00
|
|
|
If an error occurs during the download or the download is interrupted with
|
|
|
|
a Ctrl-C, then Vagrant will attempt to resume the download the next time it
|
|
|
|
is requested. Vagrant will only attempt to resume a download for six hours
|
|
|
|
after the initial download.
|
|
|
|
|
2013-09-03 18:08:28 +00:00
|
|
|
## Options
|
|
|
|
|
2013-11-24 00:00:43 +00:00
|
|
|
* `--clean` - If given, Vagrant will remove any old temporary files from
|
|
|
|
prior downloads of the same URL. This is useful if you don't want Vagrant
|
|
|
|
to resume a download from a previous point, perhaps because the contents
|
|
|
|
changed.
|
|
|
|
|
|
|
|
* `--force` - When present, the box will be downloaded and overwrite any
|
|
|
|
existing box with this name.
|
|
|
|
|
|
|
|
* `--insecure` - When present, SSL certificates won't be verified if the
|
|
|
|
URL is an HTTPS URL.
|
|
|
|
|
2013-09-03 18:08:28 +00:00
|
|
|
* `--provider PROVIDER` - If given, Vagrant will verify the box you're
|
|
|
|
adding is for the given provider. By default, Vagrant automatically
|
|
|
|
detects the proper provider to use.
|
|
|
|
|
|
|
|
# Box List
|
|
|
|
|
|
|
|
**Command: `vagrant box list`**
|
|
|
|
|
|
|
|
This command lists all the boxes that are installed into Vagrant.
|
|
|
|
|
|
|
|
# Box Remove
|
|
|
|
|
|
|
|
**Command: `vagrant box remove NAME PROVIDER`**
|
|
|
|
|
|
|
|
This command removes a box from Vagrant that matches the given name and
|
|
|
|
provider.
|
|
|
|
|
|
|
|
# Box Repackage
|
|
|
|
|
|
|
|
**Command: `vagrant box repackage NAME PROVIDER`**
|
|
|
|
|
|
|
|
This command repackages the given box and puts it in the current
|
|
|
|
directory so you can redistribute it.
|
|
|
|
|
|
|
|
When you add a box, Vagrant unpacks it and stores it internally. The
|
|
|
|
original `*.box` file is not preserved. This command is useful for
|
|
|
|
reclaiming a `*.box` file from an installed Vagrant box.
|