Solaris 11.2 in Vagrant
11 Jan 2016Vagrant is a tool used to create local development environments as quickly as possible, helping eliminate the “works on my machine” bug. It’s also great to test configuration management code, like Ansible and Puppet. You can read more about it here.
In this post, I want to describe the minor tweaks I make to create an Oracle Solaris 11.2 Vagrant box, following as base the instructions in this Engine Yard blog post.
First of all, I did this because the only Solaris 11 box at Atlas (Vagrant’s best box repository) is broken, leaving with no option but to create my own. If you want to test it right now, just grab a terminal and type this:
This will download the box, create a Vagrant file, power up the VM and log into it.
Minor Tweaks
In Solaris, the default home user folder is /export/home/%u
. So, the Vagrant’s unsecure key should go there.
VirtualBox Guest Additions was installed manually, following the documentation.
During the package process, Vagrant did not like the sed
binary from Oracle (it has no -i flag, responsible for edit files in place). To fix this, I created a new $PATH entry in both root and vagrant .profile
user file, putting the GNU binaries before, as follows:
And this is it. After packing and uploading to Atlas, we now have a working Oracle Solaris 11 box ready to use.