Friday, December 5, 2014

Oracle OVM installation and configuration in HDS Environmnet



1.    Overview
The purpose of this document is to provide a SOP for OVM Installation for new servers
This quick start guide provides a conceptual look at designing and implementing an Oracle VM environment using Oracle VM 3. The guide is designed to give the reader a conceptual overview of all of the activities needed to get an Oracle VM guest up and running by stepping through a simplified implementation of a three node cluster using the four major phases shown below


Multiple Oracle VM Servers are grouped into server pools. Each server pool can have up to 32 physical servers, and every server in a given pool has access to shared storage which can be NFS, Fibre Channel or iSCSI (or a any combination of these). This allows VMs associated with the pool to start and run on any physical server within the pool. However, Oracle VM 3 is different from Oracle VM 2.x in the following respects:
 Oracle VM Server 3 requires 64-bit x86 hardware, but can support either 64-bit or 32-bit guest virtual machines.
 The Oracle VM Manager 3 runs on 64-bit Oracle Linux 5.5 OS or later. The Oracle VM Manager
also requires a separate server outside of the server pool. This can be either a physical server or installed as a guest VM of Oracle VM server.
 Oracle VM Manager controls the virtualization environment, creating and monitoring Oracle VM servers and the virtual machines. Oracle VM Manager 3 serves as the only administrative interface to the Oracle VM servers, unlike Oracle VM 2.x that were jointly administered from the management server, as well as locally from the command-line for each Oracle VM Server.
 Oracle VM 3 storage repository is not compatible in any way with the storage repository used by Oracle VM 2.x. The Oracle VM 2.x storage repository cannot be directly used by Oracle VM 3. But the existing VM images can be imported into Oracle VM 3 environment.

Install Oracle VM Manager on Management Server


Oracle VM Manager will handle configuring resources on the Oracle VM Servers including adding the storage created during the steps in the last section, additional networks, etc. To install Oracle VM Manager, create and mount an 8-gigabyte file system named /u01 on the physical server that Oracle Linux 5, update 10 was installed. Then copy the Oracle VM installer ISO which need to be downloaded from oracle site  to /root and mount it to /media

Start the installer as root from /media once

# [root@ovmtx ~]# mount -o loop /root/V44601-01.iso /media


# cd /media

[root@ovmtx media]# ./createOracle.sh
Adding group 'oinstall' with gid '54323' ...
groupadd: group oinstall exists
Adding group 'dba'
groupadd: group dba exists
Adding user 'oracle' with user id '54322', initial login group 'dba', supplement
ary 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 ...
Verifying user 'oracle' OS prerequisites for Oracle VM Manager ...
oracle  soft    nofile          8192
oracle  hard    nofile          8192
oracle  soft    nproc           4096
oracle  hard    nproc           4096
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
     15901 : Oracle VM Manager VM console proxy
     54321 : Oracle VM Manager core
     54322 : Oracle VM Manager core via SSL
       123 : NTP
     10000 : Oracle VM Manager CLI Tool
Saving firewall rules to /etc/sysconfig/iptables:          [  OK  ]
Rules added.


Start the installer as root from /media once the createOracle.sh has completed. The example below shows a simple installation which installs MY SQL, Oracle WebLogic Server, Oracle Application Development Framework (ADF), Java, and Oracle VM Manager on the local management server..

[root@ovmtx media]# ./runInstaller.sh

Oracle VM Manager Release 3.2.8 Installer

Oracle VM Manager Installer log file:
/tmp/ovm-manager-3-install-2014-12-01-105353.log

Please select an installation type:
   1: Simple (includes database if necessary)
   2: Custom (using existing Oracle database)
   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:
Enter a password for all logins used during the installation (confirm):

Verifying configuration ...

Start installing the configured components:
   1: Continue
   2: Abort

   Select Number (1-2): 1

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

Step 2 of 9 : Java ...
Installing Java ...

Step 3 of 9 : Database schema ...
Creating database 'ovs' ...
Creating user 'ovs' for database 'ovs'...

Step 4 of 9 : WebLogic ...
Retrieving Oracle WebLogic Server 11g ...
Installing Oracle WebLogic Server 11g ...

Step 5 of 9 : ADF ...
Retrieving Oracle Application Development Framework (ADF) ...
Unzipping Oracle ADF ...
Installing Oracle ADF ...
Installing Oracle ADF Patch...

Step 6 of 9 : Oracle VM  ...
Retrieving Oracle VM Manager Application ...
Extracting Oracle VM Manager Application ...
Installing Oracle VM Manager Core ...

Step 7 of 9 : Domain creation ...
Creating Oracle WebLogic Server domain ...
Starting Oracle WebLogic Server 11g ...
Configuring data source 'OVMDS' ...
Creating Oracle VM Manager user 'admin' ...

Step 8 of 9 : Deploy ...
Deploying Oracle VM Manager Core container ...
Deploying Oracle VM Manager UI Console ...
Deploying Oracle VM Manager Help ...
Granting ovm-admin role to user 'admin' ...
Set Log Rotation ...
Disabling HTTP and enabling HTTPS...
Configuring Https Identity and Trust...
Configuring Weblogic parameters...

Step 9 of 9 : Oracle VM Manager Shell ...
Retrieving Oracle VM Manager Shell & API ...
Extracting Oracle VM Manager Shell & API ...
Installing Oracle VM Manager Shell & API ...

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 ...
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' ...
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... This can take up to 5 minutes.



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


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

Please note that you need to install tightvnc-java on this computer to access a virtual machine's console.

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

Oracle VM Manager installation complete.

Please remove configuration file /tmp/ovm_configEj442A.
The final task needed to complete the installation is to install a VNC client. This will allow you to use Oracle VM Manager to launch console sessions on running Oracle VM guests.
# rpm -ivh http://oss.oracle.com/oraclevm/manager/RPMS/tightvnc-java-1.3.9-3.noarch.rpm
Retrieving http://oss.oracle.com/oraclevm/manager/RPMS/tightvnc-java-1.3.9-3.noarch.rpm
Preparing... ########################################### [100%]
1:tightvnc-java ########################################### [100%]

 Log into Oracle VM Manager

There is nothing else to configure at this point and you should be able to connect to the Oracle VM Manager user interface (UI) with any supported browser as shown in the figure below. The browser URL for the Oracle VM Manager UI is noted in the post-installation information you saved from above and should look something like the following:
https://192.168.21.21:7002/ovm/console/
Log into the Oracle VM Manager UI using “admin” and the password you set when you ran the installer for Oracle VM Manager.
Next Steps

The hardware platform for the Oracle VM environment should now be completed. We will now move on to the next major phase of creating the Oracle VM Server pool.
Create Oracle VM Server Pool

This phase is focused on adding physical servers, networking and storage as resources for Oracle VM Manager to use when creating server pools and Oracle VM guests.

Quick Tour of the User Interface

Now Oracle VM needs to be installed on the physical server so that Oracle VM can add to the server pool of the OVM Manager.
Note: Oracle VM manager and Oracle VM server should be in same version. In our environment we are using 3.2.8.733 Oracle will not support if we used different version
Step for the Oracle VM installation on the physical servers


To install Oracle VM Server from a CDROM:

1. Insert the Oracle VM Server CDROM into your CDROM drive.
2. Boot the computer with the Oracle VM Server CDROM.
3. The Oracle VM Server screen is displayed.


Press Enter to begin the installation. If you do not press a key for one minute, the
installer automatically starts. The installer is only available in text mode.

4. The CD Found screen is displayed.

If you want to make sure the CDROM has been created correctly you can have the
installer test it for errors. To test the CDROM, select OK and press Enter. The
CDROM is tested and any errors are reported.
To skip media testing and continue with the install, select Skip and press Enter.
5. The Keyboard Selection screen is displayed.

Select the keyboard layout type (for example, us for U.S. English) from the list of
available options. The keyboard you select becomes the default keyboard for the
operating system.
Select OK and press Enter.

6. If an existing Oracle VM Server installation is found on the computer, the System
to Upgrade screen is displayed.
Select
Select Reinstall System to overwrite the existing installation.
Select Oracle VM Server 2.1 (disk) to upgrade the existing installation.

7. The Partitioning Type screen is displayed.


Select whether you want to:
n Remove all partitions and create a new default partition layout
n Remove all Linux partitions and create a new default partition layout
n Use the free space on selected drives to create a new default partition layout
n Create a custom partition layout
Oracle recommends you use a default partition layout.
Note: As the Oracle VM Server installer can only be run in text
mode, you cannot set up LVM (Logical Volume Manager). If you want
to create an LVM configuration, press Alt + F2 to use the terminal and
run the lvm command. To return to the Oracle VM Server installer, press Alt + F1.
Select which drive you want to use for the installation.
Select OK and press Enter.
8. If you selected to remove a partition, a Warning screen is displayed to confirm that you want to remove the partition(s), including the data contained on any partitions.


Select yes and press Enter.
9. The Review Partition Layout screen is displayed.


If you do not want to review the partition layout and accept the default partition
layout, select No and press Enter.
If you want to review the partition layout, select Yes and press Enter.
The Partitioning screen is displayed.

Review the partition layout, and make any changes you want.
Select OK and press Enter to save any changes.
10. The Boot Loader Configuration screen is displayed.

Select Master Boot Record (MBR) or First sector of boot partition as the location
to install the boot loader.
Select OK and press Enter.
11. The Oracle VM Server Management Interface screen is displayed.
Select the network interface to use for management of the computer.
Select OK and press Enter.
12. The Network Configuration for ethn screen is displayed.
If your computer uses a static IP address, select whether you want to enable IPv4
and/ or IPv6 support. Enter the IP address and prefix (netmask) for your
computer. IPv4 details must be entered if you are performing an installation using
an NFS drive. IPv4 support is enabled by default.
If your computer uses DHCP to assign its IP address, select Use dynamic IP
configuration (DHCP).
Select whether you want to enable the network configuration each time you boot
the computer. This is enabled by default.
Select OK and press Enter.
Note: Here we will not used any IP since we will configure NIC bonding
13. The Miscellaneous Network Settings screen is displayed.
Enter the Gateway, Primary DNS and optional Secondary DNS in the fields.
Select OK and press Enter.
14. The Hostname Configuration screen is displayed.
If your machine has its own hostname, select manually and enter the hostname or
IP address.
If your machine uses DHCP to assign its hostname, select automatically via
DHCP.
Select OK and press Enter.
15. The Time Zone Selection screen is displayed.
If your operating system uses Coordinated Universal Time (UTC), select System
clock uses UTC.
Select your time zone by selecting the city closest to your computerıs physical
location.
Select OK and press Enter.
16. The Oracle VM Agent password screen is displayed.
Enter a password to be used for the Oracle VM Agent in the Password field. This
password is used by Oracle VM Manager to manage and monitor Oracle VM
Server, and the guests created and running within it.
Re-enter the password in the Password (confirm) field.
The password characters are not echoed to the screen.
Select OK and press Enter. If the two passwords do not match, the installer
prompts you to enter them again.
17. The Root Password screen is displayed.
Enter a password for the root user in the Password field. The root password
must be at least six characters long.
Re-enter the password in the Password (confirm) field.
The password characters are not echoed to the screen.
Select OK and press Enter. If the two passwords do not match, the installer
prompts you to enter them again.
18. The Installation to begin screen is displayed.
Select OK and press Enter. The installer installs and configures Oracle VM Server.
19. When all files are installed and configuration complete, the complete screen is
displayed.
Remove the Oracle VM Server CDROM.
Select Reboot and press Enter. The computer reboots.
20. The End User License Agreement screen is displayed.
Review the license agreement. If you agree to the terms of the license agreement,
select Agree and press Enter.
21. The Oracle VM Server login prompt is displayed.

Next step network Team will un tag the VLAN port for Communication.

Then ask Network Team to open the port for OVS server to the OVM Manager. Ports need to be opened are 7001,7002, 8899, 15901-15915, 7900-7915, 54321-54322, 6900 – 6915, 5900 – 5915, 1000, 7777, 8002-8003, 80, 54321, UDP/123

Storage configuration
Prepare Centralized External Storage
Here in our environment we are using Hitachi HUS VM
Next Step to configure to zoning in the Fabric Switch
Switch Details
http://10.130.130.22 (HBA2) Fabric Switch B
http://10.130.130.23 (HBA 1) Fabric Switch A
HUS VM
Steps to configure the zoning in the fabric switch
First need to know the FC switch WWN number.
Login to the server and execute the below command
[root@OVS2TX ~]# cat /sys/class/fc_host/host1/port_name
0x10000090fa76b7fe
[root@OVS2TX ~]# cat /sys/class/fc_host/host2/port_name
0x10000090fa76b7ff
Login to the Fabric switch B
Create the Alias with the Chassis name and Blade number followed by the HBA number
Add the WWN member to that.
Create the zone name with Chassis number and blade name followed by the HUSVM port number
Next click on zone config and then select the new zone and move to the Zone config member and click on enable config. After that it will show commit succeeded.
Same Step need to be repeated for other switch.
For the HDS 520B Blade command device of size 2 GB need to create on HUS VM for storage plugins, 15 GB OVS cluster file system need to be created for the cluster and depending on the VM residing on the server repository need to be create. All the LUN need to share across all the OVS server.
Command device size             2 GB
OVS Cluster                             15 GB
Repository                               Depending on the VM repository need to be created
Login to the HUS VM
Create the Host groups
Select the WWN number and give the hostname (Naming convention need to followed) CHASSIS number, Blade number followed by the HBA Number)
Select the port number for LDEV. Make sure we choose the same port number which we have define in the Fabric switch
Both HBA WWN number need to map with the correct port number. Host group name will be same as the host
Click on the finish.
Next step is create the LUN for the command device, cluster file system and the Repositories 
Configure the command device

Click on create LDEVs
Provisioning Type (Dynamic Provisioning)
Select the pool
Provide the LDEV Capacity (here we will using 2 GB for the command device)
LDEV Name
Choose the Initial LDEV ID (Choose the FF and 3E since it should not be used by other host other than OVS host)
 
Click on Add
Click on finish
Click on Apply
Task will be created
Click on the logical device and select the LDEV and click on more action and select edit command devices
Command device need to be enabled. Here command device security need to be disabled and rest will be enabled and click on finish
Click on Apply and task will be created
Next map the command device to the OVS host. Click on add LUN paths
Select the LDEV name to be mapped


Select the LDEV and click on add
Click on next
Select the host group and click on add
Click on next
Click on finish

Click on apply
Same step need to be followed for the creation of the other LUN, except the enabling the command device.
HDS PLUGINS Installation
Yum repository setup for the installation and configuration
##cd /etc/yum.repos.d
## create a repo
Vi ovm.repo
Next plugins and the command software need to be copied to the host
Hitachi-storage plugins need some dependencies rpm
Command device configuration. Mount the iso file and then execute the script
Create a file under /etc and the file name is horcm700.conf. Add the below line and reboot the server.
After reboot complete LUN will be detected.
After that below command need to be executed
If it failed then log need to be checked
Log file location is /HORCM/log700/curlog/horcm_OVS2TX.log


Discover Oracle VM Servers as Resource
The “Health” view should be the first screen seen after logging into Oracle VM Manager.
Click on Servers and VMs
Discover the server. Click on the Magnifying glass

Add the servers as shown in the following figure. we may use a range of IP addresses or add them one at a time. Provide the OVM agent password and the IP address
After the successful completion it will show the below message
The discovery process will add all the servers to the “Unassigned” server resources pool as seen in below where the Oracle VM Servers will remain until they are assigned to the server pool created in later steps.
A server pool can now be created once all the other resources such as Oracle VM Servers, networking and storage have been added to Oracle VM Manager.

Simply enter a user friendly server pool name, the re locatable virtual IP and the storage used for the server pool file system that were created during the preparation phase. The virtual IP is an address that will always be associated with the Oracle VM Server currently designated as the server pool master.
Click on Create Server Pool…

Provide the server pool name, Virtual IP, choose the Storage for server pool (Select 15 GB LUN)
Select the Available server and click on the >> sign and click on next
Click on Finish
Network Configuration
Most data centres will have multiple subnets with specific roles such as production front end where all users can connect to servers, databases and applications (public network), dedicated storage (storage network), dedicated out-of-band server management (management network), etc.
In our Environment 4 interface are connected to the four port of the switch.  Two interface will be tag for the Management network and two interface will be tag for the client /backup access. Port 1 from switch1 and port 1 from switch 2 need to be tag in the switch level and bonding need to be Oracle OVM
Same need to be followed for the other interface.  Port2 from switch 1 and port 2 from switch 2 need to be tag. After network team configure then server Team need to configure from the Oracle OVM

 Edit Existing Network

A single network was discovered by Oracle VM Manager during the discover servers step above. In this case the existing network that was discovered is the management network. Before moving on to the next step of adding a public network for storage and general access to Oracle VM guests, we will change the name of the existing management network. This is not a required change and is only meant to help reduce confusion of network roles in subsequent steps. Here we will do bonding with the other interface tag
Click on the Networking

Select the existing networking and click on edit

Click on next
Click on Next. Select the port that are tagged and the bond one
Click on Next
Click on Next

Click on Finish


Create Additional Network as Resource


A new private network will be created to allow Oracle VM Servers and Oracle VM Manager to access Backup Server running on Oracle VM guests. The create network task basically configures another network interface/bridge on the Oracle VM Servers with the network information provided by the Oracle VM administrator using the Oracle VM Manager create network wizard.

(Next Step is to create the backup interface for the OVS. If 2 port are tagged then Bond1 need to create in the OVS Server and then create the bridge using the wizard. In our scenario we have 2 interface , so we will create the bridge with that. )

Click on the green color plus sign


Click on create a network with Bonds/port only and click on next.



Provide the Name for the MPLS/backup/Monitoring Network


Click on next

Click on Next
Select the port which tag in the switch level. Click on Next

Click on Next
Click on finish
Create Virtual MAC Addresses as Resource

The last network task needed is to create a pool of virtual Ethernet addresses (MAC) for the Oracle VM guests. The virtual Ethernet addresses will be randomly assigned from the pool as each Oracle VM guest is created. Note that specific MAC addresses can be assigned to specific Oracle VM guests, but the Oracle VM administrator must change the MAC after one has been randomly assigned as we will see in a later step.

To begin, choose “Virtual NICS” and click on Auto Fill and create. It will create 20 virtual Nic


The pool of MAC addresses will be now be available and automatically assigned to any Oracle VM guests created. More Ethernet addresses can be generated later if needed

Create Storage Repository
The final step in the process of creating a server pool is to assign an LUN to act as the centralized storage repository where all the Oracle VM guest files, templates and other resources will reside for the entire server pool.
Click on the storage Repository
Click on the + sign. Provide the Repository Name, select the physical disk for the Repository. Click on Next
Click on finish


The task of creating the Oracle VM Server pool should now be completed. We will now move on to the last major phase by creating a single Oracle VM guest.
ISO IMPORT STEP
First http server need to be created on OVM manager and then dump the iso file to the /var/www/html/oracle
## yum install http
## service httpd start
## Then copy the iso dump to the /var/www/html/oracle
Access the URL by http://192.168.21.21/oracle
Create Oracle VM Guest
The Oracle VM is now ready for Oracle VM guest images to be created.
Now ISO need to be imported to the Repository
Click on the Repository of the Host and select ISO


Click on the Import and provide the URL of the ISO and click ok
Now ready for creating the VM
Click on the Server Pool. Select OVS Server. Right Click on the server and click on Create Virtual Machine

Click on Next
Enter the VM Name, enabled the check box of Enable High Availability, Select the Domain type as XEN HVM, PV drivers, select memory and the Processor. Click on next
Added the Management and MPLS/Backup IP. Click on Add VNIC
Click on next
Create the OS Disk from the Virtual Disk
Create the virtual Disk by adding the green colour plus sign. Click on ok

Now choose the CD/DVD for the Oracle Installation. Select the ISO file. Click on ok
.
Select the boot options. Select the CDROM. Click on Finish

Next Step to open the console and start the server for Installation. Launch the console
Next Step is to complete the Installation.
After Installation complete, patch with the latest RPM required for the Environment, configure the kernel parameter and mail configuration.
VM Template creation for the VM deployment
Select the VM and right click and choose the clone or Move option. Click on Create a clone of this VM. Click Next
Click on next. Select Advance clone. Click on Create
Provide the clone Customizer Name
Click on the check box of the Disk, uncheck the ISO file.

Click on next.
Click on Finish

Click OK
Template creation step is completed.
Create VM from the Template
Click on create Virtual Machine

Click on clone from an existing VM Template
Click on Finish.
VM is now created from the Template.