Extending Oracle VM Management

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:

Click on the Add Server link on the Server Page:

Search and select a Server Pool and then click Next.

Enter the necessary information for Oracle VM parameters:

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.

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:

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:

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:

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.

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.

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.

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.

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 365What is your first and last name?[Unknown]: Tarry SinghWhat is the name of your organizational unit?[Unknown]: AvastuWhat is the name of your organization?[Unknown]: AvastuWhat is the name of your City or Locality?[Unknown]: Your StateWhat is the name of your State or Province?[Unknown]: Your ProvinceWhat is the two-letter country code for this unit?[Unknown]: NLIs CN=Tarry Singh, OU=Avastu, O=Avastu, L=Assen, ST=Drenthe, C=NLcorrect?[no]: yesEnter 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:

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:

Edit the secure-web-site.xml file. Edit the web site element as follows:

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.

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:

Restart the OC4J daemon by clicking on the Restart button in the following OC4Jadmin pane:

We need to click on the Yes button when prompted with the following warning and our /opt/OC4J would get restarted.

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.

Alerts & Offers

Series & Level

We understand your time is important. Uniquely amongst the major publishers, we seek to develop and publish the broadest range of learning and information products on each technology. Every Packt product delivers a specific learning pathway, broadly defined by the Series type. This structured approach enables you to select the pathway which best suits your knowledge level, learning style and task objectives.

Learning

As a new user, these step-by-step tutorial guides will give you all the practical skills necessary to become competent and efficient.

Beginner's Guide

Friendly, informal tutorials that provide a practical introduction using examples, activities, and challenges.

Essentials

Fast paced, concentrated introductions showing the quickest way to put the tool to work in the real world.

Cookbook

A collection of practical self-contained recipes that all users of the technology will find useful for building more powerful and reliable systems.

Blueprints

Guides you through the most common types of project you'll encounter, giving you end-to-end guidance on how to build your specific solution quickly and reliably.

Mastering

Take your skills to the next level with advanced tutorials that will give you confidence to master the tool's most powerful features.

Starting

Accessible to readers adopting the topic, these titles get you into the tool or technology so that you can become an effective user.

Progressing

Building on core skills you already have, these titles share solutions and expertise so you become a highly productive power user.