Oracle VM Disaster Recovery In A Box (Part 2 of 5)

gold-dollar-signTypically, when setting up a new solution it’s always advantageous to do a POC (Proof Of Concept) in your environment to make sure it works the way you expect it to.  With disaster recovery this could wind up being rather expensive.  I’ll show you how you can use tools that are available today to simulate an entire production and dr site including storage replication for FREE.

In the next few posts, I’ll lay out step by step how to get your OVM DR POC up and running on a machine with relatively low resources.  I run the simulation on my laptop.  Whatever hardware you choose to run this on, it MUST be 64bit capable and support either Intel VT-x or AMD-V instruction sets.  If you don’t have this, you can’t run a 64 bit VM. I found that memory was the number one factor that affected performance for my tests.  Surprisingly (or maybe not) the SSD was a close second.  I started this on a standard spinning disk (7200 rpm SATA) and after the second VM started to boot, the system just tanked.  Once I upgraded to the significantly faster iop packed SSD, things got much better.  Here are my specs:

Lenovo G780

Windows 8 64bit
Core i5-3210m
16gb memory
500gb Samsung 840 EVO SSD

Even though this series of articles is focusing on Oracle VM, you could do something very similar with other hypervisors such as VMware.  Keep in mind- we’re focusing on the concept and the step by step process of switching over to a DR site.  Don’t think you’re gonna get screaming performance out of the VM’s you stand up in your virtualized OVM servers, but it will be functional and that’s all we care about.

Without any more delay- on to the demo!

The first thing you need to do is make sure you have enough space on your SSD.  I would conservatively set aside at least 100gb (and that’s thin provisioned).  You’ll also need to download the software we’ll be using.  You’ll need an MOS (My Online Support) account to download these- it’s free to sign up if you don’t already have one:

Oracle Linux (either version 6 or 7 doesn’t matter)

Oracle VM VirtualBox (grab the latest version)

Oracle VM for x86 (grab the latest version)

Oracle ZS3-2 Simulator (grab latest version)

Oracle Linux 6 Update 6 Template for OVM*

  • log into edelivery.oracle.com/linux
  • de-select “Programs”
  • select “Linux/OVM/VMs”
  • type linux in the search box
  • select “Oracle VM Templates for Oracle Linux
  • select platform – x86 64bit
  • click continue
  • Select “Oracle VM Templates for Oracle Linux 6.0.0.0.0 for x86 64 bit 5 files”
  • click continue and accept T&C’s then continue
  • download the template “V73659-01.zip Oracle Linux 6 Update 6 template (OVF) – Paravirtualized x86_64 (64 bit)”

Installation and configuration

* download and install virtualbox
* download zfs appliance simulator
* create host only networks in virtualbox and give your machine the .1 address on each network.  You will not be able to give these networks a name in VirtualBox:

  • PROD Storage Network (172.16.11.1/24)
  • PROD Management Network (10.1.11.1/24)
  • PROD Public Network (192.168.11.1/24)
  • DR Storage Network (172.16.12.1/24)
  • DR Management Network (10.1.12.1/24)
  • DR Public Network (192.168.12.1/24)
  • Replication Network (172.16.10.1/24)
* create NAT networks in VirtualBox and check the “supports DHCP” box for both of them.  You will be able to give these networks a name in VirtualBox:
  • ProdPublic (192.168.11.0/24)
  • DRPublic (192.168.12.0/24)
NOTE: If you’re running virtualbox in Windows, I suggest going into the network control panel applet and renaming the virtualbox Host-Only Ethernet Adapter to reflect it’s function.  You can’t give host only network adapters a specific name in VirtualBox like you can NAT networks.  If you’re running VirtualBox in Linux, then just rename each virtual interface in the ifcfg-xxxx script:
 Capture2 (1)
* create the following VM’s:
  • zfsprd1 – zfs appliance simulator for production
  • zfsdr1 – zfs appliance simulator for dr
  • ovmmprd1 – OVM Manager for production
  • ovmmdr1 – OVM Manager for dr
  • ovmprd1 – OVM Server for production
  • ovmdr1 – OVM Server for dr
NOTE: Don’t get lazy and clone the production ZFS simulator to make the dr one.  When you go to set up replication between the two you’ll get an EAK_PEER_AUTH error.  This is because the UUID is the same on both appliances and it uses that to generate the key for replication.  Most likely you’ll be scratching your head until you read this and realize what you did (like me).  Do a fresh import/install of the appliance from the zip file you downloaded instead for all the VM’s to be safe.
Now we can move on to configuring each VM in VirtualBox and install the software.
==============================================
ZFSPRD1
==============================================
* import the zfs appliance OVA into VirtualBox
* configure the production zfs appliance VM with the following network adapters:
  • adapter 1: (Host Only) Prod Management
  • adapter 2: (Host Only) Replication Network
  • adapter 3: (Host Only) Prod Storage
  • adapter 4: (Host Only) Prod Storage
* rename the VM to zfsprd1 and boot it
* start configuration and enter the following information:
Host Name: zfsprd1
DNS Domain: initech.local
IP Address: 10.1.11.100
IP Netmask: 255.255.255.0
Default Router: 10.1.11.1
DNS Server: 0.0.0.0
Password: Way2secure
Re-enter Password: Way2secure
 
NOTE: you will only need to configure the management interface at this point.  The rest of the configuration will be done in the BUI.  Tab out of the password re-enter field and hit ESC-1 to continue the boot process.  Once you see the login prompt, move on to the next step.
* log into the zfsprd1 web interface
* click on Start to begin configuration
* configure networking as follows:
 
Datalinks:
(DL) Management via e1000g0
(DL) Replication via e1000g1
(DL) Storage via e1000g2
Interfaces:
(INT) Management (10.1.11.100/24) via e1000g0
(INT) Replication (172.16.10.100/24)  via e1000g1
(INT) Storage (172.16.11.100/24) via e1000g2
* Click apply
* Click commit
* DNS Domain set to initech.local
* DNS Server(s) set to 0.0.0.0
* Click commit
* Leave all default settings at configure time, click sync then click commit
* Leave all default settings at configure name services then click commit
* Create new storage pool called PROD, click ok
Leave all default settings at Verify and allocate devices then click commit
* Choose striped data profile then click commit
* Click commit at configure storage
* Click on Later for Registration and Support
* Click on Configuration then SAN then iSCSI
* Add a new Target called PROD-ZFS bound to e1000g2
* Create a new target group called ZFS
* Add PROD-ZFS Target to ZFS target group then click apply
* Navigate to Shares -> Projects
* Create 2 new projects called “PROD-POOL” and “PROD-REPO”
* Click on LUNs
* Click the + sign to Create 2 new LUNs as follows:
Project: PROD-POOL
Name: PROD-PoolFS
Volume Size: 12G
Thin Provisioned: (checked)
Target Group: ZFS
All other options keep defaults
Project: PROD-REPO
Name: PROD-Repo1
Volume Size: 30G
Thin Provisioned: (checked)
Target Group: ZFS
All other options keep defaults
==============================================
ZFSDR1
==============================================
* import the zfs appliance OVA into VirtualBox
* configure the dr zfs appliance VM with the following network adapters:
  • adapter 1: (Host Only) DR Management
  • adapter 2: (Host Only) Replication Network
  • adapter 3: (Host Only) DR Storage
  • adapter 4: (Host Only) DR Storage
* rename the VM to zfsdr1 and boot it
* start configuration and enter the following information:
Host Name: zfsdr1
DNS Domain: initech.local
IP Address: 10.1.12.100
IP Netmask: 255.255.255.0
Default Router: 10.1.12.1
DNS Server: 0.0.0.0
Password: Way2secure
Re-enter Password: Way2secure
 
NOTE: you will only need to configure the management interface at this point.  The rest of the configuration will be done in the BUI.  Tab out of the password re-enter field and hit ESC-1 to continue the boot process.  Once you see the login prompt, move on to the next step.
* log into the zfsdr1 web interface
* click on Start to begin configuration
* configure networking as follows:
 
Datalinks:
(DL) Management via e1000g0
(DL) Replication via e1000g1
(DL) Storage via e1000g2
Interfaces:
(INT) Management (10.1.12.100/24) via e1000g0
(INT) Replication (172.16.10.101/24)  via e1000g1
(INT) Storage (172.16.12.100/24) via e1000g2
* Click apply
* Click commit
* DNS Domain set to initech.local
* DNS Server(s) set to 0.0.0.0
* Click commit
* Leave all default settings at configure time, click sync then click commit
* Leave all default settings at configure name services then click commit
* Create new storage pool called DR, click ok
Leave all default settings at Verify and allocate devices then click commit
* Choose striped data profile then click commit
* Click commit at configure storage
* Click on Later for Registration and Support
* Click on Configuration then SAN then iSCSI
* Add a new Target called DR-ZFS bound to e1000g2
* Create a new target group called ZFS
* Add DR-ZFS Target to ZFS target group then click apply
* Navigate to Shares -> Projects
* Click the + sign to create a new project called “DR-POOL”
* Create a new LUN as follows:
Project: DR-POOL
Name: DR-PoolFS
Volume Size: 12G
Thin Provisioned: (checked)
Target Group: ZFS
All other options keep defaults
==============================================
OVMMPRD1
==============================================
* create a VM based on Oracle Linux 64bit OS
* rename the VM to ovmmprd1
* Give the VM 4gb memory and 2 cpu’s
* Give the VM a 30gb hard drive
* configure ovmmprd1 with the following network adapters:
  • adapter 1: (Host Only) Prod Management
  • adapter 2: (NAT Network) ProdPublic
* 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: ovmmprd1
IP Address (eth0): 10.1.11.110
IP Netmask: 255.255.255.0
IP Address (eth1): 192.168.11.110
IP Netmask: 255.255.255.0
Default Router: 192.168.11.1
DNS Server: 8.8.8.8
Root Password: Way2secure
* turn off iptables and selinux:
[root@ovmmprd1 ~]# service iptables stop ; chkconfig iptables off
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@ovmmprd1 ~]#

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

[root@ovmmprd1 ~]# 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.11.110     ovmmprd1

* set parameters in /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=ovmmprd1
GATEWAY=192.168.11.1
  
* reboot to complete the selinux disabling
* 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@ovmmprd1 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@ovmmprd1 mnt]#

* run the runInstaller.sh script to install OVM Manager

[root@ovmmprd1 mnt]# ./runInstaller.sh
 
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.11.110 192.168.11.110 [ovmmprd1]: ovmmprd1
 
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://ovmmprd1: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@ovmmprd1 mnt]#
 
 
* Log into the OVM Manager web interface at https://10.1.11.110:7002/ovm/console and make sure you see a screen similar to the one below:
Capture


* Install ovmcore-console-1.0-41.el6.noarch.rpm on ovmmprd1
# yum install -y /var/tmp/ovmcore-console-1.0-41.el6.noarch.rpm
 
The rest of the configurations are in Part 3.  Stay Tuned!
Advertisements

3 thoughts on “Oracle VM Disaster Recovery In A Box (Part 2 of 5)

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

  2. Pingback: OVM Disaster Recovery In A Box (Part 3 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