Thursday, August 2nd, 2012

Running Oracle VM Templates on Oracle Linux guide (Part 3 of 6)

In part 3, we will be installing Oracle Linux. We are using Oracle Linux 5.8. When we have installed the Linux version, we will be configurating this image, and make a clone of it. This way we have a backup to take when the installation fails, you get stuck, or whatever reason you can think of. We will also use the clone to install our tools server. This way we don’t need to install two seperate Linux versions.

Index of my blog series.

  1. Prerequisites before starting the guide.
  2. Installing Virtualbox and Converting the OVM Templates.
  3. Installing Oracle Linux for OVM. (Based on this blog from Hakan Biroglu)
  4. Installing and configurating the HCM database.
  5. Installing and configuring PeopleTools. (application server, web server and process scheduler)
  6. Installing and configuring PeopleTools on your windows client.


We start by opening our Oracle VM VirtualBox Manager. Next we press the New button to start making our virtual machine. The Create New Virtual Machine Wizard will start. Press the next button.

We can now choose our OS and version. Name the virtual Machine HCMDB91. Select Linux as operating system and Oracle Linux (64-bits) as the version.

Press Next and choose the amount of RAM memory you want to give the machine. The machine needs 2048MB as a minimum. I give my machine 3072MB. Since we need to run two virtual machines, don’t overdo it and give the machine too much ram, if you don’t have it! The amount is just for one machine, so multiply it by two to see the Total amount we need for both machines.

Click next and we can choose what kind of Virtual hard Disk we want. We create a Start-up Disk, and choose Create new hard disk. Press Next.

Now we will choose which type of hard disk we want. Choose VDI and press next. Next we will choose to Dynamically allocate the memory of our hard disk. This way we will not take up too much space on our hard drive, since the size of the drive grows as we continue.

Press next and set the hard disk size to 12GB.

Before continuing, we need to set the folder where we want to place the image. Press the folder button, and navigate to our IMAGES\HCMDB folder.

Now press save. Check in our screen if the file location is correct, and press next.

This will display a summary screen. Check the settings, and press create to make our virtual machine. Now that we have created our virtual machine. We will start it. Select the machine in the list and press start.

This will start the First Run Wizard. Press next on the First screen. Now we can select our installation media.

Press the folder button and navigate to our Images\OL5.8 folder and select the V31120-01.iso file.

This is the OL5.8 cd image. Press next to show the summary screen. Press start to continue. Now our virtual machine will start and show the Oracle Linux boot screen.

Press enter to install in graphical mode. At this moment the virtual machine takes control of your mouse and keyboard and these will be ‘trapped’ within the virtual machine. To release your mouse and keyboard from the virtual machine hit right control key on your keyboard. Now you can manage your host again. To go back to managing the virtual machine click somewhere on the virtual machine. This will trap your mouse and keyboard again within the virtual machine.

The virtual machine will launch a screen like below, select skip and press enter. Use the arrow keys to navigate to the skip button. The installer will now start.

In the installer, press the Next button. Choose the language you want to use during the installation. I always use english.

Press next to continue. Select U.S. English as our keyboard type. Usually this is all default and we can just press next to continue. When we press next, a warning will pop-up. Select Yes and continue. This will format your virtual hard drive.

Now we can select the partitioning. I leave this at default and continue.

We will recieve another warning message. Press Yes to continue.

This will bring up the networking screen. This time we need to do something. We want to manually set the hostname.  Select the manually radio button, and give the virtual machine a hostname. I set it to This is the name we will use to reach our virtual machine when we have installed everything. We will set the name of our Tools virtual machine manually later on.

Next select the region where you live to set the time zone. Press Next.

We need to set our root password now. This password is used to login as root user, so remember it well!

Press next to continue, now we can select the packages we want to install. Choose Customize now, and press next to choose all development packages we will need to install the oracle environment.

On the next screen select Development in the left pane and check Development Libraries.

Click on Optional packages and select library libstc++44-devel and click on Close.

Now check Development Tools in the right pane and select all gcc libs and lmake lib.

Now select Base System from the left pane and check System Tools from  the right pane. Click on Optional packages.

In the list of packages select oracle-validated package. This package will create a Linux user oracle and will create necessary Linux groups. This package will also set Linux kernel parameters needed for Oracle installations. This will save us a lot of time.

Press close and then next now press next to begin the installation of Oracle linux Server.  After the installation completed successfully, press reboot to restart our machine. After rebooting, a first time wizard will show. On the welcome screen, press Forward. The license agreement will show. Accept the agreement and click forward. This will give us the firewall settings. To make everything easier, I disable the firewall. Normally in a production environment, you would not do this. Since we are installing a demo environment for ourselves, we can work without the firewall. Set the firewall to disabled and press forward.

Now we can set the SELinux settings. Set this to Permissive.

Press forward to continue. Disable the kdump settings. Press forward and synchronise your system clock.

Press forward to see the user creation screen. Since the oracle-validated package already created the oracle user, we do not need to create another user. Click forward. If a warning pops-up, like below, press continue.

Press forward twice, we don’t need to do anything in the sound card and additional cd’s screens. Click finish to complete our installation. The system will now reboot and you will see the login screen. Since we first need to add another network adapter, shut down the machine.

We will now add another network adapter. We will have one adapter set to host-only. This is the easiest way to communicate with your home network. The other adapter will be set to NAT, this will provide internet access. In our virtualbox manager, click settings. Select network and go to the Adapter 1 tab. Set this network adapter to host only.

Go to the Adapter 2 tab and select ‘Enable Network Adapter’. In the Attached to dropdown box, select NAT. Press OK to set the network adapters.

Start the machine again. Log in as Root now.

When logged in, we will prepare our virtual machine to install the oracle database. First we need to install the Guest Additions. press the right control to leave our virtual machine. Select Devices -> Install Guest Additions to install the Oracle VM Guest additions.

After installing these, the virtual machine will no longer ‘’grab’’ our mouse, and we can use the copy paste function. After selecting the Guest Additions, Start a Terminal session. You can get the terminal from Applications -> Accessories  -> Terminal.

Before using commands in the terminal, I want to explain a very useful function. The TAB-key. The TAB-Key helps us complete commands,  so we don’t have to type everything ourselves. I will explain this once when we cd to our VBOXADDITIONS media location, once you get the hang of using it, you will see its very useful! (or just copy/paste the commands after installing the guest additions).

First we need to update our installation.

Use these commands  ‘cd /etc/yum.repos.d’
then ‘ wget ’.

This will download the yum repository on your machine

After this, use the

‘yum update’

command, and press Y to every question asked. When the updating is done, reboot the system. (

System -> shut down -> Reboot, or the command: ‘shutdown -r now’

). After the reboot, we will install the guest additions.
In the terminal, type CD /media/VB (press tab now to auto-complete the command to media). Press enter now and we are in the Guest additions folder.

Use the sh ./ command to install the virtualbox guest additions.

Sometimes I get this error;

Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.
The missing package can be probably installed with
yum install kernel-uek-devel-2.6.32-300.25.1.el5uek
Building the main Guest Additions module                   [FAILED]

Copy the yum install line, and install this package (note, package version might be different on your system). Then run the installer again. After installing, use the ‘shutdown now’ command to shutdown the system. Now the mouse won’t be grabbed by the machine anymore. And you can just copy/paste the commands I write into your machine :).

Next, shut down the machine, go to settings and then go to the storage panel. Select the SATA Controller, and press the Add Hard disk button.

The following screen will pop-up. Make sure you are adding something to the SATA Controller, and choose Existing Disk.







Navigate to our IMAGES\HCMDB folder, and select the System.vdi file. Press Open.

We will now see the system disk has been added to our machine. Press ok.

Start our virtual machine again and login as root. We do our final steps, before we can clone this machine. First open a terminal. We will need to fake some OVM infrastructure things, since we are not actually running an OVM server. Use the

mkdir -p /usr/lib/oraclevm-template

command to create a oraclevm directory.

Create and edit the file with the

vi /usr/lib/oraclevm-template/functions

This for more info on the VI command, please visit this site

ovm_info() {

echo "INFO: $1"


ovm_log() {
echo $1


ovm_warn() {
echo "WARN: $1"


ovm_error() {
echo "ERROR: $1"


Paste in the above, and save the file. This file will catch some errors the coming scripts might generate, and think we are actually working on an OVM environment.

Next we will create the users we need.

groupadd -g 505 oracle
groupadd -g 506 appinst
useradd -u 505 -g oracle -G appinst psadm1
useradd -u 506 -g oracle psadm2
useradd -u 507 -g appinst psadm3

To keep things easy, we will not configure any passwords for the users for now.  Create a temporary directory under /media for mounting the original OVM OS disk and then mount it. We will use this to copy a few files. While you are at it, create the destination folder for the files to copy:

mkdir -p /media/tmp
mkdir -p /opt/oracle/psft/
mount /dev/sdb2 /media/tmp 
cp -R --preserve=all /media/tmp/opt/oracle/psft/vm /opt/oracle/psft/

Shut down the Virtual machine, and remove the System.vdi file from the storage tab.

Next, we are done with our initial setup. We are going to clone the Linux VM so we have a configured environment for our Tools installation. In the VBoxManager, go to Machine -> Clone.

Change to name of the new virtual machine to HCMPT91.

In the cloning configuration screen, choose Full Clone. Press Clone to start the process.







The cloning process will put our clone in a standard folder. But since we don’t want that, we need to move the virtual machine to our Images\HCMPT folder. First, we need to find the location where the virtual machine was saved. Open the Virtual Media manager in the File Menu.









Select the HCMPT91.vdi image, and see the location where it is stored.

Go to this location, and cut and paste the .vdi file into our images\hcmpt folder. We only need to cut and paste the .vdi file, the other files can remain in this directory.  After the cut&paste, go back to the virtual media manager, and press the refresh button. You will see a warning sign before the HCMPT91.vdi file. Select it, press release. This will release the image. Press ok if we see a warning.

Now right click the HCMPT91.vdi file, and press the remove action. After this, close the screen

Select the HCMPT91 machine, and go to settings. Go to the storage tab.  In the SATA Controller, add a virtual hard drive. Choose an existing disk, like we did before. Go to the images\hcmpt location, and select the HCMPT91.vdi file. Press open and the file should be back again.

Press ok and we are ready to install the Oracle database on our HCMDB91 machine.

Next time we will set-up the database!

 Viewed 1724 times by 529 visitors

Category: Technical
You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

4 Responses (last comment shown first)

September 11, 2012

Great, thanks. Feel a little silly about that, but I am not a deep techie and this tutorial is incredibly thorough. Definitely setting the standard for my future consultants.

[Reply to this comment]

September 9, 2012

Note: I entered “Tab Key” after /opt/med. This did not appear in the comment above because I used HTML brackets around TAB in my original comment.

[Reply to this comment]

September 9, 2012

I am stuck at the Guest Additions step. I have rebooted the linux machine, however, when I go back into the terminal and try the following command:

cd /opt/med

nothing happens. From what I have read, it should complete a file path for me. So if I hit enter after this, I get bash: cd: /opt/med no such file or directory

If i try a capital CD instead of cd I get bash: CD: command not found.

[Reply to this comment]


Wijnand Gritter Reply:


This was a typo. Use cd /media/VBOX and then try the TAB key. It should not be /opt/med, but just /med.


[Reply to this comment]