Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a vagrant box running on VirtualBox, and I need to make a copy (with all its existing config and data), so that I can make changes on it without affecting the original.

The problem is that my original box came as a file package - the internet connection where I'm working with is extremely slow so someone else copied their vagrant and virtualbox folders to my machine. Thus there is no


to use.

How can I accomplish this?

Edit: I am using Vagrant 1.2.2

share|improve this question
up vote 36 down vote accepted

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 by default

  • run vagrant box add foo to add 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: = "foo"

The new VM will spin up with the exact data that was present in the previous VM.

Vagrant Documentation

Additionally checkout a new product from the creators of Vagrant called Packer. It will do this same thing, but allow you to copy your vm's to other providers (Amazon, VirtualBox ect..)


Newer versions of Vagrant have two commands that make the above steps unnecessary.

vagrant share
vagrant package

Vagrant share will upload your box to atlas
Vagrant package will create a .box file automatically.

For more information, type in vagrant --help

share|improve this answer
Seems like a great way, but unfortunately I am using a different version of vagrant, while your commands seem to be for 1.0.x – xiankai Aug 23 '13 at 3:47
@xiankai I am running 1.2.2 and I have verified that these steps work for me. I made a few tweaks to my answer for clarity, give it another try and let me know what errors you get. – spuder Aug 23 '13 at 4:59
Ah, after looking at the link you posted, I tried vagrant package instead of vagrant box package and it seems like I'm on the right track now! – xiankai Aug 23 '13 at 8:36
vagrant package is correct. That was a typo on my part. – spuder Aug 23 '13 at 13:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .