Created
March 25, 2014 09:34
-
-
Save suplo/9758118 to your computer and use it in GitHub Desktop.
Clone vagrant box
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
Create a new box from your existing vm: | |
cd into the directory with your Vagrant file | |
run vagrant package This will export a box file called package.box by default | |
run vagrant box add foo package.box virtualbox to add package.box to your existing boxes. (Assuming you are using virtualbox and not VMWare) | |
run vagrant box list to verify it was added. | |
Now you can just create a new folder, run vagrant init as normal and set your box to the following: | |
config.vm.box = "foo" | |
The new VM will spin up with the exact data that was present in the previous VM. | |
Vagrant Documentation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Ever thought about making this a pull req as a separate command?
"vagrant clone vm1"?