(Oracle Virtual Machine) OVM – 3.4.4
Here when logged into the OVM Manager console , we see that the status of the server in the Server pool shows as “Starting” and not as STARTED , this is happened after usually the server migration from one server pool to other, or simply when you start the server after its been stopped.
When connected to the OVM command line interface, we see as below:-
[root@oravmanager ~]# ssh admin@localhost -p 10000 admin@localhost's password: OVM> showversion 3.4.4.1709 OVM> list server Command: list server Status: Success Time: 2018-10-02 06:53:19,051 IST Data: id:38:37:30:35:34:36:47:53:48:30:32:35:58:36:36:41 name:ovmsrv OVM> refresh server name=ovmsrv Command: refresh server name=ovmsrv Status: Failure Time: 2018-10-02 06:53:26,133 IST Error Msg: GEN_000000:An exception occurred during processing: No such object (level 1), cluster is null: <4414> Tue Oct 02 06:53:26 IST 2018 OVM> exit Connection to localhost closed.
Here we see when we try to refresh the server in OVM manager, we see the error as “Error Msg: GEN_000000:An exception occurred during processing: No such object (level 1), cluster is null: <4414>” . Same error details also can be found under AdminServer.log
“/u01/app/oracle/ovm-manager-3/domains/ovm_domain/servers/AdminServer/logs/AdminServer.log”
Disclaimer:- This is caused by several other reasons as well, But in out case we found it as the OVM manager DB corruption.
Now, how to get this resolved? Below are the steps.
Step 1. Check what type of database you are using in the OVM Manager server. to check that one can simply use below file to see.
[root@oravmanager ~]# cat /u01/app/oracle/ovm-manager-3/.config DBTYPE=MySQL DBHOST=localhost SID=ovs LSNR=49500 OVSSCHEMA=ovs APEX=8080 WLSADMIN=weblogic OVSADMIN=admin COREPORT=54321 UUID=0004fb00000100007735234a551682f7 BUILDID=3.4.4.1709
Step 2. Check if you have the database backup available, in our case we did have that, but if you don’t you might have to recreate the OVM manager database.
[root@oravmanager ~]# ls -lhrt /u01/app/oracle/mysql/dbbackup/ total 1.9M drwx------. 4 oracle dba 4.0K Mar 16 2018 AutoFullBackup-20180316_121334 drwx------. 4 oracle dba 4.0K Mar 17 2018 AutoFullBackup-20180317_121349 drwx------. 4 oracle dba 4.0K Mar 18 2018 AutoFullBackup-20180318_121406 drwx------. 4 oracle dba 4.0K Mar 19 2018 AutoFullBackup-20180319_121419 drwx------. 4 oracle dba 4.0K Mar 20 2018 AutoFullBackup-20180320_121436 drwx------. 4 oracle dba 4.0K Mar 21 2018 AutoFullBackup-20180321_121450 drwx------. 4 oracle dba 4.0K Mar 22 2018 AutoFullBackup-20180322_121506 drwx------. 4 oracle dba 4.0K Mar 23 2018 AutoFullBackup-20180323_121520 drwx------. 4 oracle dba 4.0K Mar 24 2018 AutoFullBackup-20180324_121533 drwx------. 4 oracle dba 4.0K Mar 25 2018 AutoFullBackup-20180325_121547 drwx------. 4 oracle dba 4.0K Mar 26 2018 AutoFullBackup-20180326_121600 drwx------. 4 oracle dba 4.0K Mar 27 2018 AutoFullBackup-20180327_121614 -rw-r-----. 1 oracle dba 182K Mar 27 2018 OVMModelExport-20180327_122505.xml drwx------. 4 oracle dba 4.0K Mar 28 2018 AutoFullBackup-20180328_121630 -rw-r-----. 1 oracle dba 182K Mar 28 2018 OVMModelExport-20180328_122508.xml drwx------. 4 oracle dba 4.0K Mar 29 2018 AutoFullBackup-20180329_121642 -rw-r-----. 1 oracle dba 182K Mar 29 2018 OVMModelExport-20180329_122511.xml drwx------. 4 oracle dba 4.0K Mar 30 2018 AutoFullBackup-20180330_121655 -rw-r-----. 1 oracle dba 182K Mar 30 2018 OVMModelExport-20180330_122514.xml drwx------. 4 oracle dba 4.0K Mar 31 2018 AutoFullBackup-20180331_121709 -rw-r-----. 1 oracle dba 182K Mar 31 2018 OVMModelExport-20180331_122518.xml drwx------. 4 oracle dba 4.0K Apr 1 2018 AutoFullBackup-20180401_121726 -rw-r-----. 1 oracle dba 182K Apr 1 2018 OVMModelExport-20180401_122521.xml drwx------. 4 oracle dba 4.0K Apr 2 2018 AutoFullBackup-20180402_121743 -rw-r-----. 1 oracle dba 182K Apr 2 2018 OVMModelExport-20180402_122524.xml drwx------. 4 oracle dba 4.0K Apr 3 12:18 AutoFullBackup-20180403_121757 -rw-r-----. 1 oracle dba 182K Apr 3 12:25 OVMModelExport-20180403_122527.xml drwx------. 4 oracle dba 4.0K Apr 4 12:18 AutoFullBackup-20180404_121813 -rw-r-----. 1 oracle dba 182K Apr 4 12:25 OVMModelExport-20180404_122531.xml drwx------. 4 oracle dba 4.0K Apr 5 12:18 AutoFullBackup-20180405_121827 -rw-r-----. 1 oracle dba 182K Apr 5 12:25 OVMModelExport-20180405_122534.xml
Step 3. Restore the Most recent backup, note that this will not impact the current VM and servers running in the environment, this can be performed safely.
Firstly stop the OVM manager services.
Secondly restore the Backup -(Use oracle user)
Lastly start the OVM Manager services.
[root@oravmanager ~]# /sbin/service ovmcli stop
Stopping Oracle VM Manager CLI [ OK ]
[root@oravmanager ~]# /sbin/service ovmm stop
Stopping Oracle VM Manager [ OK ]
[root@oravmanager ~]# /sbin/service ovmm_mysql stop
Shutting down OVMM MySQL... [ OK ]
[root@oravmanager ~]# su - oracle
[oracle@oravmanager ~]$ bash /u01/app/oracle/ovm-manager-3/ovm_tools/bin/RestoreDatabase.sh AutoFullBackup-20180405_121827
Before the database can be restored, the following database directories/files must be deleted:
appfw ibdata1 ib_logfile0 ib_logfile1 mysql ovs performance_schema
Are you sure it is safe to delete these directories/files now? [y,n] y
Deleting /u01/app/oracle/mysql/data/appfw
Deleting /u01/app/oracle/mysql/data/ibdata1
Deleting /u01/app/oracle/mysql/data/ib_logfile0
Deleting /u01/app/oracle/mysql/data/ib_logfile1
Deleting /u01/app/oracle/mysql/data/mysql
Deleting /u01/app/oracle/mysql/data/ovs
Deleting /u01/app/oracle/mysql/data/performance_schema
INFO: Expanding the backup image...
INFO: Applying logs to the backup snapshot...
INFO: Restoring the backup...
INFO: Restoring OVM keystores and certificates
INFO: Success - Done!
INFO: Log of operations performed is available at: /u01/app/oracle/mysql/dbbackup/AutoFullBackup-20180405_121827/Restore.log
IMPORTANT:
As 'root', please start the OVM Manager database and application using:
service ovmm_mysql start; service ovmm start; service ovmcli start
[oracle@oravmanager ~]$ less /u01/app/oracle/mysql/dbbackup/AutoFullBackup-20180405_121827/Restore.log
[oracle@oravmanager ~]$ logout
[root@oravmanager ~]#
[root@oravmanager ~]# /sbin/service ovmm_mysql start
Starting OVMM MySQL... [ OK ]
[root@oravmanager ~]# /sbin/service ovmm start
Starting Oracle VM Manager [ OK ]
[root@oravmanager ~]# /sbin/service ovmcli start
Starting Oracle VM Manager CLI [ OK ]
[root@oravmanager ~]#
[root@oravmanager ~]# ssh admin@localhost -p 10000
admin@localhost's password:
OVM> list server
Command: list server
Status: Success
Time: 2018-10-02 08:10:40,755 IST
Data:
id:38:37:30:35:34:36:47:53:48:30:32:35:58:36:36:41 name:ovmsrv
OVM> refresh server name=ovmsrv
Command: refresh server name=ovmsrv
Status: Success
Time: 2018-10-02 08:11:12,535 IST
JobId: 1538448058915
OVM>
Now login to OVM console and check the status