Saving and sharing changes made to Vagrant box

As already answered, vagrant package creates a new base box out of an existing VM.

Anyway "the Vagrant way" is to use and share a Vagrantfile with provisioners. This way the installation of the software is repeatable. The downside is that initial vagrant up takes longer while it installs all the software, but on the other hand the shared base box is smaller. Depends on your use case what is the best.

If you choose to share a pre-installed image you can still benefit from automated provisioning using e.g. Packer to build the box.


After making your changes, use vagrant package in the directory with the Vagrantfile. It will shut the machine down and start saving it to a file.

You'll end up with a boxfile in that directory that you can share.

Tags:

Vagrant