Sha256: d4845aa41f8c8b70959d4a3d1690ef349a163e746845b5161d0a35382afa8c41

Contents?: true

Size: 1.76 KB

Versions: 15

Compression:

Stored size: 1.76 KB

Contents

---
layout: "docs"
page_title: "vagrant package - Command-Line Interface"
sidebar_current: "cli-package"
description: |-
  The "vagrant package" command is used to package a currently-running
  VirtualBox or Hyper-V vagrant environment into a reusable Vagrant box.
---

# Package

**Command: `vagrant package [name|id]`**

This packages a currently running _VirtualBox_ or _Hyper-V_ environment into a
re-usable [box](/docs/boxes.html). This command can only be used with
other [providers](/docs/providers/) based on the provider implementation
and if the provider supports it.

## Options

* `--base NAME` - Instead of packaging a VirtualBox machine that Vagrant
  manages, this will package a VirtualBox machine that VirtualBox manages.
  `NAME` should be the name or UUID of the machine from the VirtualBox GUI.
  Currently this option is only available for VirtualBox.

* `--output NAME` - The resulting package will be saved as `NAME`. By default,
  it will be saved as `package.box`.

* `--include x,y,z` - Additional files will be packaged with the box. These
  can be used by a packaged Vagrantfile (documented below) to perform additional
  tasks.

* `--vagrantfile FILE` - Packages a Vagrantfile with the box, that is loaded
  as part of the [Vagrantfile load order](/docs/vagrantfile/#load-order)
  when the resulting box is used.

<div class="alert alert-info">
  <strong>A common misconception</strong> is that the <code>--vagrantfile</code>
  option will package a Vagrantfile that is used when <code>vagrant init</code>
  is used with this box. This is not the case. Instead, a Vagrantfile
  is loaded and read as part of the Vagrant load process when the box is
  used. For more information, read about the
  <a href="/docs/vagrantfile/#load-order">Vagrantfile load order</a>.
</div>

Version data entries

15 entries across 11 versions & 3 rubygems

Version Path
vagrant-packet-0.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/website/source/docs/cli/package.html.md
vagrant-packet-0.1.2 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/website/source/docs/cli/package.html.md
vagrant-packet-0.1.2 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/website/source/docs/cli/package.html.md
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/website/source/docs/cli/package.html.md
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/website/source/docs/cli/package.html.md
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/website/source/docs/cli/package.html.md
vagrant-aws-detiber-0.7.2.pre.4 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/website/source/docs/cli/package.html.md
vagrant-aws-detiber-0.7.2.pre.3 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/website/source/docs/cli/package.html.md
vagrant-aws-detiber-0.7.2.pre.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/website/source/docs/cli/package.html.md
vagrant-aws-mkubenka-0.7.2.pre.22 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-f3fdbf414272/website/source/docs/cli/package.html.md
vagrant-aws-mkubenka-0.7.2.pre.16 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-1ee58c40e3f5/website/source/docs/cli/package.html.md
vagrant-aws-mkubenka-0.7.2.pre.14 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/website/source/docs/cli/package.html.md
vagrant-aws-mkubenka-0.7.2.pre.11 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/website/source/docs/cli/package.html.md
vagrant-aws-mkubenka-0.7.2.pre.10 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/website/source/docs/cli/package.html.md
vagrant-aws-mkubenka-0.7.2.pre.9 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/website/source/docs/cli/package.html.md