Vagrant/Boxes
From charlesreid1
This page covers how to create a virtual machine image that can be used with Vagrant (called a "vagrant box").
Vagrant Box from VirtualBox Image
To create a vagrant box from an existing virtualbox image:
- Create the virtualbox image
- Configure and set up the virtualbox image so it's ready to turn into a vagrant box
Now you can turn the virtualbox image into a vagrant box. Start by getting the name of the VirtualBox image you created (here, we'll assume it is mycoolimage:
# This base name should match the name in VirtualBox vagrant package --base mycoolbox
This will create a file named package.box in the current directory. This can be renamed:
mv package.box mycoolbox.box
Now add the box to the list of boxes that are available to vagrant with the vagrant box command:
vagrant box add mycoolbox mycoolbox.box ==Testing it out== To test out the new vagrant box: <pre> mkdir test && cd test vagrant init mycoolbox vagrant up vagrant ssh