星期四, 6月 08, 2017

[Oracle VM 3.4] 如何Reset OVM Manager 與 OVS Server

[Oracle VM 3.4] 如何Reset OVM Manager OVS Server (清除所有VM內部的組態 : dbpool, dbpool_VIP, VM repository, Network...etc)

 

1.備份OVMM 上面的組態

[root@ovmm ~]# 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=0004fb0000010000b6da2e8330b1856b

BUILDID=3.4.2.1384

 

[root@ovmm sysconfig]# cat /etc/sysconfig/ovmm

JVM_MEMORY_MAX=4096m

JVM_MAX_PERM=512m

RUN_OVMM=YES

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

DBBACKUP_CMD=/opt/mysql/meb-3.12/bin/mysqlbackup

UUID=0004fb0000010000b6da2e8330b1856b

 

2.備份OVMM上面的MySQL Database

[root@ovmm sysconfig]# /u01/app/oracle/ovm-manager-3/ovm_tools/bin/BackupDatabase -w

Enter your OVM Manager username: admin

Enter your OVM Manager password:

 

INFO:  Backup job starting with destination:

        /u01/app/oracle/mysql/dbbackup/ManualBackup-20170606_211402

 

        Job Id   = 'Start Backup to: ManualBackup(1496754841989)

Uri: https://localhost:7002/ovm/core/wsapi/rest/Job/14967548419

89'

        Job Name = 'Start Backup to: ManualBackup'

 

INFO:  Backup job finished

 

[root@ovmm sysconfig]#

 

 

(optional) 如果要回復OVMM DB , 方法如下

-----------------------------------------------------------------------------------

Restore :

20170606_211402

su - oracle

bash /u01/app/oracle/ovm-manager-3/ovm_tools/bin/RestoreDatabase.sh ManualBackup-20170606_211402

 

 

#打包備份檔案用, 如果要migration OVMM DB, 需要Copy這個資料夾到其他機器

#tar -zcvf ovmmdb_bak.tar.gz /u01/app/oracle/mysql/dbbackup/ManualBackup-20170606_211402/*

-----------------------------------------------------------------------------------

 

service ovmm stop

service ovmcli stop

 

 

 

[root@ovmm ~]# sh /u01/app/oracle/ovm-manager-3/bin/ovm_upgrade.sh --deletedb --dbsid=ovs --dbpass=Welcome1 --dbport=49500

 

COMMAND: /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/ovm_upgrade.sh --deletedb --dbsid=ovs --dbpass=Welcome1 --dbport=49500

 

Copying deleted classes files to patch path location

2017-06-06 21:29:19,581  INFO Oracle OVM Manager Upgrade Processor

2017-06-06 21:29:19,582  INFO

Jun 06, 2017 9:29:20 PM oracle.security.jps.JpsStartup start

INFO: Jps initializing.

Jun 06, 2017 9:29:21 PM oracle.security.jps.JpsStartup start

INFO: Jps started.

2017-06-06 21:29:21,415  INFO Upgrade Initialization Starting

2017-06-06 21:29:21,508  INFO Oracle Distributed Object Fabric (ODOF): Copyright (C) 2007, 2016 Oracle.  All rights reserved.

2017-06-06 21:29:21,514  INFO ODOF Version: 1.3.1.4

2017-06-06 21:29:21,514  INFO Initializing...

2017-06-06 21:29:22,384  INFO Initialization Complete

2017-06-06 21:29:22,385  INFO Upgrade Initialization Complete

2017-06-06 21:29:22,385  INFO Database Wipe Starting

2017-06-06 21:29:22,386  INFO Wiping Exchange

2017-06-06 21:29:22,410  INFO Initializing / Clearing Database Tables

2017-06-06 21:29:23,583  INFO Wiping Complete!

2017-06-06 21:29:23,584  INFO Database Wipe Complete

 

service ovmcli start

service ovmm stop

 

#生成新的憑證 (admin/ Welcome1 for OVM console : https://ovmm:7002/ovm/console )

sh /u01/app/oracle/ovm-manager-3/bin/configure_client_cert_login.sh

service ovmm start

 

至此, OVMM 的組態已經清空

 

3.Reset OVS db

已實際在Oracle VM 3.4 上面實際測試成功

 

ref: http://ask.chinaunix.net/question/785390

 

Oracle VM server 如何刪除vm manager的管理

登入OVS作業系統上,停止ovs-agent

# service ovs-agent stop

刪除ovs-agent-db

# mv /etc/ovs-agent/db /etc/ovs-agent/db.bak

啟動ovs-agent

# service ovs-agent start

 

接著登入到OVMM Console , OVMM [Servers and VMs] Tab discovery OVS主機即可

沒有留言:

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...