OVM Disaster Recovery In A Box (Part 3 of 5)

Continued from Part 2 of 5:

OVMMDR1

  • create a VM based on Oracle Linux 64bit OS
  • rename the VM to ovmmdr1
  • Give the VM 4gb memory and 2 cpu’s
  • Give the VM a 30gb hard drive
  • configure ovmmdr1 with the following network adapters:
    adapter 1: (Host Only) DR Management
    adapter 2: (NAT Network) DRPublic

  • boot the VM and install Oracle Linux 6.5 and select the Desktop server type.
    We do this so you have a GUI to log into- if that’s not a priority for you personally, then just pick Basic server

  • configure the VM with the following information:


Host Name: ovmmdr1
IP Address (eth0): 10.1.12.110
IP Netmask: 255.255.255.0
IP Address (eth1): 192.168.12.110
IP Netmask: 255.255.255.0
Default Router: 10.1.12.1
DNS Server: 127.0.0.1
Root Password: Way2secure

  • turn off iptables and selinux:


[root@ovmmdr1 ~]# service iptables stop ; chkconfig iptables off
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@ovmmdr1 ~]#

[root@ovmmdr1 ~]# setenforce 0
setenforce: SELinux is disabled
[root@ovmmdr1 ~]#

[root@ovmmdr1 ~]# vi /etc/selinux/config

NOTE: Set SELINUX=disabled in file below:

This file controls the state of SELinux on the system.

SELINUX= can take one of these three values:

enforcing – SELinux security policy is enforced.

permissive – SELinux prints warnings instead of enforcing.

disabled – No SELinux policy is loaded.

SELINUX=disabled

SELINUXTYPE= can take one of these two values:

targeted – Targeted processes are protected,

mls – Multi Level Security protection.

SELINUXTYPE=targeted

  • add following line to /etc/hosts

    10.1.12.110 ovmmdr1

  • set parameters in /etc/sysconfig/network

    NETWORKING=yes
    HOSTNAME=ovmmdr1
    GATEWAY=192.168.12.1

  • reboot to make selinux disabled permanently

  • attach the OVM Manager 3.3.2 install ISO to the VM
  • run the createOracle.sh script to prep the VM for the installation of OVM Manager


[root@ovmmdr1 mnt]# ./createOracle.sh
Adding group 'oinstall' with gid '54323' ...
groupadd: group 'oinstall' already exists
Adding group 'dba'
groupadd: group 'dba' already exists
Adding user 'oracle' with user id '54322', initial login group 'dba',
supplementary group 'oinstall' and home directory '/home/oracle' ...
User 'oracle' already exists ...
uid=54321(oracle) gid=54322(dba) groups=54322(dba),54321(oinstall)
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
54322 : Oracle VM Manager core via SSL
123 : NTP
10000 : Oracle VM Manager CLI Tool
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
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 ]
Rules added.
[root@ovmmdr1 mnt]#

NOTE: you will need to gather the UUID of OVM Manager in production and install this instance
with that UUID. Run the following command on OVMMPRD1:

grep UUID /u01/app/oracle/ovm-manager-3/.config

  • run the runInstaller.sh script to install OVM Manager


[root@ovmmdr1 mnt]# ./runInstaller.sh -u {UUID from previous step}

Oracle VM Manager Release 3.3.2 Installer

Oracle VM Manager Installer log file:
/var/log/ovmm/ovm-manager-3-install-2015-03-04-170449.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 …

Verifying installation prerequisites …
*** WARNING: Recommended memory for the Oracle VM Manager server installation using Local MySql DB is 7680 MB RAM

One password is used for all users created and used during the installation.
Enter a password for all logins used during the installation: Way2secure
Enter a password for all logins used during the installation (confirm): Way2secure

Please enter your fully qualified domain name, e.g. ovs123.us.oracle.com, (or IP address) of your management server for SSL certification generation, more than one IP address are detected: 10.1.12.110 192.168.12.110 [ovmmdr1]: ovmmdr1

Verifying configuration …

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

Select Number (1-2): 1

Step 1 of 9 : 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 9 : Java …
Installing Java …

Step 3 of 9 : Database schema …
Creating database ‘ovs’ …
Creating database ‘appfw’
Creating user ‘ovs’ for database ‘ovs’…
Creating user ‘appfw’ for database ‘appfw’

Step 4 of 9 : WebLogic and ADF…
Retrieving Oracle WebLogic Server 12c and ADF …
Installing Oracle WebLogic Server 12c and ADF …
Applying patches to Weblogic …

Step 5 of 9 : 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 …

Step 6 of 9 : Domain creation …
Creating Oracle WebLogic Server domain …
Starting Oracle WebLogic Server 12c …
Creating Oracle VM Manager user ‘admin’ …

Retrieving Oracle VM Manager CLI tool …
Extracting Oracle VM Manager CLI tool…
Installing Oracle VM Manager CLI tool …

Step 7 of 9 : Deploy …
Configuring Https Identity and Trust…
Deploying Oracle VM Manager Core container …
Configuring Client Cert Login…
Deploying Oracle VM Manager UI Console …
Deploying Oracle VM Manager Help …
Disabling HTTP access …

Step 8 of 9 : 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 …
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 9 of 9 : Start OVM Manager …
Enabling Oracle VM Manager service …
Shutting down Oracle VM Manager instance …
Starting Oracle VM Manager instance …
Waiting for the application to initialize …
Oracle VM Manager is running …

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 : 0004fb00000100006231d80f2ca9856b

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://ovmmdr1: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.

Please remove configuration file /tmp/ovm_configcKjMF_.
[root@ovmmdr1 mnt]#

Capture

  • Install ovmcore-console-1.0-41.el6.noarch.rpm on ovmmdr1

yum install -y /var/tmp/ovmcore-console-1.0-41.el6.noarch.rpm

OVMPRD1
==============================================

  • create a VM based on Oracle Linux 64bit OS
  • rename the VM to ovmprd1
  • Give the VM 2gb memory and 2 cpu’s
  • Give the VM a 6gb hard drive
  • configure ovmprd1 with the following network adapters:
    adapter 1: (Host Only) Prod Management
    adapter 2: (NAT Network) ProdPublic
    adapter 3: (Host Only) Prod Storage
    adapter 4: (Host Only) Prod Storage

  • boot the VM and install OVM Server 3.3.2

  • configure the VM with the following settings:


Host Name: ovmprd1
IP Address (eth0): 10.1.11.101
IP Netmask: 255.255.255.0
Default Router: 10.1.11.1
DNS Server: 192.168.11.110
OVS Agent Password: Way2secure
Root Password: Way2secure

  • Once the VM has booted fully and is at the splash screen you can continue to the next step


* log into PROD OVM Manager
* discover the PROD OVM server
* choose Servers and VM's tab
* click on PROD OVM server
* select the "Bond Ports" perspective
* create a new bond with the following parameters:

Interface Name: bond1
Addressing: static
IP Address: 172.16.11.101
Mask: 255.255.255.0
MTU: 1500
Description: (optional)
Bonding: Load Balanced
Selected Ports: eth2 and eth3

  • choose Networking tab
  • select the Network labeled 10.1.11.0 and configure with the following parameters:

** Configuration Tab **

Name: Management
Description: (optional)
Network Uses: Check Management, Live Migrate and Cluster Heartbeat

** Ports Tab **

Port Name: bond0

** VLAN Interfaces **

None

== NETWORK CONFIGURATION ==

* Create a new network
* select "Create a Network with Ports/Bond Ports/VLAN Interfaces" radio button and click next
* Give it a name of "Storage", select the "Storage" checkbox then click next
* add bond1 from ovmprd1 and click ok
* click next - there will not be any VLAN interfaces so click Finish
* Create a new network
* select "Create a Network with Ports/Bond Ports/VLAN Interfaces" radio button and click next
* Give it a name of "Public", select the "Virtual Machine" checkbox then click next
* add eth1 from ovmprd1 and click ok
* click next - there will not be any VLAN interfaces so click Finish

== STORAGE CONFIGURATION ==

* Click on the "Storage" tab
* Discover SAN Server
* Assign name of "PROD-ZFS"
* Make sure Storage Type says "iSCSI Storage Server"
* Make sure Storage Plug-in says "Oracle Generic SCSI Plugin"
* Click next
* Add an Access Host with IP address of 172.16.11.100
* Click next
* Add ovmprd1 to Selected Servers then click next
* Edit the default access group
* On the storage initiators tab, add ovmprd1's iqn to Selected Storage Initiators then click ok
* Click Finish
* Highlight the PROD-ZFS SAN server and click Refresh SAN Server
* Verify that two physical disks are visible
* Rename the 12gb LUN to PROD-PoolFS
* Rename the 30gb LUN to PROD-REPO

== SERVER POOL CREATION ==

* Click on the Servers and VM's tab
* Create a new Server Pool called PROD
* Give it a VIP of 10.1.11.102
* Select Physical Disk radio button
* Select Storage Location and choose the PROD-PoolFS LUN
* Click next
* move ovmprd1 to Selected servers then click finish

== STORAGE REPOSITORY CREATION ==

* Click on the Repositories tab
* Create a new Repository called PROD-REPO
* Select the Physical Disk radio button under Repository Location
* Click on the magnifying glass and choose PROD-REPO then click next
* move ovmprd1 to Present to Servers then click finish

== STORAGE REPOSITORY REPLICATION ==

* Log into zfsprd1
* Click on Configuration, then services
* Edit the replication service
* Add a target

Name: ovmdr1
Hostname: 172.16.10.101
Root password: Way2secure

  • Click on shares
  • Edit the PROD-REPO Project
  • Click on the Replication sub group
  • Add an action

Target: ovmdr1
Pool: DR
Update Frequency: Scheduled
Add a Schedule for every half hour at 00 minutes after
Leave the rest of the settings at the default

  • Click Add
  • Hover over the Target near the STATUS column and click on the picture of the two circular
    arrows pointing to eachother. This will kick off a manual replication.
  • Monitor replication status until completely replicated (should take about 5 minutes)

==============================================

OVMDR1

  • create a VM based on Oracle Linux 64bit OS
  • rename the VM to ovmdr1
  • Give the VM 2gb memory and 2 cpu’s
  • Give the VM a 6gb hard drive
  • configure ovmdr1 with the following network adapters:
    adapter 1: (Host Only) DR Management
    adapter 2: (NAT Network) DRPublic
    adapter 3: (Host Only) DR Storage
    adapter 4: (Host Only) DR Storage
  • boot the VM and install OVM Server 3.3.2
  • configure the VM with the following settings:

Host Name: ovmdr1
IP Address (eth0): 10.1.12.101
IP Netmask: 255.255.255.0
Default Router: 10.1.12.1
DNS Server: 192.168.12.110
OVS Agent Password: Way2secure
Root Password: Way2secure

  • Once the VM has booted fully and is at the splash screen you can continue to the next step
  • Copy following configuration files from ovmprd1 to ovmdr1. Note that in your installation,
    the bridge name referenced below will be different

/etc/sysconfig/network-scripts/meta-eth1
/etc/sysconfig/network-scripts/ifcfg-{bridge} (example /etc/sysconfig/network-scripts/ifcfg-1080940192)

  • Edit /etc/sysconfig/network-scripts/ifcfg-{bridge} on ovmdr1 to make the
    MAC address match that of eth1 on ovmdr1 but leave the bridge number intact

  • log into DR OVM Manager

  • discover the DR OVM server
  • choose Servers and VM’s tab
  • click on DR OVM server
  • select the “Bond Ports” perspective
  • create a new bond with the following parameters:

Interface Name: bond1
Addressing: static
IP Address: 172.16.12.101
Mask: 255.255.255.0
MTU: 1500
Description: (optional)
Bonding: Load Balanced
Selected Ports: eth2 and eth3

  • choose Networking tab
  • select the Network labeled 10.1.12.0 and configure with the following parameters:

** Configuration Tab **
Name: Management
Description: (optional)
Network Uses: Check Management, Live Migrate and Cluster Heartbeat

** Ports Tab **
Port Name: bond0

** VLAN Interfaces **
None

== NETWORK CONFIGURATION ==
* Create a new network
* select “Create a Network with Ports/Bond Ports/VLAN Interfaces” radio button and click next
* Give it a name of “Storage”, select the “Storage” checkbox then click next
* add bond1 from ovmdr1 and click ok
* click next – there will not be any VLAN interfaces so click Finish
* Create a new network
* Observe that the Public network is already there. This is done by copying the meta file and the
bridge file from OVMPRD1

== STORAGE CONFIGURATION ==
* Click on the “Storage” tab
* Discover SAN Server
* Assign name of “DR-ZFS”
* Make sure Storage Type says “iSCSI Storage Server”
* Make sure Storage Plug-in says “Oracle Generic SCSI Plugin”
* Click next
* Add an Access Host with IP address of 172.16.12.100
* Click next
* Add ovmdr1 to Selected Servers then click next
* Edit the default access group
* On the storage initiators tab, add ovmdr1’s iqn to Selected Storage Initiators then click ok
* Click Finish
* Highlight the DR-ZFS SAN server and click Refresh SAN Server
* Verify that one physical disk is visible
* Rename the 12gb LUN to DR-PoolFS

== SERVER POOL CREATION ==
* Click on the Servers and VM’s tab
* Create a new Server Pool called DR
* Give it a VIP of 10.1.12.102
* Select Physical Disk radio button
* Select Storage Location and choose the DR-PoolFS LUN
* Click next
* move ovmdr1 to Selected servers then click finish

== TEMPLATE IMPORT ON PROD ==
* Download template to /var/tmp on ovmprd1 (should be .ova format to proceed- unzip if needed)
* Start Python web server on ovmprd1

python -m SimpleHTTPServer 8080

  • Navigate to the Repositories tab in ovmmprd1
  • Expand the PROD-REPO repository and highlight the Assemblies folder
  • Click on the import VM Assembly button
    VM Template URLs: http://10.1.11.101:8080/OVM_OL6U6_x86_64_PVM.ova

  • Click on assembly that was just imported

  • Create template from assembly
    Assembly Virtual Machines: {select the assembly you just imported}
    VM Template Name: t_OL6.6

  • Click ok

  • Edit the t_OL6.6 template
    Add public network
    change sizing to 1gb memory and 1vcpu

  • Clone the t_OL6.6 template to a virtual machine
    Clone Name: ol6.6
    Target Server Pool: PROD

  • Edit ol6.6.0 VM
    Change VM name to ol6.6
    If there is an extra VNIC, remove it

  • Start VM and connect to console

  • Configure VM with hostname and root password
  • Touch a file

touch /var/tmp/ovmprd1

 

Continued in part 4 of 5

Advertisements

One thought on “OVM Disaster Recovery In A Box (Part 3 of 5)

  1. Pingback: Oracle VM Disaster Recovery In A Box (Part 2 of 5) | Eric Steed – Technology Evangelist

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s