Changing database repositories in Oracle VM 3

At home I have a small atom-based server that was running Oracle VM Manager 3, installed using simple installation. Simple installation is the option where you just enter a password and the Oracle VM Manager installer installs : Oracle XE database, WebLogic Server and the Oracle VM Manager container. The same password is used for the database user, Oracle VM Manager database schema user, weblogic user and admin user for the manager instance.

The manager instance stores its data as objects inside the database. To do that, there is something called a datasource defined in weblogic during installation. It's basically a jdbc connection from weblogic to the database. This DS requires the following information : database hostname, database instance name, database listener port number, schema username and schema password. In my default install this was localhost, XE, 1521, ovs, mypassword.

Now that I re-organized my machines a bit, I have a larger server that runs a normal database, which I also happen to use for EM12c. So I figured I would take some load off the little atom server, keep it running Oracle VM Manager but shut down XE and move the schema over to my dedicated database host. This is a straightforward process so I just wanted to list the steps.

1) shut down Oracle VM Manager so that it does not continue updating the repository.
as root : /etc/init.d/ovmm stop

2) export the schema user using the exp command for Oracle XE
as oracle : 
cd /u01/app/oracle/product/11.2.0/xe
export ORACLE_HOME=`pwd`
(enter user ovs and its password)
export user (option 2)
export everything including data
this will create (by default) a file called expdat.dmp
copy this file over to the other server with the other database
The schema name is also in /u01/app/oracle/ovm-manager-3/.config (OVSSCHEMA)

3) shutdown oracle-xe as it's no longer needed  
as root : /etc/init.d/oracle-xe stop

4) import the ovs user into the new database. I like to do it as the user. 
I just simply pre-create the schema before starting import
as oracle : 
sqlplus '/ as sysdba'
create user ovs identified by MyPassword;
grant connect,resource to ovs;
at this point, run the imp utility on the box to import the expdat.dmp
import asks for username/password, enter ovs and its password
import yes on all data and tables and content.

At this point you have a good complete repository. 
Now let's make the Oracle VM Manager weblogic instance point to the new database.

5) on the original system, restart weblogic
as root :/etc/init.d/ovmm start
wait a few minutes for the instance to come online

6) use the ovm_admin tool
as oracle : 
cd /u01/app/oracle/ovm-manager-3/bin
./ovm_admin --modifyds orcl wopr8 1521 ovs mypassword
My new host name for the database is called wopr, 
the database instance is orcl and listener is still 1521 with schema ovs
The admin tool asks for a password, this is the weblogic user password. 
In a simple install, this would be the same as your admin or ovs account password.

7) restart to have everything take effect.
as root : 
/etc/init.d/ovmm stop  ; sleep 5 ;/etc/init.d/ovmm start ;

8) edit the config file and update the new data 
vi /u01/app/oracle/ovm-manager-3/.config 
modify :
and leave the rest as is. 

that should do it !


That's a great article, but are there any documentation online for the tools you used?

Posted by guest on February 05, 2012 at 09:11 PM PST #

Thanks for the info.

Just want to highlight that as of 11gR2 the exp command is desupported by Oracle ( in favor of the expdb command.

Posted by Hans on February 07, 2012 at 09:15 AM PST #

Probably (if not already done) to disable the oracle-xe rc.d startup setting via (if implemented via chkconfig / no environment nearby to check)

$> chkconfig --list oracle-xe
$> chkconfig --level 345 oracle-xe off


Posted by Marco Gralike on February 29, 2012 at 07:36 AM PST #

Hi Wim,

Nice post on OVM 3,

I have an issue getting OVM 3.0.3 Manager to work and install correctly for Linux platform.
During the installation it hangs and then fails on step 8 of 9 on weblogic errors as shown below.

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

user: weblogic
timeout: 300
Connecting to t3://localhost:7001 with userid weblogic ...
This Exception occurred at Fri Mar 16 10:33:13 PDT 2012.
Connecting to t3://localhost:7001 with userid weblogic ...
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_adf_domain'.

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.

Current status is RUNNING
Disconnected from weblogic server: AdminServer

03-16 10:34 system.process DEBUG stderr:
javax.naming.CommunicationException [Root exception is t3://localhost:7001: Destination unreachable; nested exception is: Connection refused; No available router to destination]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(
at weblogic.jndi.Environment.getContext(
at weblogic.jndi.Environment.getContext(
at weblogic.jndi.WLInitialContextFactory.getInitialContext(
at javax.naming.spi.NamingManager.getInitialContext(

Any ideas how to resolve the above installation issues with OVM 3.0.3 Manager?

Ben Prusinski, Oracle ACE

Posted by Ben Prusinski on March 16, 2012 at 12:23 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Wim Coekaerts is the Senior Vice President of Linux and Virtualization Engineering for Oracle. He is responsible for Oracle's complete desktop to data center virtualization product line and the Oracle Linux support program.

You can follow him on Twitter at @wimcoekaerts


« February 2015