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
  2. Create your vagrant box

    vagrant box add new_instance_name

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

Khash Sajadi

Khash is the founder and CEO of Cloud 66, a full stack container management as a service. Follow him on @khash

London, UK and San Francisco, US
Subscribe and get updates

Have feedback? Please get in touch @cloud66 on Twitter.

Everything you need to build, manage and maintain containers in production on your own servers and any cloud

Try Cloud 66 — 14 Days Free Trial, No credit card required