Extending Oracle VM Management

Exclusive offer: get 50% off this eBook here
Oracle VM Manager 2.1.2

Oracle VM Manager 2.1.2 — Save 50%

Manage a Flexible and Elastic Data Center with Oracle VM Manager using this book and eBook

$35.99    $18.00
by Tarry Singh | July 2009 | Oracle

In this article by Tarry Singh, we will learn more about Oracle VM Management.
The following topics will be covered in this article:

  • Managing Oracle VM Server repository
  • Backing up or Restoring Oracle VM Manager
  • Enabling security

 

The following topics were covered in the first part of this article series i.e (Oracle VM Management)

  • Getting started with the Oracle VM Manager
  • Managing Servers and Server Pools

Let's continue from where we had left in the previous part of the article.

Oracle VM Management: Managing VM Servers and Repositories

There must be at least one physical server in the Server Pool that we have created. There are many things you can do with the VM Servers in the Server Pool such as changing the configurations or role or function of the server, restarting it, shutting it down, monitoring its performance, or even deleting it.

The Server Pools are elastic and can adapt flexibly to the increase or decrease in the demand of workloads. It is possible to expand the pool with Oracle VM S5:42 PM 7/16/2009 servers and also possible to transfer the workloads or VMs to the VM Servers that are most capable of handling the workloads by throwing the available 4-core resources such as CPU, RAM, storage, and network capacity to the VMs. There is also a possibility of adding more Utility Servers to strengthen the capacity of the Server Pool and thus letting the Server Master handle the workload by assigning the server available to carry out the task. There can only be one Server Pool Master.

However, there are basic tasks to perform before we can add the extra servers to the resource pool such as identifying them by their IP address and see if they are available to fulfill tasks as Oracle VM Server or Server Pool Master. Also we will need the Oracle VM Agent password to add them to the IntraCloud farm.

Let's move on and start managing the servers. In this section, we will cover the following:

  • How to add a Server
  • Editing Server information
  • Restart, shutdown, and deleting Servers

How to add a Server

In order to add Utility Servers or Oracle VM Servers to the array of the Oracle VM environment we will need to carry out the following actions:

  1. Click on the Add Server link on the Server Page:
    Extending Oracle VM Management
  2. Search and select a Server Pool and then click Next.
    Extending Oracle VM Management
  3. Enter the necessary information for Oracle VM parameters:
    Extending Oracle VM Management

Confirm the information, after testing the connection obviously, and you are done.

However, ensure that the Oracle VM Servers are unique while registering in order to avoid any duplication of IP accounts.

Editing Server information

In order to update information on an existing Oracle VM Server, click on Edit.

We can alternatively also click on the General Information tab.

Extending Oracle VM Management

To monitor the performance of the Oracle VM Server we can click on the Monitor tab, where we get real time access to CPU, memory, and storage usage:

Extending Oracle VM Management
Oracle VM Manager 2.1.2 Manage a Flexible and Elastic Data Center with Oracle VM Manager using this book and eBook
Published: July 2009
eBook Price: $35.99
Book Price: $59.99
See more
Select your format and quantity:

Restart, shutdown, and delete Servers

It is easy to remotely manage the Oracle VM Server. We could be anywhere in the world and we can carry out the restart, shutdown, and (unfortunately) delete the Server operations from a distance.

So, such an opportunity to manage large Oracle IntraCloud farms from a distance is a great deal, given that the ever-increasing need to be able to provide HA and continuous management, we could have teams that could geographically manage the Oracle Cloud Centers 24x7x7—the last 7 for the continents that will help serve up the infinite demand.

To restart a server, click on the Reboot button on the Servers page:

Extending Oracle VM Management

If there are any VMs running on the servers we will be prompted to migrate them to other servers. Click on the Migrate button.

If we restart an Oracle VM Server without migrating, the VMs will either be shutdown OR restarted on the next Oracle VM Server, depending on how the HA (Auto or Manual) is configured on the Oracle VM environment.

Click on the Refresh button so that the server status changes from Rebooting to Active. The server could temporarily display the Unavailable status during the reboot process.

Shutting down the server is also a simple operation. In order to shutdown, carry out the following operations:

Click on the Power Off button on the Server page:

Extending Oracle VM Management

Again we will be prompted to migrate the VMs to other hosts and should we ignore and not carry out this function, the VMs will either be restarted OR shutdown again depending on how the HA is enabled. If it's Auto, then the VMs will look at the preferred VM Server. If it's Manual then it will look for the nearest available VM Server. Should there be no VM Server available, then the VMs will be shutdown and be fired up the moment a VM Server becomes available.

Once again, upon clicking on the Refresh button, the status of this server could be validated to Unreachable status from the Shutting Down status.

Deleting the VM Server can be easily done by just clicking the Server to delete on the Servers page and then click on the Delete button.

Extending Oracle VM Management

Running VMs on this server will obviously need to be migrated to other VM servers. Select the VMs to migrate and then click on the Migrate button.

If we ignore or forget to migrate these VMs to another server, then all of our VMs will be deleted! You have been warned!

About managing repositories

Here we will explore the possibilities of managing Oracle VM repositories.

What are exactly Oracle VM repositories

A repository is used for live migrations of VMs and local storage. They are normally found under:

 /etc/ovs/repositories

Adding or removing the repository can be done by firing up the ovs-makerepo script and ovs-offlinerepo script respectively.

Oracle VM Agent does a fine job of managing these repositories but feel free to manually manage them with the following commands.

 /etc/init.d/ovsrepositories [start|stop|restart|reload].

To understand more about the format click --help to get more information.

Adding and removing a repository

To add a repository use the following command:

 /usr/lib/ovs/ovs-makerepo source shared description

See the upcoming screenshot for the commands and the descriptions of the flags.

For removing a repository carry out the following actions:

/usr/lib/ovs/ovs-offlinerepo [-d] uuid source

The ovs-offlinerepo script unmounts the repository and removes it from the configuration.

Extending Oracle VM Management

Oracle VM Manager 2.1.2 Manage a Flexible and Elastic Data Center with Oracle VM Manager using this book and eBook
Published: July 2009
eBook Price: $35.99
Book Price: $59.99
See more
Select your format and quantity:

Backing up Oracle VM Manager

Ensure that all of our Oracle VM Servers are either running OR powered off. Any machine lost in space, such as VM Servers that are not reporting any state and could be rebooting or simply not communicating with the VM Agent, will not be taken in the backup.

Now to backup the Oracle VM Manager, perform the following steps:

  • Log on to Oracle VM Manager as root.
  • Back up Oracle VM Manager resources which reside on the VM Servers. They could be VM Images in the /OVS/running_pool, VM templates in /OVS/seed_pool, or ISO files in /OVS/iso_pool. You obviously don't have to do the following if you already have an enterprise backup solution in place in your Data Center.
  • Backup Oracle VM Manager data by executing the following:
    cd /opt/ovs-manager-2.1/bin
    sh backup.sh
  • Here upon the following prompt enter 1 to backup data:
    Please enter the choice: [1|2]
    1. Back up Oracle VM Manager,
    2. Restore Oracle VM Manager
  • Enter the necessary information such as database account OVS, location of dump, and log file:
    Back up data now ...
    Please enter the password for database account 'OVS':
    Please specify the path for dump file?
    Please specify the path for log file?

And voila the Oracle VM Manager backup in created. A backup is worthless if it cannot be restored, so let's try restoring a recently created backup.

Restoring Oracle VM Manager

Execute the following steps to restore a backup of Oracle VM Manager:

  • Log in to the VM Manager Server as root.
  • Save or copy Oracle VM Manager resources into the following directories: VM images in /OVS/running_pool, VM templates in /OVS/seed_pool, and ISO files in /OVS/iso_pool.
  • Restore backup by initiating the following commands:
    cd /opt/ovs-manager-2.1/bin
    sh backup.sh
    Please enter the choice: [1|2]
    1. Back up Oracle VM Manager,
    2. Restore Oracle VM Manager
    Enter [2] to restore data:
  • Again, provide the database user OVS information and the location of the dump and log files:
    Please enter the password for database account 'SYS':
    Please enter the password for database account 'OVS':
    Please specify the path for dump file?
    Please specify the path for log file?

And we have just restored our Oracle VM Manager from its latest backup. Also we can login to the Oracle VM Manager and quickly scan the environment to check if it is the same as we would have expected.

Enabling secure access to Oracle VM Manager

When accessing the Oracle VM Manager remotely in the Cloud, we will have to ensure that we are providing a totally secure connection to our remote, geographically dispersed workforce.

To do so, we will have to provide a secure HTTP access to the Oracle VM Manager portal. We will be doing this by enabling the SSL with standalone OC4J. We need to ensure that we set the PATH to be included in the JDK bin directory.

Let's get going and create a certificate.

Carry out the following commands in the OC4J directory:

/opt/oc4j/java/jdk1.5.0_11/bin/keytool -genkey -keyalg "RSA"
-keystore keystore_file -storepass password -validity days

In this command, the keystore option sets the file name where the keys are stored, the storepass option sets the password for the keystore, and the validity option sets the number of days of the certificate's validity.

For example, enter:

[root@vmmgr ~]# /opt/oc4j/java/jdk1.5.0_11/bin/keytool -genkey
-keyalg "RSA" -keystore sslfile -storepass securep@ss -validity 365
What is your first and last name?
[Unknown]: Tarry Singh
What is the name of your organizational unit?
[Unknown]: Avastu
What is the name of your organization?
[Unknown]: Avastu
What is the name of your City or Locality?
[Unknown]: Your State
What is the name of your State or Province?
[Unknown]: Your Province
What is the two-letter country code for this unit?
[Unknown]: NL
Is CN=Tarry Singh, OU=Avastu, O=Avastu, L=Assen, ST=Drenthe, C=NL
correct?
[no]: yes
Enter key password for <mykey>
(RETURN if same as keystore password):
[root@vmmgr ~]#

Answering these questions on prompt helps us in creating the new keystore file, which is an sslfile. It is stored in the current directory. We can go to that directory and check if the file is created there.

Our next step is to configure the OC4J. We can do this by first creating a secure-web-site.xml file. If we don't have one created in the OC4J config directory, we should make one by either copying the existing http-web-site.xml or default-web-site.xml and then renaming it to secure-web-site.xml.

Let's go ahead and edit the secure-web-site.xml file.

We can configure OC4J by performing the following steps:

  1. Create secure-web-site.xml. If you do not have the secure-web-site.xml file in the OC4J configuration directory, create one by copying the existing http-web-site.xml, or default-web-site.xml. Rename the copy to secure-web-site.xml. This how what XML file looks like before editing:
    Extending Oracle VM Management
  2. Edit the secure-web-site.xml file. Edit the web site element as follows:
    <web-site xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://xmlns.example.com/example/
    schema/web-site-10_0.xsd" port="4443" display-name="OC4J
    10g (10.1.3) Default Web Site" schema-major-version="10"
    schema-minor-version="0" secure="true"> <ssl-config
    keystore="sslfile" keystore-password="securep@ss"/>

    In the web site element we added secure = "true". We added the keystore name (sslfile) and our password (securep@ss) to this file which we used when creating the sslfile. We use a different port here just for safety purposes.
    Save the file with the changes.

  3. Now go ahead and edit the server.xml file and uncomment the following:
    <web-site path="./secure-web-site.xml" />

    Save the changes.
    This is how it will look:

    Extending Oracle VM Management
  4. Restart the OC4J daemon by clicking on the Restart button in the following OC4Jadmin pane:
    Extending Oracle VM Management
  5. We need to click on the Yes button when prompted with the following warning and our /opt/OC4J would get restarted.
    Extending Oracle VM Management

Now it will also start listening to the SSL port that we assigned, namely 4443.

OC4J will listen for both SSL request (port 4443 in the example) and non-SSL requests (port 8888).

Now all we need is to go ahead and log on to the HTTPS site by typing  https:vmmgr:4443/OVS. We can use the non-SSL site as well and always switch them on or off by editing them in the server.xml file.

Summary

As we can clearly see, the management of Oracle VM Servers and the VMs, is rather crucial to managing our Oracle cloud farm. Fortunately, the feature-rich portal of Oracle is well equipped to manage an Oracle VM farm with its VMs.

In this article, we have learned:

  • Managing Oracle VM Server repository
  • Backing up or Restoring Oracle VM Manager
  • Enabling security

 

If you have read this article you may be interested to view :

About the Author :


Tarry Singh

Tarry Singh, an Oracle OCP, has been a Sr. DBA and has worked with
Oracle technologies starting from Oracle database version 7.3 through 11g.
An industry veteran, whose career spans several industries such as Oil & Gas sector,
Maritime, and currently IT. He has worked for several Fortune 500 companies.
He is currently working for a large French multi-national SI vendor, Atos Origin,
as a Strategic Business Executive. Tarry spends his time talking to customers and
offering cost-effective solutions. He also monitors the emerging trends and is a
renowned industry veteran when it comes to Virtualization and Cloud Computing.

Tarry is also involved in several NGO projects across the world, the latest being
a €2 million technology project in Uganda which he leads as a Chief Technology
Consultant together with Hanze University in The Netherlands. Tarry has also
co-authored a research paper for IEEE called "Smart Metering the Clouds" where he
discusses the vision of developing a consolidated metering solution from a utility
perspective. This was published in June where he co-chaired the IEEE workshop and
is being read by millions across the world.

Tarry holds a Nautical Science graduate degree from India's LBS of Advanced
Research and Studies in Mumbai and holds many IT and non-IT related certifi cations
such as GMDSS, Firefi ghter, and so on. Having worked with more than 40
nationalities and having worked across the globe, Tarry has been able to develop
deep multi-cultural skills and has handled virtual teams with great passion and
tremendous control.

Tarry is a Dutch citizen based in the Netherlands. In his free time, Tarry conducts
market research and analysis with tremendous zest and is very well connected
with the investor community across the globe. Tarry has advised several fi rms in
executing their strategy and has helped them in M&A, product development, and
other areas. He also runs his popular Cloud Computing blog called "Sustainable
Global Clouds" at http://ideationcloud.com and writes passionately about
Mergers and Acquisitions, Business Strategies, Emerging Trends around Sustainable,
and Environmental-friendly technologies. Tarry has spoken at many large
international events and has been quoted by The Economist and several other
leading magazines.

Books From Packt

Oracle SQL Developer 2.1
Oracle SQL Developer 2.1

Oracle Coherence 3.5
Oracle Coherence 3.5

Getting Started With Oracle SOA Suite 11g R1 – A Hands-On Tutorial
Getting Started With Oracle SOA Suite 11g R1 – A Hands-On Tutorial

Oracle Warehouse Builder 11g: Getting Started
Oracle Warehouse Builder 11g: Getting Started

Oracle Application Express Forms Converter
Oracle Application Express Forms Converter

Oracle 10g/11g Data and Database Management Utilities
Oracle 10g/11g Data and Database Management Utilities

Oracle Essbase 9 Implementation Guide
Oracle Essbase 9 Implementation Guide

Processing XML documents with Oracle JDeveloper 11g
Processing XML documents with Oracle JDeveloper 11g

 

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software