Last active
September 23, 2021 11:56
-
-
Save dasgoll/ec783b996b93d0caea4f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the 'repackage' command creates a distributable box file from the unpacked box in your ~/.vagrant.d/boxes directory. | |
Let's say you "vagrant box add" a box named centos.box from an URL | |
vagrant will extract centos.box in your vagrant home folder (the box format is just a tar file) | |
in my case ~/.vagrant.d/boxes/centos | |
In that folder you will see files like : | |
[root@goll tmp]# ls ~/.vagrant.d/boxes/centos65/0/virtualbox/ | |
box-disk1.vmdk box.ovf metadata.json Vagrantfile | |
say that you deleted this centos_x86_64.box, and no longer have it. | |
When you run "vagrant box repackage centos65 virtualbox 0" | |
vagrant will create a new tar file in the current directory named package.box containing those 3 files. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This still doesn't explain the difference between:
vagrant package --base NAME --output NAME
&
vagrant box repackage NAME PROVIDER VERSION
P.S. I am searching for more info on the subject and the diff, if any.