Getting my hands on a Virtual Machine with Oracle Database Enterprise Edition - 20-30 minutes from start to finish image2

Getting my hands on a Virtual Machine with Oracle Database Enterprise Edition – 20-30 minutes from start to finish

NOTE: even though the steps described in this article all work – I am running into a problem with shutting down and starting up the VM again. So at the present I can have the VM created and the database installed – however, I can not successfully restart it. I am not sure if it is my environment, the Base Box or something in the configuration files provided by Yasushi. Please tread carefully when going through the steps described below.

A short time ago, Oracle release Oracle Database 12c – release With a bunch of goodies that I would like to try out. This release can be downloaded from OTN: And subsequently I can create or clone a Virtual Machine, do the necessary preparations and run the installer. Nothing wrong with that of course. However, my recent work with Vagrant and Puppet has made me … more efficient or lazier – I am not sure what the best expression is. Anyways, things can be really simple with today’s tools and with friends on the internet who share their own goodies (and I do not want you to take that in the wrong and possibly funny way).

Let me be more specific: Yasushi YAMAZAKI from Tokio, Japan made his Vagrant/Docker configuration files available on GitHub that will stamp out the complete VirtualBox VM with Oracle Linux (6.5) and with a few manual steps (too bad about these…) Oracle Database 12c ( can be installed on it:

All I have to do to create the VM (since I have already installed Vagrant and VirtualBox locally – see this article for instructions on this very simple installation):

    • download the two database installation files from OTN
    • download Yasushi’s Git repository and extract the zip file to a local directory or (Git) clone the repository to that same local directory; let’s call it the VAGRANT_12_1_0_2_HOME for now.
    • optional: you may consider making a few small changes to the Vagrantfile, in particular add a line to assign an IP address that makes the VM accessible from the host or from other VMs and perhaps one or more shared folder definitions; my Vagrantfile now looks something like:
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# copied directly from vagrant init chef/centos-6.5 = "chef/centos-6.5"

config.vm.define "db12102" , primary: true do |db12102|

config.vm.hostname = ""
config.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777","fmode=777"]
config.vm.synced_folder "C:\\Users\\lucas_j\\Downloads", "/software"
config.vm.synced_folder "C:\\temp", "/host_temp" :private_network, ip: ""

# change memory size
config.vm.provider "virtualbox" do |v|
v.memory = 2048

# Oracle port forwarding "forwarded_port", guest: 11521, host: 21521

# run
config.vm.provision "shell", path: ""

  • create a subdirectory called database and extract the two download files from OTN to this directory VAGRANT_12_1_0_2_HOME
  • open a command line and navigate to directory VAGRANT_12_1_0_2_HOME
  • run: vagrant plugin install vagrant-vbguest
  • run: vagrant up
  • At this point, Vagrant takes over and starts to create the VM based on a Vagrant Box


After some time – between 10-30 minutes, depending on your environment – the VM is ready and running – without the database on it, but fully prepared to become the proud owner of a running Oracle Database


Manual Database installation

Now comes the “hard” part that requires some manual action:

 vagrant ssh

(to connect to the container; alternatively use Putty to open a session to the VM and login with vagrant/vagrant)


sudo docker run --privileged -h db12c -p 11521:1521 -t -i -v /vagrant:/vagrant yasushiyy/vagrant-docker-oracle12c /bin/bash


su - oracle


/vagrant/database/runInstaller -silent -showProgress -ignorePrereq -responseFile /vagrant/db_install.rsp






su - oracle
netca -silent -responseFile $ORACLE_HOME/assistants/netca/netca.rsp


dbca -silent -createDatabase -responseFile /vagrant/dbca.rsp


sqlplus system/oracle@localhost:1521/orcl


So we are in business: not only is the VM up and running, it now also has a running database inside – SYS and SYSTEM are set up with password ORACLE. De SID is orcl. The database port is 1521.


  1. Coco Steinbrück (@corocoton) September 25, 2015
  2. Coco Steinbrück (@corocoton) September 10, 2015