blob: c64962d61edc8bb6dbeb647d7d457b444ebee562 (
plain)
1
2
3
4
5
6
7
8
9
10
|
<h1 id="package"> Package </h1> <p><strong>Command: <code>vagrant package [name|id]</code></strong></p> <p>This packages a currently running <em>VirtualBox</em> or <em>Hyper-V</em> environment into a re-usable <a href="../boxes">box</a>. This command can only be used with other <a href="../providers/index">providers</a> based on the provider implementation and if the provider supports it.</p> <h2 id="options"> Options </h2> <ul> <li>
<p><a href="#base-name"><code>--base NAME</code></a> - Instead of packaging a VirtualBox machine that Vagrant manages, this will package a VirtualBox machine that VirtualBox manages. <code>NAME</code> should be the name or UUID of the machine from the VirtualBox GUI. Currently this option is only available for VirtualBox.</p> </li> <li>
<p><a href="#output-name"><code>--output NAME</code></a> - The resulting package will be saved as <code>NAME</code>. By default, it will be saved as <code>package.box</code>.</p> </li> <li>
<p><a href="#include-x-y-z"><code>--include x,y,z</code></a> - Additional files will be packaged with the box. These can be used by a packaged Vagrantfile (documented below) to perform additional tasks.</p> </li> <li>
<p><a href="#vagrantfile-file"><code>--vagrantfile FILE</code></a> - Packages a Vagrantfile with the box, that is loaded as part of the <a href="../vagrantfile/index#load-order">Vagrantfile load order</a> when the resulting box is used.</p> </li> </ul> <blockquote class="alert alert-info"> <p><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="../vagrantfile/index#load-order">Vagrantfile load order</a>.</p> </blockquote><div class="_attribution">
<p class="_attribution-p">
© 2010–2018 Mitchell Hashimoto<br>Licensed under the MPL 2.0 License.<br>
<a href="https://www.vagrantup.com/docs/cli/package.html" class="_attribution-link">https://www.vagrantup.com/docs/cli/package.html</a>
</p>
</div>
|