Vagrant setup to install a Oracle single instance database on filesystem
Ruby Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Vagrantfile New Vagrantfile & lots of other changes May 20, 2018


Vagrant setup to install an Oracle single instance database on filesystem.

The provisioning step of this vagrant solution is:

Getting started


Clone this repository: git clone --recursive

cd vagrant-vbox-si-fs

Edit the hosts.yml file if you want to change the ip, number of cpu's, amount of RAM etc.

If you want to use a different version or Oracle Linux, change the parameter box: oravirt/ol75 to one of the following:

  • oravirt/ol74
  • oravirt/ol73
  • oravirt/ol72
  • oravirt/ol69
  • oravirt/ol68
  • oravirt/ol67
  • oravirt/ol65

These boxes are prepared with all Oracle pre-req packages installed

Download the Oracle binaries (see below) and place them in the swrepo directory. Alternatively, if you already have a directory where all Oracle binaries are located, change the synced_folders: src to point to your local directory (/Users/xxx/Downloads/oracle)

And then: setup=true vagrant up. If you're on Windows you can do:

set setup=True
vagrant up

This will (by default):

  • create a VM based on Oracle Linux 7.5
  • create a 12.2 container database called orclcdb
  • create a pdb called orclpdb1
  • sys/system passwords are Oracle_123
  • A tablespace called appuser1_data is created in the pdb
  • A user called appuser1 is created in the pdb
  • A service called app1_service is created in the pdb

If you just want to create the machine, and not run the provisioning step run this:

vagrant up

Modifying the filesystems on the host

The VM configures 2 filesystems (u01/ & /u02). /u01 uses ext4 as the filesystem & /u02 uses xfs by default. If you'd want to change either of these, do the follwing:

  • edit the ansible-oracle/group_vars/vbox-si-fs/vbox-si-fs.yml file
  • Under host_fs_layout change the fstype parameter to ext4/xfs/btrfs.

Modifying the Oracle installation

If you want to install a different version of Oracle, edit the ansible-oracle/group_vars/vbox-si-fs/databases.yml file and change the following:

Under oracle_databases, change the parameter oracle_version_db: to one of the following:


If you want to change other parameters they're all under oracle_databases.

Adding more ORACLE_HOMES, or databases to an existing home

If you want to install more than 1 ORACLE_HOME (using different version etc), just uncomment the part that is commented in ansible-oracle/group_vars/vbox-si-fs/databases.yml.

It is also possible to add more homes & databases than those already configured.

After you've done the changes, run vagrant provision again, and it will install the new home and/or create the database.

Logging in to the VM

To log on to the VM (ssh), you have the following options:

  • run vagrant ssh from within the directory, then sudo to oracle/root
  • ssh to VM using the ssh binary of your choice, i.e: ssh -l oracle (oracle/oracle, root/root). The oracle user also have sudo rights

For each database created there is a /home/oracle/.profile_<dbname> created which have all the environment variables set up for this particular database.

These are the Oracle binaries that should be used.