Saving your Vagrant changes

Getting boxes Vagrant boxes fired up is great! But what to do when you want to make a change to the base box itself? You want to install a particular version of ruby, and don’t want to run the install every time you fire up the box for instance.

Luckily this is really easy too. Just fire up your Vagrant box, SSH onto it, make your changes, then exit the SSH session.

From your Vagrant root folder:

  1. Package up your vagrant instance

    vagrant package existing_instance_name --output new_instance_name.box
    
  2. Create your vagrant box

    vagrant box add new_instance_name new_instance_name.box
    

Optionally, you can then add this new instance to your Vagrantfile, and viola! You’re ready to fire up your amended instances!

Try Cloud 66 for Free, No credit card required