Popular Posts

Showing posts with label OVM. Show all posts
Showing posts with label OVM. Show all posts

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

Jun 22, 2017

ovs-agent fails to start upon reboot on T7 sparc servers


Symptoms :-

                 - ovs-agent fails to start upon reboot on T7 servers
                 - The ovs-agent will be in maintenance state.
                 -  When the service ovm-ovs-config starts, the ilom couldn't communicate with the SP
                 -  From ldmd service logs we can see a problem with ilom interconnect. The connection is restore 1 minute later.
                 -  ilom interconnect seems started after one minute

JUDI-DEV-01# ldm ls-spconfig 
The requested operation could not be performed because the communication 
channel between the LDoms Manager and the system controller is down. 
The ILOM interconnect may be disabled or down (see ilomconfig(1M)). 
JUDI-DEV-01#

JUDI-DEV-01# svcs -xv 
svc:/ovm/ovs-config:default (Oracle VM Server Infrastructure) 
State: maintenance since Mar 17, 2017 10:10:30 AM BST 
Reason: Start method exited with $SMF_EXIT_ERR_FATAL. 
See: http://support.oracle.com/msg/SMF-8000-KS 
See: /var/svc/log/ovm-ovs-config:default.log 
Impact: 2 dependent services are not running: 
svc:/ovm/ovs-agent:default 
svc:/ovm/ovmwatch:default 
JUDI-DEV-01# 

JUDI-DEV-01# tail /var/svc/log/ovm-ovs-config:default.log 
reply = self._do_request('list-%s' % info, args) 
File "/usr/lib/python2.6/site-packages/agent/lib/ldoms/ldmxml.py", line 1845, in _do_request 
_check_reply(reply) 
File "/usr/lib/python2.6/site-packages/agent/lib/ldoms/ldmxml.py", line 2092, in _check_reply 
cmd_replies) 
agent.lib.ldoms.ldmxml.LDMError: failure 
command "list-spconfig": failure (failure: mdstore routine failed to load) 
INFO: The Oracle VM Agent configuration is not valid. 
ERROR: The server does not have a valid configuration to run the Oracle VM Agent. Run the 'ovs-agent-setup configure' command to configure the server. 
[ May 17 11:15:30 Method "start" exited with status 95. ] 
JUDI-DEV-01# 

Workaround :-
Immediate solution when this occurs is to clear the service
               # svcadm clear ovs-config 

Intermediate solution while awaiting integration is to modify the utils.py file with a retry entry:

1.      Goto
               cd /usr/lib/python2.6/site-packages/agent/setup/ldoms 

2.      Save a backup of utils.py
               # cp utils.py utils.py.orig 

3.      Edit utils.py and replace the fist occurance of the string "spconfig = ldm().list_spconfig()" with the retry entry below: (This should be line 58 of 256 )
               #spconfig = ldm().list_spconfig() 
               spconfig = ldm().list_spconfig(retry=20) 

4.      Remove the compiled file utils.pyc
               rm utils.pyc

5.      Reboot the server This will generate a new complied utils.pyc
               reboot

6.      Verify the ovs-config service is online (there may be a delay during transition to online)
               svcs -a | grep ovm



~Judi~

ovs-agent fails
ovs-config fails
ovmwatch fails
The ILOM interconnect may be disabled or down
Oracle Sparc iLOM commands 
Configure iLOM, Configure iLOM IP address; Configure user account in iLOM
OVM Backup
ovmm
backup oracle vm

install oracle vm manager

Jun 12, 2017

Oracle VM Manager 3.x: How to Recover from Data base corruption


APPLIES TO:

Impact Any type of activities like:

  • Upgrading the OVM Setup
  • Cloning Guest VMs
  • Unable to modify any parameter on a Guest VM
  • Unable to delete Guest VM
GOAL :

Repair corrupted Oracle VM database for OVM versions  3.0.x , 3.1.x and 3.2.x  Only,    
DO NOT USE THIS Support article for OVM versions 3.3x or higher
DO NOT USE THIS FOR  any versions of the Oracle Private Cloud Appliance - PCA.
There are two options to recover the Oracle OVM Manager DB  from an ObjectNotFoundException

    1. Restore DB (This is the Preferred Method)

  • Restoring the MYSQL Database
  • Restoring the Oracle Database
  • Validating the Database


    2. Regenerate DB (If  a Backup of the Oracle Manager DB is not available to Restore)

SOLUTION :

Oracle VM Diagnostic Capture

For diagnostic purposes, Oracle Support Services use a script called VMPInfo3 that automatically collects vital troubleshooting information from your Oracle VM environment. This script is installed when you install Oracle VM Manager and is located at
/u01/app/oracle/ovm-manager-3/ovm_shell/tools/vmpinfo/vmpinfo3.sh OR
/u01/app/oracle/ovm-manager-3/ovm_tools/support//vmpinfo3.sh on the Oracle VM Manager system.
./vmpinfo3.sh --username=[admin] --password=[passwd]
Please send /tmp/vmpinfo3-3.x.y.z-20130123-163252.tar.gz to Oracle OVM support

RESTORING A MYSQL DATABASE
Prior to restoring a MySql DB - delete the current one.
The Oracle VM manager services need to be shutdown.

#service ovmm stop 

Using ovm_upgrade.sh from /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin and the values from the .config file, delete the bad database.

#cd /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin 
#sh ovm_upgrade.sh --deletedb --dbuser=ovs --dbpass=<password> --dbhost=localhost --dbport=49500 --dbsid=ovs

Password is same as OVM Manager password. 

Look in your /etc/sysconfig/ovmm file for the value listed for "DBBACKUP". You should see something like this:

DBBACKUP=/u01/app/oracle/mysql/dbbackup 

That is the location on your system where MySQL is storing its backups. Please make note of this directory. Each backup is stored in a directory within the path defined by DBBACKUP. The backup directory is named AutoFullBackup-MMDDYYYY_hhmmss. Within the backup directory is a log file, named AutoBackup.log, containing information about the events that took place during the backup process. The backup directory contains a backup of the MySQL configuration file, a datadir directory containing the binary log for the database, a meta directory containing files specific to the MySQL Enterprise Backup process that was run at the time, and the actual MBI image file for the database that is backed up.

Only the 15 most recent backups are maintained within the DBBACKUP path. Manual backups, where the backup directory name is not prepended with AutoFullBackup, are ignored by the rotation. The trick in restoring the database is making sure that you have a good DB to restore, as your backups may also be corrupt.

To restore the database to one of the available backups, the manager and the database need to be shut down:

For example as the root user execute the following commands:

# service ovmm stop; service ovmm_mysql stop 

To initiate the restore, as the oracle user, use the RestoreDatabase.sh command located in the /u01/app/oracle/ovm-manager-3/ovm_tools/bin/

For example:

# su - oracle 
$ sh /u01/app/oracle/ovm-manager-3/ovm_tools/bin/RestoreDatabase.sh AutoFullBackup-10222012_162543 
INFO: Expanding the backup image...
INFO: Applying logs to the backup snapshot...
INFO: Restoring the backup...
INFO: Success - Done!
INFO: Log of operations performed is available at:
/u01/app/oracle/mysql/dbbackup/AutoFullBackup-10172012_122920/Restore.log

after that start the services.

#service ovmm_mysql start 
#service ovmm start 



Oracle Knowledge Base:
KM Oracle VM: Error Message `No such object (level 1), cluster is null` ( Doc ID 2073727.1 )
KM Oracle VM Manager 3.x: How to Recover from Data base corruption including "ObjectNotFound Exception" Errors ( Doc ID 1555915.1 )



~judi~
Unable to modify any parameter on a Guest VM;
Unable to delete Guest VM;
Oracle VM Manager 3;
How to Recover from Data base corruption;
Oracle VM Manager 3.x: How to Recover from Data base corruption
Oracle OVM Manager DB  from an ObjectNotFoundException;
backup oracle vm
install oracle vm manager

Popular Posts