Step 1: Copy the Oracle VM Manager configuration file
[root@mgmtsrv ~]# ssh root@ovm.lab.local
root@ovm.lab.local's password:
Last login: Sun Dec 17 02:59:42 2017 from 10.10.10.1
[root@ovm ~]# mkdir /opt/OVM_Backup
[root@ovm ~]# cp /u01/app/oracle/ovm-manager-3/.config /opt/OVM_Backup/
Step 2: Backup MySQL database repository
[root@ovm ~]# /u01/app/oracle/ovm-manager-3/ovm_tools/bin/BackupDatabase -w
Enter your OVM Manager username: admin
Enter your OVM Manager password: ## Enter VM Manager admin password ##
INFO: Backup job starting with destination:
/u01/app/oracle/mysql/dbbackup/ManualBackup-20171217_053626
Job Id = 'Start Backup to: ManualBackup(1513506985746) Uri: https://localhost:7002/ovm/core/wsapi/rest/Job/1513506985746'
Job Name = 'Start Backup to: ManualBackup'
INFO: Backup job finished
[root@ovm ~]# cp -r /u01/app/oracle/mysql/dbbackup/ManualBackup-20171217_053626 /opt/OVM_Backup/
Don’t forget to take backup of Oracle VM Manager UUID is persisted in the /etc/sysconfig/ovmm file
[root@ovm ~]# cp /etc/sysconfig/ovmm /opt/OVM_Backup
/
Please make sure that you have taken above necessary backup before upgrade/reinstall or migrate the Oracle VM Manager.
[root@ovm ~]# ls -a /opt/OVM_Backup/
. .. .config ManualBackup-20171217_053626 ovmm
Step 3: Uninstall the Oracle VM Manager
Make sure you have MySQL repository backup before you start the uninstallation.
[root@ovm mnt]# ls -l /u01/app/oracle/mysql/dbbackup/
drwxr-xr-x 5 oracle dba 4096 Dec 12 04:52 ManualBackup-20171217_053626
Stop VM manager related services
[root@ovm mnt]# /etc/init.d/ovmcli stop
Stopping Oracle VM Manager CLI [ OK ]
[root@ovm mnt]# /etc/init.d/ovmm_mysql stop
Shutting down OVMM MySQL.... SUCCESS!
[root@ovm mnt]# /etc/init.d/ovmm stop
Stopping Oracle VM Manager [ OK ]
Uninstall the VM Manager
[root@ovm mnt]# ./runInstaller.sh -n
Oracle VM Manager Release 3.3.3 Installer
Oracle VM Manager Installer log file:
/var/log/ovmm/ovm-manager-3-install-2017-12-14-024725.log
Please select an installation type:
1: Install
2: Upgrade
3: Uninstall
4: Help
Select Number (1-4): 3
Begin uninstalling Oracle VM Manager:
1: Continue
2: Abort
Select Number (1-2): 1
Uninstall Oracle VM Manager
DB component : MySQL RPM package
MySQL RPM package installed by OVMM was found...
Removing MySQL RPM package installation ...
Product component : Java in '/u01/app/oracle/java/'
Java is installed ...
Removing Java installation ...
Product component : Oracle VM Manager in '/u01/app/oracle/ovm-manager-3/'
Oracle VM Manager is installed ...
Removing Oracle VM Manager installation ...
Product component : Oracle WebLogic Server in '/u01/app/oracle/Middleware/'
Oracle WebLogic Server is installed
Removing Oracle WebLogic Server installation ...
Service ovmm is deleted.
Service ovmcli is deleted.
Uninstall completed ...
Step 4: Re-Install the Oracle VM Manager
Note down the old VM Manager UUID value
[root@ovm ~]# cat /etc/sysconfig/ovmm
RUN_OVMM=YES
USETLS1=YES
DBBACKUP_CMD=/opt/mysql/meb-3.12/bin/mysqlbackup
JVM_MAX_PERM=512m
JVM_MEMORY_MAX=4096m
DBBACKUP=/u01/app/oracle/mysql/dbbackup
UUID=0004fb000001000060c2c1d955c85575
Reuse the same usernames and password for the database schema, Oracle WebLogic Server and Oracle VM Manager administration user.
[root@ovm mnt]# ./runInstaller.sh -n --uuid 0004fb000001000060c2c1d955c85575
Oracle VM Manager Release 3.3.3 Installer
Oracle VM Manager Installer log file:
/var/log/ovmm/ovm-manager-3-install-2017-12-14-025058.log
Please select an installation type:
1: Install
2: Upgrade
3: Uninstall
4: Help
Select Number (1-4): 1
Starting production with local database installation ...
Ignoring prerequisites check ...
One password is used for all users created and used during the installation.
Enter a password for all logins used during the installation: ##Enter Oracle VM Manager admin password##
Enter a password for all logins used during the installation (confirm): ##Re-enter Oracle VM Manager admin password##
Please enter your fully qualified domain name, e.g. ovs123.us.oracle.com, (or IP address) of your management server for SSL certification generation 10.10.10.151 [ovm.lab.local]:
Verifying configuration ...
Start installing Oracle VM Manager:
1: Continue
2: Abort
Select Number (1-2): 1
Step 1 of 9 : Database Software...
......
......
Please wait while WebLogic configures the applications...
Oracle VM Manager installed.
Installation Summary
--------------------
Database configuration:
Database type : MySQL
Database host name : localhost
Database name : ovs
Database listener port : 49500
Database user : ovs
Weblogic Server configuration:
Administration username : weblogic
Oracle VM Manager configuration:
Username : admin
Core management port : 54321
UUID : 0004fb000001000060c2c1d955c85575
Passwords:
There are no default passwords for any users. The passwords to use for Oracle VM Manager, Database, 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:
https://ovm.lab.local:7002/ovm/console
Log in with the user 'admin', and the password you set during the installation.
Note that you must install the latest ovmcore-console package for your Oracle Linux distribution to gain VNC and serial console access to your Virtual Machines (VMs).
Please refer to the documentation for more information about this package.
For more information about Oracle Virtualization, please visit:
http://www.oracle.com/virtualization/
Oracle VM Manager installation complete.
Step 5: Restore Oracle VM Manager from backup
Before restoring the backup, First we need to stop Oracle VM Manager related services.
[root@ovm ~]# /etc/init.d/ovmcli stop
Stopping Oracle VM Manager CLI [ OK ]
[root@ovm ~]# /etc/init.d/ovmm_mysql stop
Shutting down OVMM MySQL.... SUCCESS!
[root@ovm ~]# /etc/init.d/ovmm stop
Stopping Oracle VM Manager [ OK ]
Before restore the database, we need to make sure that no database files already exist on the Oracle VM Manager host.
[root@ovm ~]# cd /u01/app/oracle/mysql/data/
[root@ovm data]# rm -rf appfw ibdata1 ib_logfile0 ib_logfile1 mysql ovs performance_schema
[root@ovm data]# ls -a
. .. auto.cnf my.cnf .mysqlconfig mysqld.err
Switch to oracle user to start the restore process.
[root@ovm ~]# su - oracle
[oracle@ovm ~]$ bash /u01/app/oracle/ovm-manager-3/ovm_tools/bin/RestoreDatabase.sh ManualBackup-20171217_053626
INFO: Restore area already exist... Cleaning up...
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/ManualBackup-20171217_053626/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@ovm ~]$ exit
logout
Start the Oracle VM Manager related services
[root@ovm ~]# /etc/init.d/ovmm_mysql start
Starting OVMM MySQL..... SUCCESS!
[root@ovm ~]# /etc/init.d/ovmm start
Starting Oracle VM Manager [ OK ]
[root@ovm ~]# /etc/init.d/ovmcli start
Starting Oracle VM Manager CLI [ OK ]
Regenerate the Certificate to authenticate the Oracle VM Manager Web Interface and Oracle VM Manager Command Line Interface.
[root@ovm ~]# export MW_HOME=/u01/app/oracle/Middleware
[root@ovm ~]# /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/ovmkeytool.sh setupWebLogic
libdir is /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/../lib
Updating keystore information in WebLogic
Oracle MiddleWare Home (MW_HOME): [/u01/app/oracle/Middleware]
WebLogic domain directory: [/u01/app/oracle/ovm-manager-3/domains/ovm_domain]
WebLogic server name: [AdminServer]
WebLogic username: [weblogic]
WebLogic password: [********] ## Enter VM Manager admin password ##
WLST session logged at: /tmp/wlst-session5880304361437212296.log
[root@ovm ~]# /etc/init.d/ovmm restart
Stopping Oracle VM Manager [ OK ]
Starting Oracle VM Manager [ OK ]
Execute client certificate configuration script and restart OVMM daemon
[root@ovm ~]# /u01/app/oracle/ovm-manager-3/bin/configure_client_cert_login.sh
Please enter the OVM Manager username: admin
Please enter the OVM Manager password: ## Enter VM Manager admin password ##
CLASSPATH=/u01/app/oracle/java/lib/tools.jar:/u01/app/oracle/Middleware/wlserver/server/lib/weblogic_sp.jar:/u01/app/oracle/Middleware/wlserver/server/lib/weblogic.jar:/u01/app/oracle/Middleware/wlserver/server/lib/webservices.jar:/u01/app/oracle/Middleware/oracle_common/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/u01/app/oracle/Middleware/oracle_common/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/u01/app/oracle/Middleware/wlserver/modules/features/oracle.wls.common.nodemanager_1.0.0.0.jar:
PATH=/u01/app/oracle/Middleware/wlserver/server/bin:/u01/app/oracle/Middleware/oracle_common/modules/org.apache.ant_1.7.1/bin:/u01/app/oracle/java/jre/bin:/u01/app/oracle/java/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/u01/app/oracle/Middleware/oracle_common/modules/org.apache.maven_3.0.4/bin
.....
.....
BUILD SUCCESSFUL
Total time: 25 seconds
Client certificate login configuration complete
[root@ovm ~]# /etc/init.d/ovmm restart
Stopping Oracle VM Manager [ OK ]
Starting Oracle VM Manager [ OK ]