Oracle Linux Vagrant boxes

I use Vagrant a lot. It is an awesome tool when it comes to quickly spin up a local VM for some testing.

All my boxes are stored on Hashicorp’s Vagrant Cloud.

I try to create one box per Oracle Linux release (starting with 6.5) and I create the box as soon as a new version is released. I use Packer to create the boxes, which makes it a really painless exercise. I’ll describe that process in later blog-post.

Vagrant supports Virtualbox by default but also a lot of other providers (VMware, AWS ec2 etc), and I build all my boxes for Virtualbox.

The boxes all come with the Oracle pre-req packages installed and a couple of other nice-to-have packages, Ansible among other things. I then usually use this to do the Oracle installations.

As for naming, I use the following standard: ol<releasenumber>
i.e: ol68, ol72 etc
In Vagrant Cloud, you can have different versions of a specific box, and I try to keep the version number to the date when the box was created (i.e 20170326). It makes it easy to see how up-to-date the specific box is. I usually don’t update a box unless there is something I’ve missed to add.

So how can you use these boxes?

Vagrant uses a ‘Vagrantfile’ to describe the VM you want to create (in terms of IP’s, number of cores, amount of RAM etc), and in its simplest form you can let Vagrant create that file for you by running the:
vagrant init <boxname> command. So if you wanted to create a VM with my latest ol73 box, you’d do this:

miksan-macbook-pro:vagrant miksan$ vagrant init oravirt/ol73
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
miksan-macbook-pro:vagrant miksan$ grep oravirt Vagrantfile

  config.vm.box = "oravirt/ol73" <-- This tells Vagrant which box to use

The above will not have any customizations in terms of cpu’s etc.
For more customized configurations I have 2 github repos containing Vagrant configurations for both a RAC config and a single instance config. I’ll go through them in more detail in a later blogpost.
They use 2 different ways of customizing the configuration, vbox-si uses an external file called hosts.yml where you specify the ip, name etc of the VM(s) you want to create.
Vbox-rac is based on the work Alvaro Miranda and I did for this, and in that case the customization is done in the actual Vagrantfile.

https://github.com/oravirt/vagrant-vbox-si
https://github.com/oravirt/vagrant-vbox-rac

Note:
https://github.com/oravirt/vagrant-vbox-si is deprecated and has been replaced by these 2 repositories:
https://github.com/oravirt/vagrant-vbox-si-fs
https://github.com/oravirt/vagrant-vbox-si-asm

 

 

These are the boxes I currently have available. They also include some Centos boxes.

Vagrant up!

Advertisements

4 thoughts on “Oracle Linux Vagrant boxes

  1. Pingback: Vagrant + Ansible + Oracle | oravirt

  2. Pingback: Using packer to build a Vagrant box | oravirt

  3. Hey Mikael,
    I’m currently trying to get vagrant-vbox-rac to work, and it currently fails after (partially?) setting up both VMs, because the script tries to start racnode-dc1-1 while racnode-dc1-2 is up (shared-crs, -data and -fra are already attached to both), and then this error occurs:
    Stderr: VBoxManage.exe: error: Locking of attached media failed. A possible reason is that one of the media is attached to a running VM.
    What else would you need to know to help me?
    Thank you for your time and effort,
    Arne

    • And again with the immediately obsolete comments. This time a better reason: after one vagrant destroy it worked! Thanks for the cool script!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s