Installing Oracle VM Manager 3.0.1 under Dom0 host

Sep 6, 2011 / By Yury Velikanov

Tags: , ,

NOTE: 2012.02.09. For the 3.0.3 version’s installation instructions please refer to the post here.

Oracle just released Oracle VM 3. I am sure that there are many Oracle Infrastructure related professionals who would like to install it in their test environments and start evaluating the product. The problem is beside of the Oracle VM Server you need an Oracle VM Manager. Oracle VM Manager provides management interface for managing one or several Oracle VM servers. It appears that Oracle VM Manager requires a separate host with at least 6GB of RAM just to get it installed. In this post I explain how you can install both Oracle VM Server 3 and Oracle VM Manager 3 allocating to both components just 1GB of RAM on the same logical server (Dom0).

In this post:

  • Why
  • How
  • Details
  • Other Hints

NOTE: If you are not interested in any “hacking” :) and just want to install the Oracle VM 3 in the supported and correct way then I would suggest you to have a read Tim Hall’s post “Oracle VM (3.0.1) Installation“. He covers the standard installation process in great details.

Why?

One of the first questions the reader would have is “Why on earth anyone should implement unsupported and highly unrecommended Oracle VM 3 configuration?”.

NOTE: For those of you who are not very familiar with Oracle VM terminology I would suggest you have a brief review of the “Introduction to Oracle VM” chapter from Oracle® VM User’s Guide Release 3.0 for x86.

Well for a production configuration you probably (definitely) shouldn’t do anything like this. However if you are like me – a researcher who doesn’t have the luxury of dedicating a server with 24 GB and more RAM for your sandbox then you may consider implementing Oracle VM Manager 3.0.1 (OVMM3) under Dom0 host for the following reasons:

  • According to specification you need at least 5.5GB for just OVMM3 + OS memory. In the configuration I am describing in this blog post you need 1GB for Oracle VM 3 Server (OVM3) and OVMM3 all together. It is much “cheaper” to run it that way. You may use 5.5GB+ saved RAM for additional Virtual Machine to play with.
  • Oracle suggests executing OVMM3 on a separate server or on Virtual Machine (VM) running on your laptop.
    Option 1 means you need to have another sandbox for running OVMM3 and therefore will increase your research budget twice. Option 2 will not allow you to share the OVM management infrastructure with your team (anyone else) as you will carry it with you all the time. In addition that means that you will need to dedicate 5.5GB+ RAM to the OVMM3 VM. I don’t believe that many of us have a laptop with 12GB RAM. The option described below allows you to make the management infrastructure available for all your team + save your laptop resources.
  • Someone would say you can run OVMM3 on a Guest VM running under the same OVM. This is true. However a) it will be more hassle to implement it b) running OVMM3 on the Dom0 host will save you additional resources compared to dedicating a separate domU for running OVMM3.

Not sure if I convinced you that this option have rights for existence. In any case it works for me and the description bellow may give you hints on how you can adjust memory configuration in Oracle VM 3 case.

Prerequisites

  • Oracle VM Server 3.0.1 installed on x86-64bit box with 2GB+ RAM. You can get the installation here (177MB). The installation is straight forward and there is nothing exiting about it. You just burn a CD from ISO image and boot your box from that CD
  • Oracle VM Manager 3.0.1 ISO image file (2.4GB) on the server or burned DVD from that image (I transferred ISO image to the Dom0 host)
  • bc-1.06-21.x86_64.rpm or any other version bc calculator you would manage to install under Dom0 host (I used Enterprise-R5-U6-Server-x86_64-dvd.iso to install)
  • 30-45 minutes of your time :)

How?

In this section I provide a list of solution you need to implement in order to install the OVMM3 as quick as possible. In the next section bellow I provide all the detailed output from my installation for your reference.

–SOLUTION A — Temporarily increase RAM used by Dom0 from 500MB to 2GB (as soon as finished you can reduce it to 1GB, see “Reducing RAM usage” section bellow)

[root@vm03 ~]# cp -rp /boot/grub/grub.conf /boot/grub/grub.conf.orig.1
[root@vm03 ~]# vi /boot/grub/grub.conf
[root@vm03 ~]# diff /boot/grub/grub.conf /boot/grub/grub.conf.orig.1
14c14
<       kernel /xen.gz dom0_mem=2048M
---
>       kernel /xen.gz dom0_mem=582M
[root@vm03 ~]# reboot

–SOLUTION C — Install bc (I used Enterprise-R5-U6-Server-x86_64-dvd.iso media to get the RPM)

[root@vm03 ~]# rpm -Uvf /u02/Server/bc-1.06-21.x86_64.rpm

–SOLUTION D — Temporarily increase swap to 2GB (you can remove the file after the installation)

[root@vm03 ~]# dd if=/dev/zero of=/v01/swapfile1 bs=1024 count=2097152
2097152+0 records in
2097152+0 records out
2147483648 bytes (2.1 GB) copied, 39.6924 seconds, 54.1 MB/s
[root@vm03 ~]# mkswap /v01/swapfile1
Setting up swapspace version 1, size = 2147479 kB
no label, UUID=8f7286f4-4191-4e86-947c-73017a756592
[root@vm03 ~]# swapon /v01/swapfile1

–SOLUTION B — Edit prerequisites.py file in /tmp dir
NOTE: I moved SOLUTION B to very end on purpose here. In the “Details” section I am describing problems in the order I faced them. In this section it makes sense to me to provide all the steps you need to accomplish before starting the installer and then describe this step.
During OVMM3 installation process (please not note that this file is not accessible before you start the installation) you need to edit /tmp/ovmm-installer.selfextract_*/ovm/installer/prerequisites.py file and adjust verifyMemory and verifyLinuxVersion functions replacing “return False” by “return True”.

Details

In this section I am describing the installation process as I went through it, problems I faced and solutions I came with. If you want to implement all the fixes before the actual installation starts please perform all the solutions but SOLUTION B from the previous section.

Let’s start with the login to just installed Oracle VM 3.0.1 server, check some basic stuff and mount the Oracle VM Manager ISO image:

login as: root
root@vm03's password:
Last login: Thu Sep  1 01:27:32 2011
Warning: making manual modifications in the management domain
might cause inconsistencies between Oracle VM Manager and the server.
[root@vm03 ~]# cat /etc/redhat-release
Oracle VM server release 3.0.1
[root@vm03 ~]# cat /proc/meminfo | egrep "MemTotal|SwapTotal"
MemTotal:         594432 kB
SwapTotal:       1052248 kB
[root@vm03 ~]# mount  -o loop /v01/OracleVM-Manager-3.0.1.iso /mnt/cdrom
[root@vm03 ~]# df -h /mnt/cdrom
Filesystem            Size  Used Avail Use% Mounted on
/v01/OracleVM-Manager-3.0.1.iso
 2.4G  2.4G     0 100% /mnt/cdrom
[root@vm03 ~]#

Note: Do not mount the OVMM ISO file under /root*, /u01*,/tmp* file systems. The runInstaller.sh script checks it and gives you “Invalid mountpoint /u01…” error message in case you do. Even if you mounted it under prohibited mount point you just run the ovmm-installer.bsx manually (see the script text).

Let start the installer for the first time …

[root@vm03 ~]# /mnt/cdrom/runInstaller.sh

Oracle VM Manager Release 3.0.1 Installer

Oracle VM Manager Installer log file:
 /tmp/ovmm-installer.selfextract_sV6209/install-2011-09-01-013457.log

Please select an installation type:
 1: Simple
 2: Standard
 3: Uninstall
 4: Help

 Select Number (1-4):

Please note the directory where the log file is located in “/tmp/ovmm-installer.selfextract_sV6209″. This is a temporary directory where installer extracts scripts and other files used during the installation. Each time you run the installer a new directory is created. Therefore it is essential to remove the directory after each failed installation attempt.

Please select an installation type:
 1: Simple
 2: Standard
 3: Uninstall
 4: Help

 Select Number (1-4): 1

Starting simple installation ...

Verifying installation prerequisites ...
Oracle VM Manager can only be installed on a 64 bit Oracle Linux version 5.5 and higher.
Current version is 'redhat' version '3.0.1'
Not enough memory. At least 1500 MB RAM is required but only 580 MB RAM available
Configuration verification failed ...
[root@vm03 ~]#

This is the first stop. The simplest solution to this problem is just temporarily increase amount of RAM allocated to Dom0 host. Later on we will reduce it to 1GB (see “Reducing RAM usage” section below).
-BEGIN-SOLUTION A –

[root@vm03 ~]# cp -rp /boot/grub/grub.conf /boot/grub/grub.conf.orig.1
[root@vm03 ~]# vi /boot/grub/grub.conf
[root@vm03 ~]# diff /boot/grub/grub.conf /boot/grub/grub.conf.orig.1
14c14
<       kernel /xen.gz dom0_mem=2048M
---
>       kernel /xen.gz dom0_mem=582M
-- Reboot
[root@vm03 ~]# cat /proc/meminfo | egrep "MemTotal|SwapTotal"
MemTotal:        2095616 kB
SwapTotal:       1052248 kB
[root@vm03 ~]#

-END-SOLUTION A –

As stated before after each unsuccessful installation attempt you should manually remove an installation directory under /tmp.

[root@vm03 ~]# rm -rf /tmp/ovmm-installer.selfextract_*

Let’s move on …

[root@vm03 ~]# /mnt/cdrom/runInstaller.sh
Oracle VM Manager Release 3.0.1 Installer

Oracle VM Manager Installer log file:
 /tmp/ovmm-installer.selfextract_gd5603/install-2011-09-01-014346.log

Please select an installation type:
 1: Simple
 2: Standard
 3: Uninstall
 4: Help

Select Number (1-4): 1

Starting simple installation ...

Verifying installation prerequisites ...
 Oracle VM Manager can only be installed on a 64 bit Oracle Linux version 5.5 and higher.
 Current version is 'redhat' version '3.0.1'
 *** WARNING: Recommended memory for the Oracle VM Manager server installation is 3950 MB RAM
 Configuration verification failed ...

This is a bit more serious problem. We all know that we are trying to do something unsupported here. To workaround the problem we need to edit some checks in a script file which is available during the time of installation only. Therefore we first start installer than edit the file in under /tmp directory.
-BEGIN-SOLUTION B –

 [root@vm03 ~]# /mnt/cdrom/runInstaller.sh

Oracle VM Manager Release 3.0.1 Installer

Oracle VM Manager Installer log file:
 /tmp/ovmm-installer.selfextract_EF5956/install-2011-09-01-014609.log

Please select an installation type:
 1: Simple
 2: Standard
 3: Uninstall
 4: Help

Select Number (1-4):

-B- Open other ssh window and edit the following file

 vi /tmp/ovmm-installer.selfextract_*/ovm/installer/prerequisites.py

Find verifyMemory and verifyLinuxVersion functions and replace all occurrences of “return False” with “return True”.
Save the file and switch back to the original ssh window.
-END-SOLUTION B –

 Select Number (1-4): 1

Starting simple installation ...

Verifying installation prerequisites ...
 Oracle VM Manager can only be installed on a 64 bit Oracle Linux version 5.5 and higher.
 Current version is 'redhat' version '3.0.1'
 *** WARNING: Recommended memory for the Oracle VM Manager server installation is 3950 MB RAM

One password is used for all users created and used during the installation.
 Enter a password for all logins used during the installation:
 Enter a password for all logins used during the installation (confirm):

Verifying configuration ...

Start installing the configured components:
 1: Continue
 2: Abort

Select Number (1-2): 1
 Step 1 of 9 : Database ...
 Installing Database ...

Retrieving Oracle Database 11g XE ...
 Installing Oracle Database 11g XE ...
 Failed to install Oracle Database 11g XE

This system does not meet the minimum requirements for swap space.  Based on
 the amount of physical memory available on the system, Oracle Database 11g
 Express Edition requires 2048 MB of swap space. This system has 1027 MB
 of swap space.  Configure more swap space on the system and retry the
 installation.

/var/tmp/rpm-tmp.94638: line 186: bc: command not found
 error: %pre(oracle-xe-11.2.0-1.0.x86_64) scriptlet failed, exit status 1
 error:   install: %pre scriptlet failed (2), skipping oracle-xe-11.2.0-1.0

-BEGIN-SOLUTION C – Just install missing bc RPM

 [root@vm03 ~]# mount  -o loop /v01/Enterprise-R5-U6-Server-x86_64-dvd.iso /u02
 [root@vm03 ~]# rpm -Uvf /u02/Server/bc-1.06-21.x86_64.rpm
 warning: /u02/Server/bc-1.06-21.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
 Preparing packages for installation...
 bc-1.06-21
 [root@vm03 ~]#

-END-SOLUTION C –

Step 1 of 9 : Database ...
 Installing Database ...

Retrieving Oracle Database 11g XE ...
 Installing Oracle Database 11g XE ...
 Failed to install Oracle Database 11g XE

This system does not meet the minimum requirements for swap space.  Based on
 the amount of physical memory available on the system, Oracle Database 11g
 Express Edition requires 2048 MB of swap space. This system has 1027 MB
 of swap space.  Configure more swap space on the system and retry the
 installation.

error: %pre(oracle-xe-11.2.0-1.0.x86_64) scriptlet failed, exit status 1
 error:   install: %pre scriptlet failed (2), skipping oracle-xe-11.2.0-1.0

[root@vm03 ~]#

-BEGIN-SOLUTION D – Temporarily increase swap to 2GB
You need to add a volume with at least 2G of space for the Dom0 host.
In my case I mounted a bit of space under /v01 directory.

 [root@vm03 ~]# df -h /v01
 Filesystem            Size  Used Avail Use% Mounted on
 /dev/sda4             290G   12G  264G   5% /v01

[root@vm03 ~]# time dd if=/dev/zero of=/v01/swapfile1 bs=1024 count=2097152
 2097152+0 records in
 2097152+0 records out
 2147483648 bytes (2.1 GB) copied, 39.6924 seconds, 54.1 MB/s

real    0m39.695s
 user    0m1.140s
 sys     0m10.821s
 [root@vm03 ~]# mkswap /v01/swapfile1
 Setting up swapspace version 1, size = 2147479 kB
 no label, UUID=8f7286f4-4191-4e86-947c-73017a756592
 [root@vm03 ~]# swapon /v01/swapfile1
 [root@vm03 ~]# swapon -s
 Filename                                Type            Size    Used    Priority
 /dev/sda3                               partition       1052248 0       -1
 /v01/swapfile1                          file            2097144 0       -2
 [root@vm03 ~]# cat /proc/meminfo | egrep "MemTotal|SwapTotal"
 MemTotal:        2095616 kB
 SwapTotal:       3149392 kB
 [root@vm03 ~]#

If you want you can make the change to be persistent by adding a line in /etc/fstab file. If not you just remove the swap file after you finished the installation and reboot the server.
-END-SOLUTION D –

 

 

 

 

 

 

 

 

 

 

 

Clean Run

At this stage we resolved all problems and the following is the final installer run. As result of it you will get fully functional Oracle VM Manager 3.0.1 running under Dom0 host.

[root@vm03 ~]# /mnt/cdrom/runInstaller.sh

Oracle VM Manager Release 3.0.1 Installer

Oracle VM Manager Installer log file:
 /tmp/ovmm-installer.selfextract_vz9590/install-2011-09-01-021424.log

Please select an installation type:
 1: Simple
 2: Standard
 3: Uninstall
 4: Help

Select Number (1-4): 1

Starting simple installation ...

Verifying installation prerequisites ...
 Oracle VM Manager can only be installed on a 64 bit Oracle Linux version 5.5 and higher.
 Current version is 'redhat' version '3.0.1'
 *** WARNING: Recommended memory for the Oracle VM Manager server installation is 3950 MB RAM

One password is used for all users created and used during the installation.
 Enter a password for all logins used during the installation:
 Enter a password for all logins used during the installation (confirm):

Verifying configuration ...

Start installing the configured components:
 1: Continue
 2: Abort

Select Number (1-2): 1
 Step 1 of 9 : Database ...
 Installing Database ...

Retrieving Oracle Database 11g XE ...
 Installing Oracle Database 11g XE ...
 Configuring Oracle Database 11g XE ...
 Step 2 of 9 : Java ...
 Installing Java ...
 Step 3 of 9 : Database Schema ...
 Creating database schema 'ovs' ...
 Step 4 of 9 : WebLogic ...
 Retrieving Oracle WebLogic Server 11g ...
 Installing Oracle WebLogic Server 11g ...

Step 5 of 9 : ADF ...
 Retrieving Oracle Application Development Framework (ADF) ...
 Unzipping Oracle ADF ...
 Installing Oracle ADF ...

Step 6 of 9 : Oracle VM  ...
 Retrieving Oracle VM Manager Application ...
 Extracting Oracle VM Manager Application ...
 Installing Oracle VM Manager Core ...
 Step 7 of 9 : Domain creation ...
 Creating Oracle WebLogic Server domain ...
 Starting Oracle WebLogic Server 11g ...
 Configuring data source 'OVMDS' ...
 Creating Oracle VM Manager user 'admin' ...
 Step 8 of 9 : Deploy ...
 Deploying Oracle VM Manager Core container ...
 Deploying Oracle VM Manager UI Console ...
 Deploying Oracle VM Manager Help ...
 Enabling HTTPS ...
 Granting ovm-admin role to user 'admin' ...

Step 9 of 9 : Oracle VM Manager Shell ...
 Retrieving Oracle VM Manager Shell & API ...
 Extracting Oracle VM Manager Shell & API ...
 Installing Oracle VM Manager Shell & API ...

Retrieving Oracle VM Manager Upgrade tool ...
 Extracting Oracle VM Manager Upgrade tool ...
 Installing Oracle VM Manager Upgrade tool ...
 Copying Oracle VM Manager shell to '/usr/bin/ovm_shell.sh' ...
 Installing ovm_admin.sh in '/u01/app/oracle/ovm-manager-3/bin' ...
 Installing ovm_upgrade.sh in '/u01/app/oracle/ovm-manager-3/bin' ...
 Enabling Oracle VM Manager service ...
 Oracle VM Manager installed.

Installation Summary
 --------------------
 Database configuration:
 Database host name          : localhost
 Database instance name (SID): XE
 Database listener port      : 1521
 Application Express port    : 8080
 Oracle VM Manager schema    : ovs

Weblogic Server configuration:
 Administration username     : weblogic

Oracle VM Manager configuration:
 Username                    : admin
 Core management port        : 54321
 UUID                        : 0004fb0000010000127081045b8b1124

Passwords:
 There are no default passwords for any users. The passwords to use for Oracle VM Manager, Oracle Database 11g XE, and Oracle WebLogic Server have been set by you during this installation. In the case of a default install, all passwords are the same.

Oracle VM Manager UI:

http://vm03.fun.com:7001/ovm/console


https://vm03.fun.com:7002/ovm/console

 Log in with the user 'admin', and the password you set during the installation.

Please note that you need to install tight-vnc on this computer to access a virtual machine's console.

For more information about Oracle Virtualization, please visit:

http://www.oracle.com/virtualization/

Oracle VM Manager installation complete.
 [root@vm03 ~]# date
 Thu Sep  1 02:33:30 EST 2011
 [root@vm03 ~]#

ALL GOOD :)
You can test the console now

https://vm03.fun.com:7002/ovm/console

Username: admin
Password:

Reducing RAM usage

Lets stop OVMM3 console

[root@vm03 ~]# /etc/init.d/ovmm stop
 Stopping Oracle VM Manager                                 [  OK  ]

Reducing Oracle DB memory usage

If you ever adjusted an Oracle Instance memory the following steps makes sense to you with no additional comments

 su - oracle
 [oracle@vm03 ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
 [oracle@vm03 ~]$ export PATH=$ORACLE_HOME/bin:$PATH
 [oracle@vm03 ~]$ export ORACLE_SID=XE
 [oracle@vm03 ~]$ sqlplus "/ as sysdba"
 SQL*Plus: Release 11.2.0.2.0 Production on Thu Sep 1 02:44:33 2011

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:
 Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

SQL> alter system set sga_target=200M scope=spfile;

System altered.

SQL>  alter system reset memory_target sid='*' scope=spfile;

System altered.

SQL> show sga

Total System Global Area  855982080 bytes
 Fixed Size                  2231296 bytes
 Variable Size             503317504 bytes
 Database Buffers          348127232 bytes
 Redo Buffers                2306048 bytes
 SQL> shutdown immediate;
 Database closed.
 Database dismounted.
 ORACLE instance shut down.
 SQL> startup
 ORACLE instance started.

Total System Global Area  208769024 bytes
 Fixed Size                  2225072 bytes
 Variable Size              96472144 bytes
 Database Buffers          104857600 bytes
 Redo Buffers                5214208 bytes
 Database mounted.
 Database opened.
 SQL> exit
 Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
 [oracle@vm03 ~]$

Reducing Apps memory usage

The following start up script adjustment will reduce Application server memory usage from 2GB to 512MB.

[root@vm03 ~]# cp -rp /etc/init.d/ovmm ~/ovmm
 [root@vm03 ~]# vi /etc/init.d/ovmm
 [root@vm03 ~]# diff /etc/init.d/ovmm ~/ovmm
32c32
<                 nohup su - oracle -c "USER_MEM_ARGS=\"-Xms64m -Xmx512m -XX:MaxPermSize=384m\" DOMAIN_PRODUCTION_MODE=true JAVA_OPTIONS=-Djava.awt.headless=true /u01/app/oracle/ovm-manager-3/machine1/base_adf_domain/startWebLogic.sh &" > /dev/null
---
>                 nohup su - oracle -c "USER_MEM_ARGS=\"-Xms512m -Xmx2048m -XX:MaxPermSize=384m\" DOMAIN_PRODUCTION_MODE=true JAVA_OPTIONS=-Djava.awt.headless=true /u01/app/oracle/ovm-manager-3/machine1/base_adf_domain/startWebLogic.sh &" > /dev/null
[root@vm03 ~]#

[root@vm03 ~]# /etc/init.d/ovmm start
 Starting Oracle VM Manager                                 [  OK  ]
 [root@vm03 ~]#
 -- Wait for ~60 secs
 [root@vm03 ~]# netstat -ntlp | grep 7001
 tcp        0      0 192.168.1.210:7001          0.0.0.0:*                   LISTEN      17732/java
 tcp        0      0 192.168.1.211:7001          0.0.0.0:*                   LISTEN      17732/java
 tcp        0      0 127.0.0.1:7001              0.0.0.0:*                   LISTEN      17732/java
 [root@vm03 ~]#

Just wait a bit and you can test the console again.

Reducing Dom0 memory usage

After you reduced DB and Apps server memory usage we can shrink back memory allocated to Dom0 host

 [root@vm03 ~]# cp -rp /boot/grub/grub.conf /boot/grub/grub.conf.orig.2
 [root@vm03 ~]# vi /boot/grub/grub.conf
 [root@vm03 ~]# diff /boot/grub/grub.conf /boot/grub/grub.conf.orig.2
 [root@vm03 ~]# diff /boot/grub/grub.conf /boot/grub/grub.conf.orig.2
 14c14
 <       kernel /xen.gz dom0_mem=1024M
 ---
 >       kernel /xen.gz dom0_mem=2048M
 [root@vm03 ~]# reboot

Broadcast message from root (pts/0) (Thu Sep  1 02:58:06 2011):

The system is going down for reboot NOW!
 [root@vm03 ~]#

Clean Swap file

...
 [root@vm03 ~]# cat /proc/meminfo | egrep "MemTotal|SwapTotal"
 MemTotal:         794872 kB
 SwapTotal:       1052248 kB
 [root@vm03 ~]# rm -f /v01/swapfile1

Give the OVMM3 console few minutes to start and you can start using the new installed Oracle VM Manager 3.0.1 under Dom0 host.

Other Hints

Stopping OVMM3

The following 2 calls stops Oracle VM Manager related processes:

 [root@vm03 ~]# /etc/init.d/ovmm stop
 Stopping Oracle VM Manager                                 [  OK  ]
 [root@vm03 ~]# /etc/init.d/oracle-xe stop
 Shutting down Oracle Database 11g Express Edition instance.
 Stopping Oracle Net Listener.
 [root@vm03 ~]#

Wipe out Oracle VM Manager installation

If you for any reason would like to clean the installation and start it all over again just stop OVMM3 processes and run the following commands.
NOTE: Oracel VM Server isn’t impacted by those actions.

 [root@vm03 ~]# rpm -e oracle-xe-11.2.0-1.0
 [root@vm03 ~]# rm -rf /u01/app/oracle
 [root@vm03 ~]# rm -rf /tmp/ovmm-installer.selfextract_*
View Yury Velikanov's profile on LinkedIn

38 Responses to “Installing Oracle VM Manager 3.0.1 under Dom0 host”

  • Thanks a lot. I successfully installed using the grub update method.

  • roly says:

    Hi, I’m trying to follow your steps. However, there are a couple of things that are strange to me.

    First it seems i needed to run the script to create the oracle user.

    Next it seems that Oracle XE cant get configured (ORA-01034: ORACLE not available).
    Any idea what i’m doing wrong?

    Is there something i need to perform on the base OVM Server system prior to install OVM_Manager?

    • Hey Roly!

      Thank you for reading the blog!
      I would suggest checking few things:
      -a- You are using the Oracle VM3 (3.0.1) version (Server and Manager)
      -b- Double check that you increased memory parameters for the dom0 host and I faced the issue with Oracle XE startup at the time I was having less RAM configured
      kernel /xen.gz dom0_mem=2048M
      -c Double check that you configured swap space
      dd if=/dev/zero of=/v01/swapfile1 bs=1024 count=2097152

      I will have an additional look on my setup once gain latter on today but as far as I remember I didn’t create any additional users myself.

      Yury

      • roly says:

        Hi Yury, I was able to fix the issue. I realised that after installing OVM3.0.1 i needed to follow the following steps:
        yum install oracle-validated (assuming yum repo is configured)
        mkdir /u01

        after that installing OVM Manager worked.

        I also figured that putting dom0 memory to 1GB is only good if you dont use OVMM for much. I tried to generate some VM’s and used the VNC console. If you try to that you’ll see that a lot of swap happens on dom0 making the web-console pretty slow. So i increased the memory again for dom0 to 4GB.

        Furthermore it seems to me that setting the jvm memory options to -Xms64m -Xmx512m still allowed the JVM to use 1GB of memory. Could it be that this is due to the fact that it is a 64bit JVM?

        • dim says:

          roly, could you tell about yum repo configuration for OVS 3.0.2? can I do it without valid oracle account?

        • dim says:

          I’ve got the same error (01034 oracle not avaliable) during Oracle VM Manager installation into the dom0 (ovs 3.0.2)

          • roly says:

            hi,

            for OVM3.0.x i used the public yum-el5 repo and in there i enabled OL5-U7

            [ol5_u7_base]
            name=Oracle Linux $releasever – U7 – $basearch – base
            baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/7/base/$basearch/
            gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
            gpgcheck=1
            enabled=1

    • Hi Roly,

      In 3.0.1 case you don’t need to create an oracle OS user. However in 3.0.2 and 3.0.3 you required to do so.
      I made a separate post to describe how to install 3.0.3 version over there:
      http://www.pythian.com/news/30197/installing-oracle-vm-manager-3-0-3-under-dom0-host-or-how-to-save-resources-on-your-sandbox/

      Yury

  • Ravi says:

    Hi,

    This is a great blog. I could install the OVM 3.0.2 (both VM server and VM Manager machines on a VM hosted on ESX).

    I could able to import the Oracle 10g template and create a VM from that template. All is well. But I could not able to access the VM from my network. the VM is visible only the OVM Server (ping and ssh) and vice versa. It seems that network gor configured as just host only.

    How this can be fixed so that I can access the VM from my network.

    Great work.

    Regards

  • yjcha says:

    Thank you for reading the blog!

    Tnank you~!! ^^

  • Balasubramaniam says:

    Awesome work around, really appriciate all your efforts…thanks again,

    cheers,

  • Utku says:

    Hi,

    Can anybody share his partition layout? I think i miss something here. It stucks configuring Oracle DB XE .

    Thank,

    Utku

  • Good work and thanks for sharing. says:

    Last login: Tue Jan 24 14:14:25 2012 from 192.168.1.16
    Warning: making manual modifications in the management domain
    might cause inconsistencies between Oracle VM Manager and the server.
    [root@ovsovm303 ~]# cd /etc
    [root@ovsovm303 etc]# vi hosts
    [root@ovsovm303 etc]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda2 40G 667M 38G 2% /
    /dev/sda5 101G 83G 13G 87% /backup
    /dev/sda1 99M 37M 58M 39% /boot
    tmpfs 2.1G 6.5M 2.0G 1% /dev/shm
    none 2.0G 40K 2.0G 1% /var/lib/xenstored
    /backup/OEL5U6-x86_64-dvd.iso
    3.6G 3.6G 0 100% /oel5u6
    /backup/OVMManager3.0.3-V29653-01.iso
    2.4G 2.4G 0 100% /ovmm303
    [root@ovsovm303 etc]# cd /ovmm303
    [root@ovsovm303 ovmm303]# ls -lart
    total 100478
    -r-xr-xr-x 1 root root 11696 Dec 14 18:01 upgrade
    -r-xr-xr-x 1 root root 429 Dec 14 18:01 runUpgrader.sh
    -r–r–r– 1 root root 172 Dec 14 18:01 oracle-validated.params
    -r-xr-xr-x 1 root root 9323 Dec 14 18:01 createOracle.sh
    -r-xr-xr-x 1 root root 102843523 Dec 14 18:03 ovmm-installer.bsx
    -r-xr-xr-x 1 root root 475 Dec 14 18:06 runInstaller.sh
    -r–r–r– 1 root root 6960 Dec 14 18:06 LICENSE
    -r–r–r– 1 root root 6960 Dec 14 18:06 EULA
    dr-xr-xr-x 2 root root 2048 Dec 14 18:06 components
    dr-xr-xr-x 3 root root 2048 Dec 14 18:06 .
    drwxr-xr-x 26 root root 4096 Jan 24 14:16 ..
    [root@ovsovm303 ovmm303]# ./createOracle.sh
    Adding group ‘oinstall’ with gid ‘54321’ …
    Adding group ‘dba’
    Adding user ‘oracle’ with user id ‘54321’, initial login group ‘dba’, supplementary roup ‘oinstall’ and home directory ‘/home/oracle’ …
    Changing ownership of ‘/home/oracle’ to oracle:dba
    Creating user ‘oracle’ succeeded …
    Verifying user ‘oracle’ OS prerequisites for Oracle VM Manager …
    oracle soft nofile 8192
    oracle hard nofile 8192
    oracle soft nproc 4096
    oracle hard nproc 4096
    oracle soft core unlimited
    oracle hard core unlimited
    Setting user ‘oracle’ OS limits for Oracle VM Manager …
    Altered file /etc/security/limits.conf
    Original file backed up at /etc/security/limits.conf.orabackup
    Verifying & setting of user limits succeeded …
    Creating mountpoint ‘/u01′ …
    Modifying iptables for rule RH-Firewall-1-INPUT(default)
    Adding rules to enable access to :
    7001 : Oracle VM Manager http
    7002 : Oracle VM Manager https
    15901 : Oracle VM Manager VM console proxy
    54321 : Oracle VM Manager core
    FATAL: Module ip_tables not found.
    iptables v1.4.7: can’t initialize iptables table `filter': iptables who? (do you nee to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.
    Firewall rule RH-Firewall-1-INPUT does not exist, please configure iptables manually
    [root@ovsovm303 ovmm303]# vi /etc/security/limits.conf
    [root@ovsovm303 ovmm303]# passwd oracle
    Changing password for user oracle.
    New UNIX password:
    BAD PASSWORD: it is based on a dictionary word
    Retype new UNIX password:
    passwd: all authentication tokens updated successfully.
    [root@ovsovm303 ovmm303]# ls -lart /u01
    total 8
    drwxr-xr-x 27 root root 4096 Jan 24 14:24 ..
    drwxr-xr-x 2 root root 4096 Jan 24 14:24 .
    [root@ovsovm303 ovmm303]# ls -lart
    total 100478
    -r-xr-xr-x 1 root root 11696 Dec 14 18:01 upgrade
    -r-xr-xr-x 1 root root 429 Dec 14 18:01 runUpgrader.sh
    -r–r–r– 1 root root 172 Dec 14 18:01 oracle-validated.params
    -r-xr-xr-x 1 root root 9323 Dec 14 18:01 createOracle.sh
    -r-xr-xr-x 1 root root 102843523 Dec 14 18:03 ovmm-installer.bsx
    -r-xr-xr-x 1 root root 475 Dec 14 18:06 runInstaller.sh
    -r–r–r– 1 root root 6960 Dec 14 18:06 LICENSE
    -r–r–r– 1 root root 6960 Dec 14 18:06 EULA
    dr-xr-xr-x 2 root root 2048 Dec 14 18:06 components
    dr-xr-xr-x 3 root root 2048 Dec 14 18:06 .
    drwxr-xr-x 27 root root 4096 Jan 24 14:24 ..
    [root@ovsovm303 ovmm303]# ./runInstaller.sh

    Oracle VM Manager Release 3.0.3 Installer

    Oracle VM Manager Installer log file:
    /tmp/ovmm-installer.selfextract_JC7320/install-2012-01-24-142604.log

    Please select an installation type:
    1: Demo
    2: Production
    3: Uninstall
    4: Help

    Select Number (1-4): 1

    Starting demo installation …

    The Demo installation type will use an XE database. The usage of XE is for *demo puposes only* and is not supported for production. Please *do not* plan to start with E and migrate to a supported version of the database as this may not be possible. Fo production environments or any long term usage please use the “Production” option wth an SE or EE database.
    1: Continue
    2: Abort

    Select Number (1-2): 1

    Verifying installation prerequisites …
    Oracle VM Manager can only be installed on a 64 bit Oracle Linux version 5.5 and higer.
    Current version is ‘redhat’ version ‘3.0.3’

    One password is used for all users created and used during the installation.
    Enter a password for all logins used during the installation:
    Enter a password for all logins used during the installation (confirm):

    Verifying configuration …

    Start installing the configured components:
    1: Continue
    2: Abort

    Select Number (1-2): 1

    Step 1 of 9 : Database …
    Installing Database …
    Retrieving Oracle Database 11g XE …
    Installing Oracle Database 11g XE …
    Configuring Oracle Database 11g XE …

    Step 2 of 9 : Java …
    Installing Java …

    Step 3 of 9 : Database Schema …
    Creating database schema ‘ovs’ …

    Step 4 of 9 : WebLogic …
    Retrieving Oracle WebLogic Server 11g …
    Installing Oracle WebLogic Server 11g …

    Step 5 of 9 : ADF …
    Retrieving Oracle Application Development Framework (ADF) …
    Unzipping Oracle ADF …
    Installing Oracle ADF …

    Step 6 of 9 : Oracle VM …
    Retrieving Oracle VM Manager Application …
    Extracting Oracle VM Manager Application …
    Installing Oracle VM Manager Core …

    Step 7 of 9 : Domain creation …
    Creating Oracle WebLogic Server domain …
    Starting Oracle WebLogic Server 11g …
    Configuring data source ‘OVMDS’ …
    Creating Oracle VM Manager user ‘admin’ …

    Step 8 of 9 : Deploy …
    Deploying Oracle VM Manager Core container …
    Deploying Oracle VM Manager UI Console …
    Deploying Oracle VM Manager Help …
    Enabling HTTPS …
    Granting ovm-admin role to user ‘admin’ …

    Step 9 of 9 : Oracle VM Manager Shell …
    Retrieving Oracle VM Manager Shell & API …
    Extracting Oracle VM Manager Shell & API …
    Installing Oracle VM Manager Shell & API …

    Retrieving Oracle VM Manager Upgrade tool …
    Extracting Oracle VM Manager Upgrade tool …
    Installing Oracle VM Manager Upgrade tool …
    Copying Oracle VM Manager shell to ‘/usr/bin/ovm_shell.sh’ …
    Installing ovm_admin.sh in ‘/u01/app/oracle/ovm-manager-3/bin’ …
    Installing ovm_upgrade.sh in ‘/u01/app/oracle/ovm-manager-3/bin’ …
    Enabling Oracle VM Manager service …
    Shutting down Oracle VM Manager instance …
    Restarting Oracle VM Manager instance …
    Waiting 15 seconds for the application to initialize …
    Oracle VM Manager is running …
    Oracle VM Manager installed.

    Please wait while WebLogic configures the applications… This can take up to 5 minutes.

  • Having weired issues with importing templates says:

    do we have working solution to import RAC and EBS 12.1.3 templates.

    • I don’t have it myself as for now. It looks like it is a space for a new blog post. Is there anyone to gave a go and write about it?

      PS I am not sure if I do have enough RAM on my LAB sandbox myself. I think we need ~12-16GB Oracle VM host for such configuration.

      Yury

  • Costa says:

    Yury. Thank you for your writeup. Its well written.

    Given the installation of the OVM Manager on the OVM Server with the “wrong” linux versions using the workaround, did you (or anyone) have any ill behavior running db templates? Thanks again.

    • Hi Costa,

      Thank you for reading and the feedback.
      I didn’t noticed any related issues myself. I hope others will comment.
      I must admit that I didn’t implemented many VMs in such configuration.

      PS A blog post on 3.0.3 OVM version is on the way :)

      Yury

  • Mohammed says:

    thanks Yuri for the great tutorial, i have successfully installed OVMM 3.0.3 but iam stuck in the configuration while Registering storage (NFS server), can’t i register the same pc as a storage server?

    • >> can’t i register the same pc as a storage server?
      You can :) I just did it. Let me put the steps together for you and post it as a next blog post after the 3.0.3 one.

      HINT: For testing purposes try “chmod 777 /nfs_dir” as root. Let me know if it worked for you.

      Yury

  • Mohammed says:

    nice to hear that :) , but can i undo the chmod action after i execute it? + i think you meant “chmod -R 777 /” right or it shouldn’t be recursive?
    many thanks..

    • Hey Mohammed,

      It looks like because of HTML elements usage in my comments the directory name I specified disappeared leaving just “/”. Please do not run chmod -R “/”.
      Instead of that just for troubleshooting proposes and just on your sandbox environment grant ALL privileges on the directory to mounting via NFS. I am sure there is a better / more safer way to configure NFS. However for troubleshooting the issue just try 777.

      Yury

  • […] If you are wondering why anyone would possibly need to Install Oracle VM Manager in such an unsupported way, please read my previous Oracle VM 3 related blog post. […]

  • Mohammed says:

    no problem,
    i did successfully as following:
    1- make 2 new directories under “/var/”
    “/var/storage1/”
    “/var/storage2/”

    2- add to “/etc/exports” the following
    /var/storage1 IPofYourBox(rw,nohide)
    /var/storage2 IPofYourBox(rw,nohide)

    3- start the service by running :
    service portmap start
    service nfs start

    4- it is ready to register your storage!!

    • raj says:

      Hello Mohammed!
      Thank you very much, was struggling with the storage from last week time and finally I got a clue from your post, which was referring towards Ipofyourbox. I read it as the IP of VM server itself and now the storage is showing the nfs shares!!!! thank you thank you!

  • Mohammed says:

    i forgot to thank you on your help :) !!.

  • TT says:

    Hi there, great info, too bad i did not find this article earlier. I just spent three days getting OVMM to install and run in a VM with 2 GB RAM and this is what I found out:

    * Java is the weak link in OVMM, it demands lot of CPU power, give it two CPU’s and OVMM will be at least 3x faster, even with the memory restrictions!

    * If you add “-n” as a parameter to runInstaller.sh then it does not check for RAM, i.e. it accepts whatever there is:

    # ./runInstaller.sh -n

    * After installation you can edit /etc/sysconfig/ovmm and set Java’s memory parameters, add the following lines to the beginning of that file:

    # vi /tmp/ovmm-installer/ovmm

    JVM_MEMORY_MIN=256m
    JVM_MEMORY_MAX=384m
    JVM_MAX_PERM=256m

    * Also, add the following Java optimization parameters to the /etc/init.d/ovmm file. Find the line starting with :

    nohup su – oracle -c “$USER_MEM_ARGS DOMAIN_PRODUCTION_MODE=true JAVA_OPTIONS=\”…

    and add the “-XX:+AggressiveHeap” and the “-XX:+UseParallelGC” parameters so the line looks like this:

    nohup su – oracle -c “$USER_MEM_ARGS DOMAIN_PRODUCTION_MODE=true JAVA_OPTIONS=\”-XX:+AggressiveHeap -XX:+UseParallelGC…

    * Regarding Oracle XE I used the following commands to minimize it’s memory hunger, the performance is quite snappy since OVMM does really not depend on XE much (all of the info is actually stored on the OVS servers!)

    # sqlplus sys as sysdba

    SQL> alter system set processes=200 scope=spfile;
    SQL> alter system set aq_tm_processes=1 scope=spfile;
    SQL> alter system set db_writer_processes=2 scope=spfile;
    SQL> alter system set job_queue_processes=10 scope=spfile;
    SQL> alter system set memory_target=200M scope=spfile;
    SQL> alter system set sga_max_size=0 scope=spfile;
    SQL> alter system set sga_target=0 scope=spfile;
    SQL> alter system set pga_aggregate_target=0 scope=spfile;
    SQL> alter system set java_pool_size=0 scope=spfile;
    SQL> alter system set large_pool_size=0 scope=spfile;
    SQL> alter system set shared_pool_size=0 scope=spfile;
    SQL> alter system set streams_pool_size=0 scope=spfile;
    SQL> alter system set filesystemio_options=setall scope=spfile;
    SQL> alter system set optimizer_mode=first_rows scope=spfile;
    SQL> alter system set sessions=250 scope=spfile;
    SQL> alter system set session_cached_cursors=100 scope=spfile;
    SQL> alter system set session_max_open_files=50 scope=spfile;
    SQL> create pfile from spfile;

    With these changes the OVMM runs really fast and is a pleasure to work with. My VM shows about 120 – 200 MB RAM available of the 2048 MB.

    I really can not understand why Oracle did not put more effort into trimming down the horrible unnecessary RAM requirements since OVMM is a pig without this tuning.

    //TT

  • th says:

    Hi,
    I encountered the following errors when start installation
    @vm-server:/mnt[root@vm-server mnt]# ./runInstaller.sh

    Oracle VM Manager Release 3.0.3 Installer

    Oracle VM Manager Installer log file:
    /tmp/ovmm-installer.selfextract_Fy6685/install-2012-02-03-010705.log

    Please select an installation type:
    1: Demo
    2: Production
    3: Uninstall
    4: Help

    Select Number (1-4): 1

    Starting demo installation ..
    when
    The Demo installation type will use an XE database. The usage of XE is for *demo purposes only* and is not supported for production. Please *do not* plan to start with XE and migrate to a supported version of the database as this may not be possible. For production environments or any long term usage please use the “Production” option with an SE or EE database.
    1: Continue
    2: Abort

    Select Number (1-2): 1

    Verifying installation prerequisites …
    Oracle VM Manager can only be installed on a 64 bit Oracle Linux version 5.5 and higher.
    Current version is ‘redhat’ version ‘3.0.3’
    *** WARNING: Recommended memory for the Oracle VM Manager server installation is 3950 MB RAM

    One password is used for all users created and used during the installation.
    Enter a password for all logins used during the installation:
    Enter a password for all logins used during the installation (confirm):

    Verifying configuration …

    Start installing the configured components:
    1: Continue
    2: Abort

    Select Number (1-2): 1

    Step 1 of 9 : Database …
    Installing Database …
    Retrieving Oracle Database 11g XE …
    Installing Oracle Database 11g XE …
    Configuring Oracle Database 11g XE …
    Failed to configure Oracle Database 11g XE

    Oracle Database 11g Express Edition Configuration
    ————————————————-
    This will configure on-boot properties of Oracle Database 11g Express
    Edition. The following questions will determine whether the database should
    be starting upon system boot, the ports it will use, and the passwords that
    will be used for database accounts. Press to accept the defaults.
    Ctrl-C will abort.

    Specify the HTTP port that will be used for Oracle Application Express [8080]:
    Specify a port that will be used for the database listener [1521]:
    Specify a password to be used for database accounts. Note that the same
    password will be used for SYS and SYSTEM. Oracle recommends the use of
    different passwords for each database account. This can be done after
    initial configuration:
    Confirm the password:

    Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:
    Starting Oracle Net Listener…Done
    Configuring database…
    Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details

    check for log detail as shown below:
    more cloneDBCreation.log

    Create controlfile reuse set database “XE”
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    BEGIN dbms_backup_restore.zerodbid(0); END;

    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    LRM-00116: syntax error at ‘sessions’ following ‘=’
    ORA-01078: failure in processing system parameters
    Create controlfile reuse set database “XE”

    • roly says:

      hi,

      i ran into the same and it drove me nuts. Basically you need to follow hte OVM3 installation at
      http://www.oracle-base.com/articles/vm/OVM3Installation.php

      the key points here are:

      * On your OVM server enable the yum-repository for OL5-U7. The yum repo file should have somethin like

      [ol5_u7_base]
      name=Oracle Linux $releasever – U7 – $basearch – base
      baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/7/base/$basearch/
      gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
      gpgcheck=1
      enabled=1

      * then do the command “yum install oracle-validated”

      * then “mkdir /u01″

      after that installing OVM Manager should work

  • Rui says:

    Yuri, thanks for your hints.

    I have installed a blade with oracle_vm_server and oracle_vm.

    Again thanks

    Rui

  • Damir Vadas says:

    I have problem installing bc package (not so easy as you placed):
    [root@ovm-0 ~]# rpm -Uvf bc-1.06-21.i386.rpm
    warning: bc-1.06-21.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
    error: Failed dependencies:
    libc.so.6 is needed by bc-1.06-21.i386
    libc.so.6(GLIBC_2.0) is needed by bc-1.06-21.i386
    libc.so.6(GLIBC_2.1) is needed by bc-1.06-21.i386
    libc.so.6(GLIBC_2.3) is needed by bc-1.06-21.i386
    libc.so.6(GLIBC_2.3.4) is needed by bc-1.06-21.i386
    libc.so.6(GLIBC_2.4) is needed by bc-1.06-21.i386
    libreadline.so.5 is needed by bc-1.06-21.i386
    libtermcap.so.2 is needed by bc-1.06-21.i386
    [root@ovm-0 ~]#

    Any hint what I’m doing wrong?
    Rg
    Damir

  • Damir Vadas says:

    Forget previous post-didn’t notice wrong package..
    Sorry x 100

  • […] del al menos dos máquina, una para el hipervisor y otra para el gestor nos frenan. En base a un blog del grupo Phytian y jugando un poco he logrado poner los dos en una sola máquina y desplegar una plantilla de las […]

  • When you want to ignore the prerequisite checks, try: -n or –noprereq:

    ./runInstaller.sh -n

    (…)
    Verifying installation prerequisites …
    Unable to ping hostname ‘blahblah’.
    *** WARNING: Recommended memory for the Oracle VM Manager server installation using Local MySql DB is 8192 MB RAM
    Ignoring prerequisites check …

    (OVM 3.1.1 installer…)

    Cheers! ;)

  • Hello Ian,

    Thanks a lot for sharing the option. I actually used it recently installing VMM under dom0 for Oracle VM 3.2.2 version.

    I may publish instructions as a proper blog post in the future. However just t let others leverage it I posted a quick note over here:
    https://plus.google.com/u/1/107075205411714880234/posts/8fX2V4QwZfV

    Thanks once again,
    Yury

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>