Thursday, November 14, 2013

Building a custom Vagrant box with Parallels Desktop as the Vagrant Provider

I recently needed to build myself an ubuntu 12.04-lts (amd64) vagrant box that would work in parallels. The problem was that the vagrant-parallels plugin does not provide you that box, and there is very little  information on how to build one yourself. (note - that link is not up to date).

The link above got me part way there, but I found that I did not need to install the parallels SDK or do any voodoo restarts.

The idea is the same though, use veewee to build the vagrant-parallels box. Unfortunately veewee does not have very good docs about how to do this.

The solution was to modify the veewee 'ubuntu 12.04-lts' definition and to replace the setup with a setup which I found elsewhere.

So here is how you can build a vagrant parallels ubuntu server box:


vagrant plugin install vagrant-parallels
sudo gem install veewee
bundle exec veewee parallels define 'ubuntu-12.04-lts' ''
bundle exec veewee parallels build 'ubuntu-12.04-lts'  --workdir=.
bundle exec veewee parallels export 'ubuntu-12.04-lts' --workdir=.
Now you have a vagrant parallels box.
To import it into vagrant type:
vagrant box add 'ubuntu' './'
To use it:
vagrant init 'ubuntu'
vagrant up --provider=parallels
vagrant ssh

Updates to this process may be found on my github page for this: