Wednesday, 27 May 2015

ORA-02379: profile OVMM_PROFILE already exists

If you've ever wondered how one problem leads to the next you just got to do a bit of hacking to find out why.

After hacking around with re-installing Oracle VM Manager in a new Exalogic VM Guest, which I blogged about under the title Owned by Another Manager I was forced to uninstall Oracle VM Manager which is where I hit this problem.

To cut a long story short I was installing Oracle VM Manager 3.2.8 into an existing Oracle Database which had already had an OVS schema installed into it and for a change I had removed it using the officially documented de-installation process available at http://docs.oracle.com/cd/E35328_01/E35330/html/vmiug-manager-uninstalling.html.  What it doesn't tell you is that it doesn't do the job properly if you have used an external Oracle Database rather than the embedded MySQL one.

After running;
$ ./runInstaller.sh --uuid=0004fb0000010000d1b7eca67025e1c1
The installation got to step 3 of 9 and spat out the following;
Step 3 of 9 : Database schema ...An existing Oracle VM database schema was found.  How should the install proceed?   1: Use the existing Oracle VM database schema with the Oracle VM manager UUID stored in the database   2: Remover the existing Oracle Vm database schema, create a new Oracle VM database schema and use the provided UUID   3: Abort 
   Select Number (1-3): 2Dropping the old database schema 'ovs' ...Creating database schema 'ovs' ...Failed to add Oracle VM Manager schema to Oracle Database
            ORA-02379: profile OVMM_PROFILE already exists
The solution to the problem is quite simple all you need to do is logon to the Oracle database and run the command;
SQL> drop profile OVMM_PROFILE;
Profile dropped. 
SQL>

Owned by Another Manager

It's been a while since I've had to do anything with Oracle VM Manager in my lab environment, mainly because I've been too busy with shuffling emails from customers, who for one reason or another seem to be dragging their feet, nothing new there though.

So back to the problem in hand.  I had an Oracle VM Manager 3.2.8 that was installed on a physical server and I wanted to move it to a virtual machine running as an Exalogic VM guest.  I thought to myself I know I'll get smart and make the VM guest similar to the Exalogic Control VM, after all it is a piece of infrastructure.  After several days hacking round with Exalogic Control going round and round in circles because what I was trying to do was not supported I finally managed to get the new VM on the "EoIB-external-mgmt" network by editing the vm.cfg file and adding the following;
vif = ['type=netfront,mac=00:14:4f:fb:87:61,bridge=xenbr0']
Anyway all of that has nothing to do with "Owned by Another Manager" other than that it happened on the journey.

Knowing the problems I'd had before with my post Server Not Owned By You I decided to install the new Oracle VM Manager with the same UUID using the official documented procedure which is http://docs.oracle.com/cd/E35328_01/E35330/html/vmiug-manager-restoring.html.  You'll notice from the link above that the UUID value is specified in uppercase as shown below.
# ./runInstaller.sh --uuid 0004FB000000100002CB7F2DFFA8D8
I naively took this to mean that the UUID needed to specified in uppercase so I converted my UUID from 0004fb0000010000d1b7eca67025e1c1 to it's uppercase equivalent 0004FB0000010000D1B7ECA67025E1C1, this was my downfall.

DO NOT CONVERT YOUR UUID TO UPPERCASE.

After re-discovering all my servers they were now presented in the Oracle VM Manager UI as "Owned by Another Manager" so I had to uninstall Oracle VM Manager and start again which brings me onto another issue that I encountered ORA-02379: profile OVMM_PROFILE already exists.