Popular Posts

Dec 18, 2017

OVM 3.4.4 Reinstallation

OVM reinstallation

- During the upgrade process, the ovmm service was deleted and the MySQL DB tables were already existing and were not deleted. There was network issue and the upgrade failed.
- Uninstall the OVM manager version 3.4.1 - Uninstall old manager by mounting OVM 3.4.1 ISO.
- Reinstall the OVM manager version 3.4.4 - Re-installing with uuid using the OVM 3.4.4 ISO.
- Regeneration the database by referring to "Oracle VM: How To Regenerate The OVM 3.3.x/3.4.x DB ( Doc ID 2038168.1 )".

Mount the IOS V137364-01.iso in /mnt
Uninstall the OVM manager version 3.4.1 - Uninstall old manager by mounting OVM 3.4.1 ISO.
[root@judi-dev-01 mnt]# ls -ltr
total 157510
-rw-r--r--. 1 root root   4291939 May  7  2016 OvmSDK_3.4.1.1369.zip
-rw-r--r--. 1 root root       230 May  7  2016 oracle-validated.params
-r-xr-x---. 1 root root     11556 May  7  2016 createOracle.sh
-rw-r--r--. 1 root root       372 May  7  2016 sample.yml
-r-xr-x---. 1 root root      1919 May  7  2016 runInstaller.sh
-rw-r--r--. 1 root root      6960 May  7  2016 LICENSE
-rw-r--r--. 1 root root      6960 May  7  2016 EULA
drwxr-xr-x. 7 root root      8192 May  7  2016 components
-r--r--r--. 1 root root      2031 May  7  2016 TRANS.TBL
-r-xr-x---. 1 root root 156958046 May  7  2016 ovmm-installer.bsx
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]# chmod 777 createOracle.sh
chmod: changing permissions of `createOracle.sh': Read-only file system
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]# ./createOracle.sh
Adding group 'oinstall' with gid '55033' ...
groupadd: group 'oinstall' already exists
Adding group 'dba'
groupadd: group 'dba' already exists
Adding user 'oracle' with user id '111533', initial login group 'dba', supplementary group 'oinstall' and  home directory '/home/oracle' ...
User 'oracle' already exists ...
uid=500(oracle) gid=101(dba) groups=101(dba),201(dba),202(oper),506(asmdba)
Creating user 'oracle' succeeded ...
For security reasons, no default password was set for user 'oracle'. If you wish to login as the 'oracle' user, you will need to set a password for this account.
Verifying user 'oracle' OS prerequisites for Oracle VM Manager ...
oracle  soft    nofile          8192
oracle  hard    nofile          65536
oracle  soft    nproc           2048
oracle  hard    nproc           16384
oracle  soft    stack           10240
oracle  hard    stack           32768
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 ...
Changing '/u01' permission to 755 ...
Changing '/u01/app' permission to 755 ...
Changing '/u01/app/oracle' permission to 755 ...
Modifying iptables for OVM
Adding rules to enable access to:
     7002  : Oracle VM Manager https
       123 : NTP
     10000 : Oracle VM Manager CLI Tool
service iptables status: stop
iptables: Applying firewall rules:                         [  OK  ]
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
Rules added.
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]# ./runInstaller.sh

Oracle VM Manager Release 3.4.1 Installer

Oracle VM Manager Installer log file:
/var/log/ovmm/ovm-manager-3-install-2017-12-08-183014.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 : ovmcore-console RPM package
ovmcore-console RPM Package is installed ...
Removing ovmcore-console 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 not installed

Product component : Oracle WebLogic Server in '/u01/app/oracle/Middleware/'
Oracle WebLogic Server is installed

Removing Oracle WebLogic Server installation ...

Uninstall completed ...
[root@judi-dev-01 mnt]#

Reinstall the OVM manager version 3.4.4 - Re-installing with uuid using the OVM 3.4.4 ISO
Once the uninstallation completed, Mount the 3.4.4 ISO in /mnt ovmm-3.4.4-installer-OracleLinux-b1709.iso
[root@judi-dev-01 mnt]# ls -ltr
total 157675
-rw-r--r--. 1 root root   4292233 Aug 16 07:10 OvmSDK_3.4.4.1709.zip
-rw-r--r--. 1 root root       230 Aug 16 07:13 oracle-validated.params
-r-xr-x---. 1 root root     11556 Aug 16 07:13 createOracle.sh
-rw-r--r--. 1 root root       372 Aug 16 07:14 sample.yml
-r-xr-x---. 1 root root      1919 Aug 16 07:14 runInstaller.sh
drwxr-xr-x. 7 root root      8192 Aug 16 07:14 components
-r--r--r--. 1 root root      1596 Aug 16 07:14 TRANS.TBL
-r-xr-x---. 1 root root 157140866 Aug 16 07:14 ovmm-installer.bsx
[root@judi-dev-01 mnt]# 
[root@judi-dev-01 mnt]# 
[root@judi-dev-01 mnt]# 
[root@judi-dev-01 mnt]# 
[root@judi-dev-01 mnt]# ./createOracle.sh
Adding group 'oinstall' with gid '55033' ...
groupadd: group 'oinstall' already exists
Adding group 'dba'
groupadd: group 'dba' already exists
Adding user 'oracle' with user id '111533', initial login group 'dba', supplementary group 'oinstall' and  home directory '/home/oracle' ...
User 'oracle' already exists ...
uid=500(oracle) gid=101(dba) groups=101(dba),201(dba),202(oper),506(asmdba)
Creating user 'oracle' succeeded ...
For security reasons, no default password was set for user 'oracle'. If you wish to login as the 'oracle' user, you will need to set a password for this account.
Verifying user 'oracle' OS prerequisites for Oracle VM Manager ...
oracle  soft    nofile          8192
oracle  hard    nofile          65536
oracle  soft    nproc           2048
oracle  hard    nproc           16384
oracle  soft    stack           10240
oracle  hard    stack           32768
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 ...
Changing '/u01' permission to 755 ...
Changing '/u01/app' permission to 755 ...
Changing '/u01/app/oracle' permission to 755 ...
Modifying iptables for OVM
Adding rules to enable access to:
     7002  : Oracle VM Manager https
       123 : NTP
     10000 : Oracle VM Manager CLI Tool
service iptables status: stop
iptables: Applying firewall rules:                         [  OK  ]
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
Rules added.
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]#

Copy the UUDI from the file /etc/sysconfig/ovmm

[root@judi-dev-01 mnt]# ./runInstaller.sh --uuid=0004db0000010000en93ae3f7825f78v

Oracle VM Manager Release 3.4.4 Installer

Oracle VM Manager Installer log file:
/var/log/ovmm/ovm-manager-3-install-2017-12-08-183346.log

Please select an installation type:
   1: Install
   2: Upgrade
   3: Uninstall
   4: Help

   Select Number (1-4): 1

Verifying installation prerequisites ...

Starting production with local database installation ...

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):

Please enter your fully qualified domain name, e.g. ovs123.us.oracle.com, (or IP address) of your management server for SSL certification generation 192.168.0.10 [judi-dev-01]:  192.168.0.10

Verifying configuration ...

Start installing Oracle VM Manager:
   1: Continue
   2: Abort

   Select Number (1-2): 1

Step 1 of 7 : Database Software ...
Installing Database Software...
Retrieving MySQL Database 5.6 ...
Unzipping MySQL RPM File ...
Installing MySQL 5.6 RPM package ...
Configuring MySQL Database 5.6 ...
Installing MySQL backup RPM package ...

Step 2 of 7 : Java ...
Installing Java ...

Step 3 of 7 : WebLogic and ADF ...
Retrieving Oracle WebLogic Server 12c and ADF ...
Installing Oracle WebLogic Server 12c and ADF ...
Applying patches to Weblogic ...
Applying patch to ADF ...

Step 4 of 7 : Oracle VM ...
Installing Oracle VM Manager Core ...
Retrieving Oracle VM Manager Application ...
Extracting Oracle VM Manager Application ...

Retrieving Oracle VM Manager Upgrade tool ...
Extracting Oracle VM Manager Upgrade tool ...
Installing Oracle VM Manager Upgrade tool ...

Retrieving Oracle VM Manager CLI tool ...
Extracting Oracle VM Manager CLI tool...
Installing Oracle VM Manager CLI tool ...
Installing Oracle VM Manager WLST Scripts ...

Step 5 of 7 : Domain creation ...
Creating domain ...

Step 6 of 7 : Oracle VM Tools ...

Retrieving Oracle VM Manager Shell & API ...
Extracting Oracle VM Manager Shell & API ...
Installing Oracle VM Manager Shell & API ...

Retrieving Oracle VM Manager Wsh tool ...
Extracting Oracle VM Manager Wsh tool ...
Installing Oracle VM Manager Wsh tool ...

Retrieving Oracle VM Manager Tools ...
Extracting Oracle VM Manager Tools ...
Installing Oracle VM Manager Tools ...

Retrieving ovmcore-console ...
Installing ovmcore-console RPM package ...
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' ...

Step 7 of 7 : Start OVM Manager ...
Enabling Oracle VM Manager service ...
Shutting down Oracle VM Manager instance ...
Starting Oracle VM Manager instance ...

Please wait while WebLogic configures the applications...
Trying to connect to core via ovmwsh (attempt 1 of 20) ...
Trying to connect to core via ovmwsh (attempt 2 of 20) ...
Trying to connect to core via ovm_shell (attempt 1 of 5)...
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                        : 0004db0000010000en93ae3f7825f78v


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://192.168.0.10:7002/ovm/console
Log in with the user 'admin', and the password you set during the installation.

For more information about Oracle Virtualization, please visit:
  http://www.oracle.com/virtualization/

Oracle VM Manager installation complete.

Please remove configuration file /tmp/ovm_configa1GOEu.
[root@judi-dev-01 mnt]# service ovmm status
Oracle VM Manager is running...
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]# cat /etc/sysconfig/ovmm
RUN_OVMM=YES
UUID=0004db0000010000en93ae3f7825f78v
DBBACKUP_CMD=/opt/mysql/meb-3.12/bin/mysqlbackup
JVM_MAX_PERM=512m
JVM_MEMORY_MAX=4096m
DBBACKUP=/u01/app/oracle/mysql/dbbackup
[root@judi-dev-01 mnt]#
[root@judi-dev-01 mnt]#


Regeneration the database by referring to "Oracle VM: How To Regenerate The OVM 3.3.x/3.4.x DB ( Doc ID 2038168.1 )". 
Regenerate The OVM 3.3.x/3.4.x DB

The Oracle VM manager services need to be shutdown, to delete the OVM manager database.
#service ovmm stop

Using ovm_upgrade.sh from /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin and the values from the /u01/app/oracle/ovm-manager-3/.config file, delete the bad database
Obtain the values to substitute from the /u01/app/oracle/ovm-manager-3/.config on a management node:
# cat /u01/app/oracle/ovm-manager-3/.config
DBTYPE=MySQL
DBHOST=localhost
SID=ovs             < --dbsid
LSNR=1521           < --dbport
OVSSCHEMA=ovs       < --dbuser
APEX=8080
WLSADMIN=weblogic
OVSADMIN=admin
COREPORT=54321
UUID=0004fb00000100009bfa6a96c1303e32
BUILDID=3.2.11.775

Sample command based on the above sample .config file:
sh /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/ovm_upgrade.sh --deletedb --dbuser=ovs --dbpass=Welcome1 --dbhost=localhost --dbport=1521 --dbsid=ovs 

Generate the replacement certificate
#export MW_HOME=/u01/app/oracle/Middleware
#/u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/ovmkeytool.sh setupWebLogic

Start the OVM services and to generate new certificates.
#service ovmm start
#sh /u01/app/oracle/ovm-manager-3/bin/configure_client_cert_login.sh

Stop then start the OVM service apply the new certificate.
#service ovmm stop
#service ovmm start


Repopulate the database
1) Login, the UI should be EMPTY of  any data. The OVM servers and VMs are still up and running, the poolFS and repos already exist
2) Repopulate the database by Rediscovering the environment using the Oracle OVM Manager UI.
The OVM database is rebuilt from the existing servers in the pool, so the relationships will already be established.  The Servers and VMs are up and running, the pool filesystem the storage repositories are on the servers.
a. Discover Server(s) -> Pool/OVM Server(s) will be visible again
        If your storage is network based, validate that your servers are listed under the storage tab.
        If not "Discover server" and enter the name and IP of the storage array.
b. Refresh Repository (right click each storage, and choose refresh
c. Rediscover Server(s) -> VM's will reappear under the OVM Server(s). Non running VM's can be found under "Unassigned Virtual Machines"
d. Run VNIC Manager to recreate a range of MAC addresses, because only the MAC addresses in use will have been rediscovered


Restore the simple names
This Database will be populated, but you will be missing items such as friendly disk names, display names for Vdisk, Vnics etc. (meta data)
Please refer to KM article: Restore OVM Manager "Simple Names" After a Rebuild/Reinstall (Doc ID 2129616.1)   to restore the friendly names.
After the friendly names have been restored,
Logout, and close the browser.
Open a browser, and login.
The data base should be up and working with the friendly names (meta data)



~Judi~
OVM Reinstallation
Uninstall the OVM manager version 3.4.1
Reinstall the OVM manager version 3.4.4
Install OVM manager 3.4.4
V137364-01.iso
Regenerate The OVM 3.3.x/3.4.x DB
Repopulate the database
Restore the simple names
Reinstall OVM 3.4.1
Reinstall OVM 3.4.3
Reinstall OVM 3.4.4
Install OVM 3.4.1
Install OVM 3.4.3
Install OVM 3.4.4
Install Oracle VM Manager 3.4.4
Install Oracle VM Manager 3.4.3

Install Oracle VM Manager 3.4.2
Oracle VM Manager 3.4
Oracle VM Manager 3.3

Oracle VM Manager 3.2

Dec 11, 2017

Restore OVM Manager Simple Names After a Rebuild/Reinstall

Restore OVM Manager "Simple Names" After a Rebuild/Reinstall

APPLIES TO:
Oracle VM - Version 3.3.1 and later
Linux x86-64

GOAL:
There are occasions when a re-install of OVM Manager is required, together with restoration of a previously backed-up database. However, the manager database restore does not recover the "simple names" of objects - e.g. virtual machine and disk names, even though the backup saves these in an xml file.

The automated backup creates the required xml file in the /u01/app/oracle/mysql/dbbackup directory - filename format /u01/app/oracle/mysql/dbbackup/OVMModelExport-yyyymmdd_nnnnnn.xml

Ensure a copy of the backed-up file will be available to perform the restore.The attached ovm_shell scripts will restore these simple names from the xml file created from an automated or manual backup of the manager database.

The xml file will be generated in /u01/app/oracle/mysql/dbbackup (3.3, 3.4)
              cd /u01/app/oracle/mysql/dbbackup
              OVMModelExport-yyyymmdd_nnnnnn.xml

To restore the simple names from the backup, download the appropriate script attached to this document and run it.   
From Google Drive - Download restoreSimpleName script for 3.3 and 3.4(21.22 KB)

              cd /u01/app/oracle/ovm-manager-3/ovm_shell
              ovm_shell.sh -u <USERNAME> -p <PASSWORD> -i /tmp/restoreSimpleName-3.3.py /u01/app/oracle/mysql/dbbackup/OVMModelExport-yyyymmdd_nnnnnn.xml
              JUDI-DEV-01 # : ./ovm_shell.sh -u admin -p Pr0jectFun -i /tmp/restoreSimpleName-3.3-v1.2.py /u01/app/oracle/mysql/dbbackup/OVMModelExport-20171105_896756.bkp..xml

It may be necessary to omit the ".py" suffix when calling the python from ovm_shell, e.g.
              OVM > ovm_shell.sh -u <USERNAME> -p <PASSWORD> -i /tmp/restoreSimpleName-3.3 /u01/app/oracle/mysql/dbbackup/OVMModelExport-yyyymmdd_nnnnnn.xml


Oracle Doc ID 2129616.1


~Judi~
Restore OVM Manager Simple Names After a Rebuild/Reinstall
Restore OVM Manager
OVM Manager Rebuild
OVM Manager Reinstall
OVM Manager Upgrade

Popular Posts