Here's a step by step guide to convert a Virtualbox .ova to a Vagrant box.
- List your VMs to find the VM id you want to convert:
$ VBoxManage list vms
"testing" {a3f59eed-b9c5-4a5f-9977-187f8eb8c4d4}
- You can now package the .ova VM as Vagrant box:
$ vagrant package --base a3f59eed-b9c5-4a5f-9977-187f8eb8c4d4 --output name-of-your-box.box
the command vagrant package
runs for quite some time before it can creates a Vagrant box. Be faithful and wait.
- Add the new box to the list of local Vagrant boxes:
$ vagrant box add new-box-name name-of-your-box.box
- Init, up, ssh and start usign your Vagrant box:
$ vagrant init #Init the new box with a Vagrantfile
$ vagrant up
$ vagrant ssh
And enjoy!
The first command worked great, but now with:
vagrant box add new-box-name name-of-your-box.box
I'm getting an error. Do I need to include the path to the new box?