What You See Is What You Get Element

Lab - How to Deploy and Manage a Private Cloud 

With Oracle VM and Oracle Enterprise Manager Cloud Control 12c

by Christophe Pauliat with contributions from Olivier Canonge, Simon Coter, and Doan Nguyen

This hands-on lab takes you through private cloud management using Oracle Enterprise Manager Cloud Control 12c in an Infrastructure as a service (IaaS) model. You will first configure the IaaS cloud as the cloud administrator and then deploy guest virtual machines (VMs) as a self-service user.


Published October 2013 (updated December 2013)


Want to comment on this article? Post the link on Facebook's OTN Garage page.  Have a similar article to share? Bring it up on Facebook or Twitter and let's discuss.
Table of Contents
Introduction
Preparation
Summary of Steps
Global Picture
Setting Up the Infrastructure Cloud as the Cloud Administrator
Using the Self-Service Portal
Summary
Appendix A: Preparing the Environment to Run the Lab from Your Home or Office
Appendix B: References

Introduction

This document details all actions that were done during Oracle OpenWorld 2013 session Hands-On Lab 10003.

Oracle Enterprise Manager Cloud Control 12c is much more than a virtual machine manager. It enables monitoring and management of many Oracle products (database, middleware, and applications). It can also manage other types of cloud service models: Platform as a Service (PaaS), Database as a Service (DBaaS), and even Software as a Service (SaaS). However, these features are outside the scope of this lab.

During this lab at Oracle OpenWorld, we used a demo environment built on a single x86 laptop, which contained three virtual servers (Oracle VM VirtualBox virtual machines): Oracle VM Server for x 86, Oracle VM Manager, and Oracle Enterprise Manager 12c.

Note: You can also run this lab at your home or office on an x86 server, desktop, or laptop.

Preparation (Done Before Lab)

To save time and fit in the one-hour slot of Oracle OpenWorld labs, the following actions were performed before the actual lab:

  • Install Oracle Linux 6.4 (64 bits) on all the laptops.
  • Install Oracle VM VirtualBox 4.2.16 plus extensions on all the laptops.
  • Install the Java runtime environment (JRE 7 update 25) on all the laptops. (This is needed to launch a VM console from Oracle VM Manager.)
  • Install an Oracle VM Manager 3.2.4 server in an Oracle VM VirtualBox virtual machine.
  • Install an Oracle VM Server for x86 3.2.4 server in an Oracle VM VirtualBox virtual machine.
  • Install an Oracle Enterprise Manager Cloud Control 12c Release 3 server in an Oracle VM VirtualBox virtual machine.
  • Deploy an Oracle Enterprise Manager 12c agent on Oracle VM Manager.
  • Deploy the Oracle VM plug-in on the Oracle Enterprise Manager 12c server.
  • Deploy the Oracle VM plug-in on the Oracle Enterprise Manager 12c agent.
  • Configure HTTPS/TCPS security between the Oracle Enterprise Manager 12c server and the Oracle Enterprise Manager 12c agent installed on Oracle VM Manager.
  • Create users in Oracle Enterprise Manager (the cloud administrator and self-service users).
  • Preconfigure the Chargeback feature in Oracle Enterprise Manager (for charge plans and cost centers).

Note: To run this lab from your home or office, first perform the tasks in Appendix A to prepare the environment before you run the lab.

Summary of Steps

In this lab, you will execute the following steps in Oracle Enterprise Manager Cloud Control 12c:

As the cloud administrator, set up the IaaS environment:

  1. Start the three servers (that is, the three Oracle VM VirtualBox virtual machines).
  2. Connect to the Oracle Enterprise Manager Cloud Control 12c console.
  3. Register Oracle VM Manager.
  4. Discover the Oracle VM server.
  5. Configure the network.
  6. Create VNICs (virtual network interface cards).
  7. Create a nonclustered server pool.
  8. Create a zone.
  9. Create a storage repository.
  10. Present the repository to the Oracle VM Server for x86.
  11. Import an Oracle VM assembly into the repository.
  12. Set up the IaaS self-service portal.
  13. Configure the Chargeback feature.

As a self-service user, do the following:

  1. Deploy an Oracle VM virtual machine from the imported assembly.
  2. Launch the VM console.

Global Picture

Figure 1 shows all the components (Oracle VM VirtualBox and Oracle VM virtual machines) with their names and configuration (memory, IP addresses, and so on).

Setting Up the Infrastructure Cloud as the Cloud Administrator

Figure 1 - Components of the IaaS Environment

Setting Up the Infrastructure Cloud as the Cloud Administrator

Start the Three Servers (Oracle VM VirtualBox VMs)

As previously explained, we will use Oracle VM VirtualBox to host the three servers (Oracle VM Server for x86, Oracle VM Manager, and Oracle Enterprise Manager Cloud Control) on a single laptop.

  1. If the Oracle VM VirtualBox console is not yet started, start it by clicking cube.

    In the console, you should see the three VMs we will use in this lab.

    Three VM's Used In This Lab

    Figure 2 - Three VM's Used in the Lab

  2. Select the three VMs called hol10003_emcc, hol10003_ovm_mgr, and hol10003_ovm_srv.
  3. Click arrow to start them.
  4. Wait for the three VMs to be ready (this will take a few minutes):

    • Wait for the emcc login prompt on the hol10003_emcc VM console.
    • When this prompt is displayed, all VMs are ready (since Oracle Enterprise Manager Cloud Control takes the longest to start).

Connect to the Oracle Enterprise Manager Cloud Control 12c Console

  1. On your machine, open a Firefox web browser and connect to the Oracle Enterprise Manager Cloud Control 12c console using the following URL: https://192.168.56.5:7799/em.

    Note: Firefox might raise a security warning (for example, This Connection is Untrusted) since the SSL certificates are self-signed. If so, ignore the warning (expand I understand the Risks, then click Add Exception, and then click Confirm Security Exception).

    You should get the login window shown in Figure 3:

    The Login Window

    Figure 3 - Cloud Control Login Window

  2. Log in using the following credentials:

    • User Name: cloudadm (Oracle Enterprise Manager 12c cloud administrator)
    • Password: cloud

    Note: In this lab, we will use two different users in Oracle Enterprise Manager: cloudadm (the cloud administrator) and paris_user1 (a self-service user representing a developer). Both users were created by the Oracle Enterprise Manager Cloud Control Super Administrator (SYSMAN) during the preparation of lab environment to save time (see details in Appendix A).

Register Oracle VM Manager

  1. Once you are logged in to the Oracle Enterprise Manager 12c console, go to the Infrastructure Cloud home page by clicking Enterprise, then Cloud, and then Infrastructure Home.

    Select Infrastructure Home

    Figure 4 - How to Select Infrastructure Home Window

    You should now see the Infrastructure Cloud home page shown in Figure 5:

    Infrastructure Cloud Home Page

    Figure 5 - Infrastructure Cloud Home Page

  2. Right-click Infrastructure Cloud, and then click Register OVM Manager.
  3. Enter the following information:

    • Name: ovm-mgr
    • Monitoring Agent: 192.168.56.3:3872
    • Oracle VM Manager URL: tcps://192.168.56.3:54322
    • Oracle VM Manager Console URL: https://192.168.56.3:7002/ovm/console
    • Username: admin
    • Password: Welcome1

      Entering Registration Information

      Figure 6 - Entering OVM Information

  4. Click Submit.

    A confirmation window should pop up stating that a job has been successfully submitted and asking whether you want to close the window or display the job details.

  5. Click Job Details to follow the job's progression.

    The window shown in Figure 7 should appear:

    Job Details Window

    Figure 7 - Job Details Window

  6. Select 15 seconds in the Auto Refresh drop-down menu (by default, this page does not refresh automatically).

    Select 15 Seconds

    Figure 8 - Selecting Auto Refresh Time

  7. Wait for the job to finish (look for Status to show Succeeded).

    Job Status

    Figure 9 - Checking Whether Job is Finished

    If it fails, start again from Step 1 (you might have entered incorrect information).

  8. Go back to the Infrastructure Cloud home page by clicking Enterprise, then Cloud, and then Infrastructure Home.

    You should now see the Oracle VM Manager called ovm-mgr.

    Oracle VM Manager

    Figure 10 - Oracle VM Manager Data

Discover the Oracle VM Server

  1. Right-click the Oracle VM Manager called ovm-mgr, which is shown on the Infrastructure Cloud home page, and then click Discover Virtual Server.

    Discover Virtual Server

    Figure 11 - Discover Virtual Server

  2. Enter the following information in the new window:

    • Virtual Servers: 192.168.56.2
    • Oracle VM Agent Credentials (the Oracle VM Agent runs on the Oracle VM Server for x86):

      • User Name: oracle
      • Password: ovsroot
    Enter Oracle VM Agent Credentials

    Figure 12 - Enter Oracle VM Agent Credentials

  3. Then click Submit.
  4. In the Confirmation window, click Job Details to follow the job's progression.
  5. Wait for the job to finish (look for Status to show Succeeded).

Configure the Network

A basic network configuration was automatically done during the Oracle VM Server for x86 discovery.

A single network called 192.168.56.0 was created with the following roles:

  • Server Management
  • Cluster HeartBeat
  • Live Migration

Note: The Storage role is used when accessing storage with the IP protocol (NFS or iSCSI). In our case, we will use a physical disk, so we don't need the Storage role.

The Virtual Machine role provides the virtual machines with access to networks, so we need to have at least one network with this role. In our case, for simplicity, we will add this role to this existing network.

  1. Go back to the Infrastructure Cloud home page by clicking Enterprise, then Cloud, and then Infrastructure Home.
  2. Right-click ovm-mgr, and then click Manage Network.
  3. Select the line corresponding to network 192.168.56.0, but don't click the 192.168.56.0 hyperlink.
  4. Click the Edit icon.

    Edit the OVM Manager Network

    Figure 13 - Edit the OVM Manager Network

  5. Add the Virtual Machine role to this network using the corresponding checkbox.

     Add the Virtual Machine to this network

    Figure 14 - Add the Virtual Machine to this network

  6. Click Next.
  7. In the "Edit Network: Configure Ports and VLAN Interfaces" window, click Next.

    Click Next

    Figure 15 - Click Next

  8. In the "Edit Network: Network Profile and QoS" window, click mag to select the network type.

    Selecting the Network Type

    Figure 16 - Selecting the Network Type

  9. Do the following:

    • Select Non Internet Routable and click Select.
    • In the section Network Profile, click Add.
    • Select the dev_netprofile profile and click OK.
    Selecting Non-Internet Routable

    Figure 17 - Selecting Non-Internet Routable

  10. Click Next.
  11. In the "Edit Network: Review" window, click Finish.
  12. In the Confirmation window, click Job details to follow the job's progression.
  13. Make sure Auto Refresh is set to 15 Seconds.
  14. Wait for the job to finish (look for Status to show Succeeded).

Note: A network profile is used to automate assignment of IP addresses to guest virtual machines. A network profile is a list of IP address along with host names. It defines a set of IP addresses, their associated host names, and common networking attributes for them.

During the preparation of the lab, we created a network profile called dev_netprofile with the following parameters:

  • IP addresses: 192.168.56.11 to 192.168.56.20 (range of 10 addresses)
  • Netmask: 255.255.255.0
  • Hostnames: dev1 to dev10
  • Domain name: example.com
  • Gateway: 192.168.56.1
  • DNS: 192.168.56.1

Create the VNICS

We will now create some VNICs that will be used later by the Oracle VM virtual machines.

  1. Go back to the Infrastructure Cloud home page by clicking Enterprise, then Cloud, and then Infrastructure Home.
  2. Right-click ovm-mgr and then click Manage Network.
  3. Click the Virtual Network Interface Card Manager tab.
  4. Click Generate to create VNICs.

    Creating the VNICs

    Figure 18 - Click Generate to Create the VNICs

  5. Leave default values for the initial MAC Address (00:21:F6:00:00:00) and for the number of addresses (25), and click Create.

     Leave the Defaults

    Figure 19 - Leave the Defaults

    Note: Since the Oracle VM VirtualBox virtual machines network connections are "host only," they cannot have access to the external network; so we can use the same MAC addresses for the VNICs on the different machines.

  6. In the Confirmation window, click Close. (We will save time here by not following the job's progression.)

Create a Server Pool

A virtual server pool contains one or more virtual servers and guest virtual machines. A virtual server can belong to one and only one virtual server pool at a time. Guest virtual machines and resources are also associated with the server pools. A clustered server pool may contain several virtual servers sharing a storage system. VMs within a clustered server pool may be live-migrated from one virtual server to another.

We will now create a nonclustered server pool using the single Oracle VM server we have. (We cannot create a clustered server pool since we don't have a shared storage system here.)

  1. In the Infrastructure Cloud home page, right-click ovm-mgr and then click Create Virtual Server Pool.

    Creating Virtual Server Pool

    Figure 20 - Creating Virtual Server Pool

  2. In the Create Virtual Server Pool window, enter the following information:

    • Virtual Server Pool Name: devpool
    • Activate Cluster: <unchecked> (non-clustered pool)
    • Virtual IP: 192.168.56.4
  3. In the Virtual Servers section, click add to choose the server to add to the pool.
  4. In the "Search and Select: Targets" window, select the ovm-srv.example.com target and click Select.

    Select the ovm-srv.example.com target

    Figure 21 - Select the ovm-srv.example.com target

  5. When you are back in the Create Virtual Server Pool window, click OK to create the pool.

    Click OK to create the pool

    Figure 22 - Click OK to create the pool

  6. In the Confirmation window, click Job details to follow the job's progression.
  7. Make sure Auto Refresh is set to 15 Seconds.
  8. Wait for the job to finish (look for Status to show Succeeded).
  9. Go back to the Infrastructure Cloud home page by clicking Enterprise, then Cloud, and then Infrastructure Home.
  10. Click View and then Expand All to see all components.

    You should now see the newly created pool called devpool.

    Click OK to create the pool

    Figure 23 - Newly created pool

Create a Zone

A zone is used to group related cloud resources together. Cloud zones can be created based on location or software lifecycle status and for grouping resources according to a cost center or for metering and chargeback purposes. Typically, a zone can cover a department or possibly a small data center.

  1. In the Infrastructure Cloud home page, right-click ovm-mgr, and then click Create Zone.

    Click Create Zone

    Figure 24 - Click Create Zone

  2. In the Create Zone window, do the following:

    • Enter devzone as the Name.
    • Select the Infrastructure Cloud Self Service Zone checkbox.
    • Click add to add a pool to the zone.
  3. In the Select Virtual Server Pools window, do the following:

    • Select the devpool line.

      Select the devpool Line

      Figure 25 - Select the devpool line

    • Click Select.
  4. Click OK to actually create the zone:

    Click OK to create the zone

    Figure 26 - Click OK to create the zone

  5. In the Confirmation window, click Job details to follow the job's progression.
  6. Make sure Auto Refresh is set to 15 Seconds.
  7. Wait for the job to finish (look for Status to show Succeeded).

Create a Storage Repository

A storage repository is virtual disk space on top of physical storage hardware, which is made available to the Oracle VM Servers in a server pool or in various server pools. It defines where Oracle VM resources may reside. Resources include virtual machines, templates for virtual machine creation, virtual machine assemblies, ISO images, shared virtual disks, and so on.

We will create a storage repository for Oracle VM on a local HDD (40 GB) on the Oracle VM Server for x86.

Reminder: When creating a repository on a physical disk, you can use only unused/unpartitioned disks.

  1. Go back to the Infrastructure Cloud home page by clicking Enterprise, then Cloud, and then Infrastructure Home.
  2. Right-click ovm-mgr, and then click Manage Storage Repository.

    Click Manage Storage Repository

    Figure 27 - Click Manage Storage Repository

  3. In the Storage Repository window, click Create .
  4. In the Create Repository window, do the following:

    • Enter devrepo as the name of the repository.
    • Select Physical Disk as the storage type.

      Select Physical Disk

      Figure 28 - Select Physical Disk

    • Click mag2 next to Location to choose the physical disk to use. This will open the LUN Selector window.
  5. Select the 40 GB local HDD and click OK.
  6. Click mag2 next to Server Pool to choose the server pool to use. This will open the "Search and Select: Targets" window.
  7. Select the devpool target and click Select.

    Select the devpool target

    Figure 29 - Select the devpool target

  8. Click OK to create the repository.

    Click OK

    Figure 30 - Click OK

  9. In the Confirmation window, click Job details to follow the job's progression.
  10. Make sure Auto Refresh is set to 15 Seconds.
  11. Wait for the job to finish (look for Status to show Succeeded).
  12. Go back to the Infrastructure Cloud home page by clicking Enterprise, then Cloud, and then Infrastructure Home.
  13. Right-click ovm-mgr, and then click Manage Storage Repository.

    You should now see the newly created repository called devrepo.

    The newly created repository

    Figure 31 - The newly created repository

Present the Repository to the Oracle VM Server

  1. In the Storage Repository window, click the devrepo repository.
  2. In the "Storage Repository Details: devrepo" window, click Present.

    Click Present

    Figure 32 - Click Present

  3. In the Present Servers window, click Select Servers.
  4. In the Select Targets window, do the following:

    • Select the devzone checkbox.
    • Click Select.

      Click Select

      Figure 33 - Select the devzone checkbox

  5. In the Present Servers window, you should now see the ovm-srv.example.com server. Click Present.

    Click Present

    Figure 34 - Select ovm-srv.example.com server

  6. In the Confirmation window, click Job Details to follow the job's progression.
  7. Wait for the job to finish (look for Status to show Succeeded).

Import an Oracle VM Assembly into the Storage Repository

An assembly is a collection of virtual machine instances. You can use assemblies provided by Oracle or create your own assemblies using Oracle Virtual Assembly Builder.

Self-service users can deploy only assemblies that are stored in an Oracle VM storage repository and in the Oracle Software Library of Oracle Enterprise Manager Cloud Control.

To save time, we will use a very small and very simple template (Oracle Linux 6 Update 4 PVM). This assembly was imported into the Oracle Software Library before the lab (or you imported it by following Appendix A). We will now import it to the storage repository.

Note: When running Oracle VM Server for x86 in an Oracle VM VirtualBox virtual machine, only ParaVirtualized Machine (PVM) guest VMs can be created, because Oracle VM Server for x86 does not have Intel-VT or AMD-V virtualization extensions.

  1. Go back to the Infrastructure Cloud home page by clicking Enterprise, then Cloud, and then Infrastructure Home.
  2. Right-click ovm-mgr, and then click Manage Storage Repository.
  3. In the Storage Repository window, click the devrepo repository.
  4. In the "Storage Repository Details: devrepo" window, click the Assemblies tab.
  5. Click Import.

    Click Import

    Figure 35 - Click Import

  6. In the "Import: Select Components" window, do the following:

    • Leave the default value for Source (Software Library Component).
    • Leave the default value for Storage (Default).
    • Select the OL6u4_x64_PVM line.

      Select the OL6u4_x64_PVM line

      Figure 36 - Select the OL6u4_x64_PVM line

    • Click Continue.

    Note: Because of the poor performance of the x86 physical machine (laptop), you might get the error Unable to retrieve the component type for the Selected Component. If so, wait for a few seconds and click Continue again. The error should disappear.

  7. In the "Import: Schedule" window, do the following:

    • Leave the default values.
    • Click Finish to start the import immediately.

      Click Finish

      Figure 37 - Click Finish

  8. In the Confirmation window, click Close.

    The import will take a few minutes.

    To save time, we will continue to the next steps. The import of the assembly should be finished before we actually use the assembly with the self-service user.

Set Up the IaaS Self-Service Portal

The infrastructure cloud based on Oracle VM is now set up. We will now authorize some self-service users to deploy their own servers on the zone we created using the assembly we imported. We will also set up some resource limits to prevent a specific user from consuming all resources.

  1. Go to the Infrastructure Cloud Self Service Setup page by clicking Setup, then Cloud, and then Infrastructure.
  2. In the Machine Sizes section, click Create.

    Click Create

    Figure 38 - Click Create

  3. In the Create Machine Size window, enter the following information:

    • Name: very small
    • VCPUs: 1
    • Memory (MB): 800
    • Local Storage (GB): 10 (10 GB is the size of a second disk in the VM)

    Then click Create. (The first disk is normally reserved for the OS and its size is 11.5GB.)

    Click Create

    Figure 39 - Click Create

  4. In the left panel, click Request Settings.
  5. In the Request Settings section, do the following:

    • Leave the default value (No restriction) for Future Reservation.
    • Leave the default value (No restriction) for Request Duration.
    • Leave the default value (<unchecked>) for Configure EM Agent.
    • Leave the default value (<unchecked>) for Allow Partial Deployment.
    • Click mag2 next to Folder Name to select the Software Library top level folder.
    • Select the HOL10003_Cloud line.

      Select the HOL 10003_Cloud Line

      Figure 40 - Select the HOL 10003_Cloud Line

    • Click Select.
    • Click Apply.

      Click Apply

      Figure 41 - Click Apply

    Note: In this lab, we chose not to deploy the Oracle Enterprise Manager agent on the guest VMs to save time. In real life, it is recommended that you deploy the Oracle Enterprise Manager agent.

  6. In the left panel, click Roles.
  7. In the Roles section, click Assign Quota to Role.

    Click Assign Quota to Role

    Figure 42 - Click Assign Quote to Role

  8. In the "Assign Quotas, Zones & Network profiles to Role" section, do the following:

    • Select the SSA_DEVELOPER role.
    • Select the devzone zone.
    • Enter the following information (the resource limits for all self-service users with role SSA_DEVELOPER):

      • Number of Servers: 3
      • Number of VCPUs: 6
      • Memory (GB): 10
      • Local Disk (GB): 100
    • Select the dev_netprofile network profile.
    • Leave the default values for others parameters.
    • Click Save.

      Click Save

      Figure 43 - Click Save

  9. In the left panel, click Software Components.
  10. In the Software Components section, click Add Components.

    Click Next

    Figure 44 - Click Add Components

  11. In the "Publish Assemblies/Templates to Roles" window, do the following:

    • In the Select Software Components section, click Add and select the OL6u4_x64_PVM line.
    • In the Select Roles section, click Add and select the SSA_DEVELOPER line.
    • Click Publish.

      Click Publish

      Figure 45 - Click Publish



      None

      Figure 46

In this section, we granted the following authorizations to all self-service users with the role SSA_DEVELOPER:

  • Ability to create VMs based on assembly OL6u4_x64_PVM within the zone devzone.
  • Ability to use resources subject to the following resources limits:

    • Maximum of three servers
    • Maximum of six vCPUs for all servers
    • Maximum of 10 GB of memory for all servers
    • Maximum of 100 GB of disk space for all servers

Reminder: In this lab, we chose not to configure deployment of the Oracle Enterprise Manager agent on the guest VMs to save time. In real life, it is recommended that you deploy the Oracle Enterprise Manager agent.

Configure Chargeback

Chargeback, as the name implies, is a tool of accountability. The application's primary uses can generally be described as follows:

  • Provide resource usage metering by aggregating and normalizing the enormous amount of metric data that Oracle Enterprise Manager collects.
  • Provide IT staff with a means to "charge" a currency amount to internal organizations that use resources.
  • Provide internal organizations and users with reports detailing their consumption and charges.

Chargeback has three basic metrics against which to compute resource consumption: CPU usage, and memory and storage allocation. These metrics comprise a universal charge plan that can be applied to any target type configured for Chargeback.

While CPU, memory, and storage can be used for Chargeback across a variety of target types, there might be situations where target-specific charges are required. In this instance, an extended charge plan can be used. The extended charge plan provides greater flexibility to Chargeback administrators, enabling them to:

  • Define target type-specific charges
  • Define fixed configuration and usage-based rates
  • Override or adjust universal plan rates

Configuring Chargeback consists of three steps:

  1. Configuring the universal charge plan (cost for CPU, memory, and storage usage) and creating an extended charge plan, if needed.
  2. Creating the cost centers.
  3. Assigning the charge plans to the target.

In our case, steps 1 and 2 were done before the lab to save time, and an extended charge plan called devplan was created and also several cost centers (see Appendix A for details).

We will now assign the extended charge plan devplan to the zone devzone.

  1. In the left panel, click Chargeback.

    Click Chargeback

    Figure 47 - Click Chargeback

  2. Click Configure Targets. You should get the following page:

    Click Configure Targets

    Figure 48 - Click Configure Targets

  3. Click Add Targets.
  4. In the "Add Targets: Select Targets" window, click Add.
  5. In the "Search and Select: Targets" window, select the devpool and devzone lines, and then click Select.

    Select the devpool and devzone lines

    Figure 49 - Select the devpool and devzone lines

  6. Click Next.

    Click Next

    Figure 50 - Click Next

  7. Select the devzone and devpool lines, and then click Assign Plan.
  8. Select the dev_plan plan and click OK.

    Select the dev_plan

    Figure 51 - Select the dev_plan

  9. Click Next.

    Note: We don't need to assign a cost center here, since the cost center will automatically be assigned during guest VMs creation by the self-service users.

  10. Click Submit.

    Click Submit

    Figure 52 - Click Submit

  11. Take a quick look at the Charge Plans and Cost Centers tabs.

    Charge Plans Tab

    Figure 53 - Charge Plans Tab

    Cost Center Tab

    Figure 54 - Change Plan Tab 2

    Complete

    Figure 55 - Cost Center Tab

The setup of the infrastructure cloud environment by the cloud administrator is now complete.

Using the Self-Service Portal

Deploy a Guest VM from the Oracle VM Assembly

  1. Click Log out (in the top right corner) to log out of the Oracle Enterprise Manager Cloud Control 12c console (user cloudadm).

    Log Out

    Figure 56 - Log Out

  2. Log in again with a self-service user using the following credentials:

    • User: paris_user1
    • Password: puser1

    You should now see the Infrastructure Cloud Self Service Portal.

    Note: On the left panel (Usage), you can see the resource limits previously set by the cloud administrator (three servers, 6 vCPUs, 10 GB of memory, and 100 GB of disk space).

  3. In the Home tab, click Request Servers.

    Click Request Servers

    Figure 57 - Click Request Servers

  4. In the "New Server Request: General" window, do the following:

    • Select the devzone zone.
    • Select the OL6u4_x64_PVM source.
    • Click Next.

      Select the OL6u4_x64_PVM Source

      Figure 58 - Select the OL6u4_x64_PVM Source

  5. In the "New Server Request: Deployment Configuration" window, do the following:

    • Click the OVM_OL6U4_x86_64_PVM1: OL6u4_x64_PVM line, which will display the deployment options.
    • Enter dev as the root password for the future VM.
    • Select very small from the Server Size drop-down menu.
    • Expand the network options by clicking the right arrow in front of Network.

      Expand the Network Options

      Figure 59 - Expand the Network Options

    • Click Configure Networks (on the top right corner below the Cancel button).
  6. In the Configure Networks window, do the following:

    • Select Non Internet Routable from the Network QoS Type drop-down menu.
    • Select Backend Network 192.168.56.0 by clicking mag2

      Select Backend Network

      Figure 60 - Select Backend Network

    • Click OK.
  7. Select the eth0 line and click Edit.

    Select the eth0 line

    Figure 61 - Select the eth0 line

  8. In the "Edit NIC: eth0" window, do the following:

    • Select Network Profile from the IP Assignment drop-down menu.
    • Select dev_netprofile for Network Profile Name.

      Select dev_netprofile

      Figure 62 - Select dev_netprofile

    • Click OK.
  9. Click Next.
  10. In the "New Server Request: Schedule" window, click Next.
  11. In the "New Server Request: Review" window, click Finish.

    Note: The user inputs for this VM can be stored in a deployment plan. This is useful if the user wants to request several identical servers.

    The deployment of the new server starts:

    Deployment of the new server starts

    Figure 63 - Deployment of the new server starts

  12. Wait for a few minutes for the deployment to complete. (You can start reading the next steps).
  13. Click refresh in the top right corner to refresh the page.

    Deployment complete

    Figure 64 - Deployment complete

We can see that a new server called dev1.example.com was deployed (host name allocated as planned in the network profile dev_netprofile).

We can also see the current consumption of resources:

  • One server out of the maximum of three
  • One vCPU out of the maximum of six
  • 0.78 GB memory out of the maximum of 10 GB
  • 21.5 GB out of the maximum of 100 GB (11.5 GB system disk plus 10 GB additional disk for applications)

Launch the VM Console

IMPORTANT: The VNC console is actually a .jnlp file and must be executed by the Java javaws binary. In the Oracle OpenWorld lab, we installed JRE 7 (update 25) on the students' laptops and configured Firefox web browser to open the .jnlp files with /usr/java/jre1.7.0_25/bin/javaws. If you are running this lab from your home of office, you will have to install JRE 7 and configure your web browser. The javaws file provided by other Java distributions (for example, OpenJDK) might not work correctly.

  1. In the Infrastructure Cloud Self Service Portal, right-click the server dev1.example.com and click Launch VNC Console.

    Launch VNC Console

    Figure 65 - Launch VNC Console

  2. Ignore (accept) any security warnings. A new window will open and display the console of the guest VM.
  3. Log in on the console using login root and password dev.
  4. Type the ifconfig command to see which IP address was allocated:

    Which address was allocated

    Figure 66 - Which address was allocated

    The allocated IP address is 192.168.56.11 as planned in the network profile dev_netprofile (range 192.168.56.11 to 192.168.56.20).

Summary

Congratulations! You have successfully created your first virtual machine in your IaaS private cloud using Oracle Enterprise Manager Cloud Control 12c and Oracle VM.

You could now execute others operations.

For instance, as the cloud administrator (user CLOUDADM), you could do the following:

  • Import other Oracle VM assemblies/templates.
  • Import ISO image files for the OS.
  • Add other Oracle VM Servers.
  • Use a shared storage system (Oracle ZFS Storage Appliance, for instance) to create a clustered pool (a pool with several Oracle VM Servers using a share storage repository).
  • Configure the self-service portal to automatically install the Oracle Enterprise Manager agent on the new virtual machines.
  • Display Chargeback reports.

Also, as a self-service user (users PARIS_USER1, PARIS_USER2, ROME_USER1, or ROME_USER2), you could do the following:

  • Create other virtual machines.
  • Start, stop, modify virtual machines.
  • Modify virtual machines (add or remove CPU, memory, or storage).
  • Live-migrate virtual machines between different Oracle VM Servers in the same clustered pool.

The following figures show examples of Chargeback reports generated by the cloud administrator (cloudadm).

Chargeback reports

Figure 67 - Chargeback reports

Figure 68 show a report per user (paris_user1):

 Report per user

Figure 68 - Report per user

We hope you enjoyed this hands-on lab and your time in San Francisco at Oracle OpenWorld 2013.

About Oracle VM Manager Console

If you already know Oracle VM Manager, or if you are just curious, you can connect to Oracle VM Manager (https://192.168.56.3:7002/ovm/console) using username admin and password Welcome1.

You will find that all operations executed from Oracle Enterprise Manager 12c (for example, tasks that involved the network configuration, pool, repository, template, and so on) are also executed in Oracle VM Manager.

This is normal since Oracle Enterprise Manager 12c uses Oracle VM Manager to manage Oracle VM.

 Report per user

Figure 69 - Connect to Oracle VM Manager

Note: When you use Oracle Enterprise Manager 12c, it is recommended that you not execute actions in Oracle VM Manager, since those actions will not be reflected in Oracle Enterprise Manager 12c.

Appendix A: Preparing the Environment to Run the Lab from Your Home or Office

This section explains how to prepare the environment to run this lab if you want to run this lab at your home or office.

The first step is to find an x86 machine (server, desktop, or laptop) that has the required resources:

  • At least 16 GB of RAM
  • An x86 64-bit CPU (Intel or AMD) with at least four CPU threads and with virtualization extensions (Intel VT or AMD-V)
  • An OS supported by Oracle VM VirtualBox (Microsoft Windows, various Linux distributions, Oracle Solaris 10 or 11, or Apple Mac OSX)
  • 40 GB of disk space

Then you will do the following:

Download the Required Binaries

This section lists the required binaries and explains how to download them.

  1. Download the files for your x86 machine:

    Java Runtime Environment (JRE) 7 (the javaws binary is needed to get the VNC console):
    Download the version for your OS from http://java.com/en/download/manual.jsp.

    Oracle VM VirtualBox 4.2.x binaries (4.2.16 during writing of this document):
    Download the version for your OS from https://www.virtualbox.org/wiki/Downloads.
    File name for Oracle Linux or Red Hat Linux 6 (64bit): VirtualBox-4.2-4.2.16_86992_el6-1.x86_64.rpm (size 69 MB)
    File name for Microsoft Windows: VirtualBox-4.2.16-86992-Win.exe (size 95 MB)

    Oracle VM VirtualBox Extension Pack 4.2.x:
    Download this from https://www.virtualbox.org/wiki/Downloads (the same file is used for all operating systems), or you can use this direct link.
    File name: Oracle_VM_VirtualBox_Extension_Pack-4.2.16-86992.vbox-extpack (size 11 MB)

  2. Download the file for Oracle VM Server for x86:

    Oracle VM VirtualBox template for Oracle VM Server for x86 3.2.4
    Download this from http://www.oracle.com/technetwork/server-storage/vm/template-1482544.html, or you can use this direct link
    File name: OracleVMServer.3.2.4-b525.ova (size 249 MB)

  3. Download the files for Oracle VM Manager:

    Oracle VM VirtualBox template for Oracle VM Manager 3.2.4
    Download this from http://www.oracle.com/technetwork/server-storage/vm/template-1482544.html.
    File name: OracleVMManager.3.2.4-b524.ova (size 2.75 GB)

    Oracle VM Assembly for Oracle Linux 6 update 4 (PVM 64 bits)
    Go to the Oracle Software Delivery Cloud page for Oracle VM.
    Once logged in, select the two checkboxes to acknowledge the license and export restriction agreements, and click Continue.
    In the Media Pack Search page, select Oracle VM Templates from the Select a Product Pack list, and select x86 64 bit from the Platform list.
    Click Go.
    Select Oracle VM 3 Templates (OVF) for Oracle Linux 6 Media Pack for x86_64 (64 bit), which is part number B65790-05.
    Click Continue.
    On the next page, download the OVF image for Oracle Linux 6 Update 4 template (OVF) - Paravirtualized x86_64 (64 bit), which is part number V38315-01 (size 460 MB). This is a .zip file.

    Oracle Linux 5 update 7 ISO image (needed in order to add the sysstat package to the Oracle VM Manager server)
    Go to the Oracle Software Delivery Cloud page for Oracle Linux.
    Once logged in, select the two checkboxes to acknowledge the license and export restriction agreements, and click Continue.
    In the Media Pack Search page, select Oracle Linux from the Select a Product Pack list, and select x86 64 bit from the Platform list.
    Click Go.
    Select Oracle Linux Release 5 Update 7 Media Pack for x86_64 (64 bit), which is part number B64448-01.
    Click Continue.
    On the next page, download the file for Oracle Linux Release 5 Update 7 for x86_64 (64 Bit), which is part number V27570-01 (size 3.5 GB). This is a .zip file.

  4. Download the files for Oracle Enterprise Manager Cloud Control 12c:

    Oracle VM VirtualBox for Oracle Enterprise Manager Cloud Control 12c Release 3 (12.1.0.3) and plug-in Update 1 for Linux x86-64
    Go to the Oracle Software Delivery Cloud page for Oracle VM.
    Once logged in, select the two checkboxes to acknowledge the license and export restriction agreements, and click Continue.
    In the Media Pack Search page, select Oracle VM Templates from the Select a Product Pack list, and select x86 64 bit from the Platform list.
    Click Go.
    On the next page, select Oracle VM VirtualBox for Oracle Enterprise Manager Cloud Control 12c Release 3 (12.1.0.3) Media Pack for x86 (64 bit), which is part number B73896-02.
    Click Continue.
    Then download the files for the following four part numbers: V41137-01 (size 4.1 GB), V41139-01 (size 4.0 GB), V41140-01 (size 4.0 GB), and V41141-01 (size 446 MB). This are .zip files.

Install Oracle VM VirtualBox

  1. On your chosen x86 machine, install the JRE file you downloaded.
  2. Install the Oracle VM VirtualBox 4.2.x binaries on your x86 machine.
  3. Start the Oracle VM VirtualBox console.
  4. If it has not already been created, go to File-> Preferences-> Network and create a host-only network in Oracle VM VirtualBox using the default IP information (IPv4 address 192.168.56.1 and netmask 255.255.255.0 for your x86 machine).
  5. Go to File-> Preferences-> General-> Default Machine Folder and choose the folder you want to use to store the virtual machines files.
  6. Go to File-> Preferences-> Extensions and install the Oracle VM VirtualBox Extension Pack you downloaded.

Install Oracle VM Server for x86

  1. In the Oracle VM VirtualBox console, import the VM from the Oracle VM Server template:

    • Select File-> Import Appliance.
    • Select the OracleVMServer.3.2.4-b525.ova file you downloaded.
    • Click Next.
    • Change the name of Virtual System 1 from Oracle VM Server 3.2.4-b525 to hol10003_ovm_srv.
    • Click Import.
  2. Modify the settings of the virtual machine hol10003_ovm_srv:

    1. Set Amount of Memory to 2048MB (System).
    2. Configure the network by going to Network and clicking the Adapter 1 tab. From the Attached to list, select Host-only Adapter.
    3. Replace the 20 GB local HDD by a 40 GB local HDD:

      • Go to Storage.
      • Select disk OracleVMServer3.2.4-... below "Controller: SATA Controller."
      • Click the second icon from the left (-) to remove this HDD.
      • Click the first icon from the left (+) to add a new HDD.
      • Select Add Hard Disk, Create New Disk, VDI, and Dynamically Allocated, name the new disk repo, and specify its size as 40 GB.
  3. Start the virtual machine hol10003_ovm_srv.
  4. Configure the virtual machine (in the VM console):

    1. Configure the network:

      • IP address : 192.168.56.2
      • Netmask: 255.255.255.0
      • Gateway: 192.168.56.1
      • DNS server: 192.168.56.1 (we will not use DNS, but we have to give an IP address here)
      • Hostname: ovm-srv.example.com
    2. Wait for the boot to complete.
  5. If your x86 machine runs a UNIX, Linux, or Mac operating system, open a terminal window and connect to the VM using ssh.( You can use PuTTY if your machine runs Microsoft Windows.)

    Note: The password is ovsroot.

    $ ssh root@192.168.56.2
    
  6. Add the following lines to the /etc/hosts file:

    192.168.56.3    ovm-mgr.example.com ovm-mgr
    192.168.56.5    emcc.example.com emcc
    192.168.56.1    os.example.com os
    

Install Oracle VM Manager

  1. In the Oracle VM VirtualBox console, import the VM from the Oracle VM Manager template:

    • Select File-> Import Appliance.
    • Select the OracleVMManager.3.2.4-b524.ova file you downloaded.
    • Click Next.
    • Change the name of Virtual System 1 from Oracle VM Manager 3.2.4-b524 to hol10003_ovm_mgr.
    • Click Import.
  2. Modify the settings of the virtual machine hol10003_ovm_mgr:

    • Configure the network by going to Network and clicking the Adapter 1 tab. From the Attached to list, select Host-only Adapter.
    • Leave Amount of Memory as 4096 MB (you need at least 3072 MB).
  3. Start the virtual machine hol10003_ovm_mgr.
  4. Configure the virtual machine (in the VM console):

    1. Set the root password to ovsroot.
    2. Configure the network:

      • IP address: 192.168.56.3
      • Netmask: 255.255.255.0
      • Gateway: 192.168.56.1
      • DNS server: 192.168.56.1 (we will not use DNS, but we have to give an IP address here)
      • Hostname: ovm-mgr.example.com
    3. Wait for the boot to complete.
  5. If your x86 machine runs a UNIX, Linux, or Mac operating system, open a terminal window and connect to the VM using ssh. (You can use PuTTY if your machine runs Microsoft Windows.)

    $ ssh root@192.168.56.3
    
  6. Add the following lines to the /etc/hosts file:

    192.168.56.5    emcc.example.com emcc
    192.168.56.2    ovm-srv.example.com ovm-srv
    192.168.56.1    os.example.com os
    
  7. Create the directory where we will install the Oracle Enterprise Manager 12c agent later:

    # mkdir /u01/em_agent
    # chown oracle /u01/em_agent
    
  8. Set a password for the oracle UNIX user (choose oracle as the password):

    # passwd oracle 
    
  9. Install the sysstat package (which is needed by the Oracle Enterprise Manager agent):

    • Download the file.
    • Copy the file sysstat-7.0.2-11.el5.x86_64.rpm to your VM in the /var/tmp directory.
    • Install the RPM:

      # rpm -ivh /var/tmp/sysstat-7.0.2-11.el5.x86_64.rpm 
      # rm /var/tmp/sysstat-7.0.2-11.el5.x86_64.rpm 
      
  10. Configure the Oracle VM Manager keystore (so you will have a secure connection with Oracle Enterprise Manager Cloud Control):

    # cd /u01/app/oracle/ovm-manager-3/bin
    # ./secureOvmmTcpGenKeyStore.sh 
    Generate OVMM TCP over SSH key store by following steps:
    Enter keystore password: Store00 
    Re-enter new password: Store00
    What is your first and last name?
      [Unknown]:  oow
    What is the name of your organizational unit?
      [Unknown]:  oow
    What is the name of your organization?
      [Unknown]:  oow
    What is the name of your City or Locality?
      [Unknown]:  oow
    What is the name of your State or Province?
      [Unknown]:  oow
    What is the two-letter country code for this unit?
      [Unknown]:  oow
    Is CN=oow, OU=oow, O=oow, L=oow, ST=oow, C=oow correct?
      [no]:  yes
    
    Enter key password for <ovmm>
        (RETURN if same as keystore password):  
    
    # ./secureOvmmTcp.sh 
    Enabling OVMM TCP over SSH service
    
    Please enter the Oracle VM manager user name: admin
    
    Please enter the Oracle VM manager user password: Welcome1
    
    Please enter the password for TCPS key store: Store00
    
    The job of enabling OVMM TCPS service is committed, please restart OVMM to take effect.
    
    # service ovmm stop
    # service ovmm start
    
    # cd ..
    # mkdir keystore
    # chown oracle ./keystore
    # /u01/app/oracle/java/bin/keytool -keystore /u01/app/oracle/ovm-manager-3/ovmmCoreTcps.ks -exportcert 
    -alias ovmm -file ./keystore/export.jks
    Enter keystore password:  Store00
    Certificate stored in file <./keystore/export.jks>
    
  11. Stop the Oracle VM Manager preparation for now and perform the steps in the "Install Oracle Enterprise Manager Cloud Control 12c" section. When Oracle Enterprise Manager Cloud Control is ready, come back here and continue.
  12. Deploy the Oracle Enterprise Manager agent on the Oracle VM Manager server:

    1. Go to the Oracle Enterprise Manager Cloud Control 12c console by opening the URL https://192.168.56.5:7799/em in your web browser.
    2. Log in with user sysman and password welcome1.
    3. Click Setup, Add Target, and Add Target Manually.
    4. Select Add host target and click Add Host.
    5. Click Add and enter the following information:

      • Host: 192.168.56.3
      • Platform: Linux x86-64
    6. Click Next.
    7. Ignore the warning about fully qualified host names.
    8. In the "Add Host Targets: Installation Details" window, enter the following information, and then click Next:

      • Installation Base Directory: /u01/em_agent
      • Instance Directory: /u01/em_agent/agent_inst
      • Named Credential:

        • Click + to add a new credential and then configure it as follows:

          • Username: oracle
          • Password: oracle
          • Save As: oracle
        • Click OK.
      • Privileged Delegation Setting: <empty>
    9. In the "Add Host Targets: Review" window, click Deploy Agent.
    10. Wait for the agent to be deployed (which takes several minutes).
    11. Execute the indicated scripts as root on Oracle VM Manager to finish deployment.

      $ ssh root@192.168.56.3
      # /u01/em_agent/core/12.1.0.3.0/root.sh
      # /u01/app/oraInventory/orainstRoot.sh 
      
  13. Set up the Oracle Enterprise Manager 12c software library:

    1. In the Oracle Enterprise Manager Cloud Control console, click Setup, Provisioning and Patching, and Software Library.
    2. In the Upload File Locations tab, make sure that the Storage Type selected is OMS Shared File System.
    3. Click Add.
    4. Enter the information for this location:

      • Name: default_loc
      • Location: /u01/OracleHomes/swlib
    5. Click OK.
    6. Click Job Details (to make sure the job ends successfully).
    7. Select 15 seconds for Auto Refresh.
    8. Wait for status "Succeeded."
  14. Install the Oracle Virtualization plug-in on the Oracle Enterprise Manager agent just deployed:

    • In the Oracle Enterprise Manager Cloud Control console, click Setup, Extensibility, and Plug-ins.
    • Expand Servers, Storage, and Network.
    • Select Oracle Virtualization.
    • Click Deploy On and Management Agent.
    • Click Continue.
    • Select the line 192.168.56.3 and click Continue.
    • Click Next.
    • Click Deploy.
  15. Finish configuring the secure connection between Oracle VM Manager and Oracle Enterprise Cloud Control. (Use the default password.)

    $ ssh oracle@192.168.56.3
    oracle$ cd /u01/app/oracle/ovm-manager-3
    oracle$ /u01/em_agent/agent_inst/bin/emctl secure add_trust_cert_to_jks
         -trust_certs_loc ./keystore/export.jks -alias ovmm
    Oracle Enterprise Manager Cloud Control 12c Release 3  
    Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
    Password: welcome
    
    Message   :   Certificate was added to keystore
    ExitStatus: SUCCESS
    
  16. Enable the HTTP server and copy the Oracle Linux 6 update 4 Oracle VM template:

    • Unzip the file V38315-01.zip you previously downloaded. This will create a file called OVM_OL6U4_x86_64_PVM.ova.
    • The Oracle VM Manager virtual machine already has an Apache HTTP server configured and running. The Document Root directory is /var/www/html. Create a subdirectory called files under /var/www/html.

      Note: The password is ovsroot.

      $ su -
      # cd /var/www/html
      # mkdir files
      # chmod 777 files
      
    • Copy the file OVM_OL6U4_x86_64_PVM.ova into the files directory (use scp or WinSCP):

      # ls -lh
      total 490M
      -rw-r--r-- 1 root root 490M aug 12 07:47 OVM_OL6U4_x86_64_PVM.ova
      
  17. Change the default timeout for VNC consoles from 300 seconds to 30 seconds. (When opening a VNC console for an Oracle VM guest for the first time, there are several warnings about security. It can take more than 30 seconds to read them and close the windows.)

    # cd /u01/app/oracle/ovm-manager-3/ovm_utils
    # ./ovm_managercontrol -u admin -p Welcome1 -h localhost -T 300 -c setsessiontimeout 300
    

Install Oracle Enterprise Manager Cloud Control 12c

  1. Create the Oracle Enterprise Manager Cloud Control template file from the three zip files you downloaded:

    • Unzip the V38990-01.zip, V38991-01.zip, and V38992.zip files. This will create three files with a .ova extension.
    • Concatenate the three .ova files to create a single .ova file:

      $ cat EM12cR3*.ova > EM12cR3.ova
      

      This will create a 12 GB file called EM12cR3.ova.

  2. In the Oracle VM VirtualBox console, import the VM from the Oracle Enterprise Manager Cloud Control template:

    • Select File-> Import Appliance.
    • Select the file EM12cR3.ova.
    • Click Next.
    • Change the name of Virtual System 1 to hol10003_emcc.
    • Click Import.
  3. Modify the settings of the virtual machine hol10003_emcc:

    • Configure the network by going to Network and clicking the Adapter 1 tab. From the Attached to list, select Host-only Adapter.
    • Set the base memory to 5120MB (System, Motherboard).
  4. Start the virtual machine hol10003_emcc.
  5. On the VM console, log in using user root and password welcome1.

    Warning: The VM is preconfigured with US/qwerty keyboard; if you have another keyboard, make sure to press the keys corresponding to the qwerty layout.

  6. Open a terminal window.
  7. Change the network configuration to replace DHCP with a static IP address by modifying the /etc/sysconfig/network-scripts/ifcfg-eth0 file:

    Replace the following line:

    BOOTPROTO=dhcp
    

    With the following lines:

    BOOTPROTO=static
    IPADDR=192.168.56.5
    NETMASK=255.255.255.0
    
  8. Apply the network changes now:

    # service network restart
    
  9. If your machine runs a UNIX, Linux, or Mac operating system, open a terminal window and connect to the VM using ssh (you can use PuTTY if your machine runs Microsoft Windows):

    Note: The password is welcome1.

    $ ssh root@192.168.56.5
    

    If you are not using a US/qwerty keyboard, you will have the correct keyboard layout in this terminal window.

  10. Change the root password to ovsroot (it is easier to have the same root password for all servers):

    # passwd root
    
  11. Disable the Linux firewall to authorize HTTP/HTTPS traffic between the x86 machine's web browser and Oracle Enterprise Manager:

    # chkconfig iptables off
    # chkconfig ip6tables off
    
  12. Edit file /home/oracle/start_oms.sh and set its content to the following:

    #!/bin/bash 
    export ORACLE_HOSTNAME=emcc.example.com 
    echo "Starting the Oracle Management Server ....." 
    echo "" 
    cd /u01/OracleHomes/Middleware/oms/bin 
    ./emctl start oms 
    
  13. Edit file /home/oracle/stop_oms.sh and set its content to the following:

    #!/bin/bash 
    export ORACLE_HOSTNAME=emcc.example.com 
    echo "Stopping the Oracle Management Server ....." 
    echo "" 
    cd /u01/OracleHomes/Middleware/oms/bin 
    ./emctl stop oms 
    
  14. Create a startup script named /etc/init.d/emcc to automatically start Oracle Enterprise Manager Cloud Control at boot:

    #!/bin/bash
    
    case "$1" in
      start)
        echo -n "Starting Enterprise Manager 12cR3"
        su oracle -c /home/oracle/start_all.sh 
        ;;
      stop)
        echo -n "Stopping Enterprise Manager 12cR3"
        su oracle -c /home/oracle/stop_all.sh
        ;;
      *)
        echo "Usage: $0 {start|stop}"
    esac
    
    # chmod +x /etc/init.d/emcc
    # ln -s /etc/init.d/emcc /etc/rc3.d/S98emcc
    # ln -s /etc/init.d/emcc /etc/rc0.d/K01emcc
    # ln -s /etc/init.d/emcc /etc/rc1.d/K01emcc
    # ln -s /etc/init.d/emcc /etc/rc6.d/K01emcc
    
  15. Add the following lines to the /etc/hosts file:

    192.168.56.5    emcc.example.com emcc
    192.168.56.3    ovm-mgr.example.com ovm-mgr
    192.168.56.2    ovm-srv.example.com ovm-srv
    192.168.56.1    os.example.com os
    
  16. Disable the GUI environment (GNOME) to save resources (CPU and memory):

    Edit /etc/initab file and replace the following line:

    id:5:initdefault:
    

    With the following line:

    id:3:initdefault:
    
  17. On the Oracle Enterprise Manager 12c server, create the directory that will contain the software library:

    # mkdir /u01/OracleHomes/swlib 
    # chown oracle:dba /u01/OracleHomes/swlib 
    
  18. Reboot the server:

    # reboot
    
  19. Wait for the boot to complete and for Oracle Enterprise Manager Cloud Control to start. (Wait for the prompt emcc login: on the VM console.)
  20. Go back to the "Install Oracle VM Manager" section and continue with Step 12.

Preconfigure the IaaS Environment in Oracle Enterprise Manager 12c

Some aspects of the IaaS setup were done before the Oracle OpenWorld lab to save time and ensure the lab fit in the one-hour slot. Those operations were:

  • Creating IaaS users (cloud administrator and self-service users)
  • Importing an Oracle VM assembly into the Oracle Software Library of Oracle Enterprise Manager Cloud Control
  • Creating a network profile
  • Configuring Chargeback

Create the cloudadm User (Cloud Administrator)

  1. In your web browser, connect to the Oracle Enterprise Manager Cloud Control 12c console using the following:

    • URL: https://192.168.56.5:7799/em
    • User: sysman
    • Password: welcome1
  2. Click Setup-> Security-> Administrators.
  3. Click Create.
  4. Enter the following information:

    • Name: cloudadm
    • Password: cloud
    • Confirm Password: cloud
  5. Leave defaults values for other fields and click Next.
  6. Add role EM_CLOUD_ADMINISTRATOR to the existing roles (EM_USER and PUBLIC) and click Next.
  7. In the "Create Administrator cloudadm: Target Privileges" window, click Next.
  8. In the "Create Administrator cloudadm: EM Resource Privileges" window, click Next.
  9. In the "Create Administrator cloudadm: Review" window, click Finish.

Create the SSA_DEVELOPER Role (Custom Role for Self-Service Users)

As explained in the section 3.4.1 of the Enterprise Manager Cloud Control Cloud Administration Guide (see Appendix B: References), we need to create a custom role for self-service application users.

  1. In the Oracle Enterprise Manager Cloud Control 12c console (while still logged in as the sysman user), click Setup-> Security-> Roles.
  2. Click Create.
  3. Enter SSA_DEVELOPER as the name and click Next.
  4. Add role EM_SSA_USER (there are no existing roles) and click Next.
  5. In the "Create Role SSA_DEVELOPER: Target Privileges" window, click Next.
  6. In the "Create Role SSA_DEVELOPER: EM Resource Privileges" window, click Next.
  7. In the "Create Role SSA_DEVELOPER: Administrators" window, click Next.
  8. In the "Create Role SSA_DEVELOPER: Review" window, click Finish.

Create a Self-Service User

  1. In the Oracle Enterprise Manager Cloud Control 12c console (while still logged in as the sysman user), click Setup-> Security-> Administrators.
  2. Enter the following information:

    • Name: paris_user1
    • Password: puser1
    • Confirm Password: puser1
    • Cost Center: PARIS_USER1
    • Line of Business: DEV GROUP PARIS
    • Description: Developer based in Paris
  3. Leave defaults values for other fields and click Next.
  4. Add role SSA_DEVELOPER to the existing roles.
  5. Remove the existing roles EM_USER and PUBLIC.
  6. Click Next.
  7. In the "Create Administrator ssa_user1: Target Privileges" window, click Next.
  8. In the "Create Administrator ssa_user1: EM Resource Privileges" window, click Next.
  9. In the "Create Administrator ssa_user1: Review" window, click Finish.

Create Three More Self-Service Users

  1. Do the following to create the second user:

    1. Select the user PARIS_USER1 and click Create Like.
    2. Enter the following information:

      • Name: paris_user2
      • Password: puser2
      • Confirm Password: puser2
      • Cost Center: PARIS_USER2
    3. Click Next four times (in the next four windows), and then click Finish.
  2. Do the following to create the third user:

    1. Select the user PARIS_USER1 and click Create Like.
    2. Enter the following information:

      • Name: rome_user1
      • Password: ruser1
      • Confirm Password: ruser1
      • Cost Center: ROME_USER1
      • Line of Business: DEV GROUP ROME
      • Description: Developer based in Rome
    3. Click Next four times (in the next four windows), and then click Finish.
  3. Do the following to create the fourth user:

    1. Select the user ROME_USER1 and click Create Like.
    2. Enter the following information:

      • Name: rome_user2
      • Password: ruser2
      • Confirm Password: ruser2
      • Cost Center: ROME_USER2
    3. Click Next four times (in the next four windows), and then click Finish.

Import an Oracle VM Assembly

  1. In the Oracle Enterprise Manager Cloud Control 12c console (while still logged in as the sysman user), click Setup, Provisioning and Patching, and Software Library.
  2. Select the Referenced File Locations tab.
  3. Select HTTP as the storage type and click Add.
  4. Enter the following information and then click OK:

    • Name: http_mgr
    • Location: http://192.168.56.3/files
  5. Click Enterprise, Provisioning and Patching, and Software Library.
  6. Right-click Software Library, and then click Create Folder.
  7. Enter HOL10003_Cloud as the name, and click OK.
  8. Right-click HOL10003_Cloud, and then click Create Entity and then Virtualization.
  9. Select Assembly as the subtype and click Continue.
  10. Enter OL6u4_x64_PVM as the name and click Next.
  11. Do the following in the "Create Assembly: Upload Files" window:

    1. Select Refer Files.
    2. Select the Referenced File Location (choose http_mgr).
    3. In the Specify Source section, click Add.
    4. Enter the following information:

      • Source File: OVM_OL6U4_x86_64_PVM.ova
      • Name: OVM_OL6U4_x86_64_PVM.ova
    5. Click Next.
  12. In the "Create Assembly: Customize" window, click Next.
  13. In the "Create Assembly: Review" window, click Save and Upload.

Create a Network Profile

A network profile is used to automate assignment of IP addresses to guest virtual machines. A network profile is a list of IP address along with host names. It defines a set of IP addresses, their associated host names, and common networking attributes for them.

  1. In the Oracle Enterprise Manager Cloud Control 12c console (while still logged in as the sysman user), click Setup-> Provisioning and Patching-> Network Profile.
  2. Click Create.
  3. Enter the following information:

    1. Name: dev_netprofile
    2. Domain name: example.com
    3. Netmask: 255.255.255.0
    4. Gateway: 192.168.1.1
    5. DNS: 192.168.1.1
    6. IP Address: Range
    7. Click Add and enter the following information:

      • Hostname Pattern: dev
      • Start Value: 1
      • First IP Address: 192.168.56.11
      • Last IP Address: 192.168.56.20
  4. Click OK.

Configure Chargeback

Figure 70 depicts the Chargeback feature:

Connect to Oracle VM Manager

Figure 70 - Chargeback feature

There are three steps to configure the Chargeback feature:

  • Configure the charge plan(s).
  • Configure the universal charge plan (set the cost for CPU, memory, and disk space usage) and, optionally, define an extended charge plan.
  • Set up the cost centers.
  • Assign the charge plans(s) to targets (target assignments).

The Chargeback feature is based on monthly reports. You can have different charge plans, cost centers, and targets for each month.

Configure the Universal Charge Plan for the Current Month
  1. In the Oracle Enterprise Manager Cloud Control 12c console (while still logged in as the sysman user), click Enterprise-> Chargeback.
  2. Click the Charge Plans tab.
  3. Select Universal Charge Plan.
  4. Click Create, and then click Revision to create a new revision of the universal charge plan for the current month.
  5. Enter the following costs (these are examples) and the duration for resources usage:

    • CPU Usage: 0.50 $ / CPU / hour
    • Memory Allocation: 2.00 $ / GB / Day
    • Storage Allocation: 0.50 $ / GB / Day
  6. Click Save.
Configure the Universal Charge Plan

Figure 71 - Configure the Universal Charge Plan

Create an Extended Charge Plan
  1. Click Create, and then click Plan to create a new extended charge plan.
  2. Name it dev_plan (since it will be used to charge the developers for resource consumption).
  3. In the Target Types panel, click Add.
  4. Select Oracle VM Guest and click OK.
  5. The new extended plan will be based on the universal charge plan using multipliers for CPU, memory, and storage. Do the following:

    • Leave Multipliers as the default values (1).
    • Click Add Item.
    • Select Base Charge for Item Name and click OK.
    • Set the cost for the base charge, for instance, 10.00 $ per Day.
    • Click Save.
Create an Extended Charge Plan

Figure 72 - Select  the Guest

Set Up the Cost Centers
  1. Click the Cost Centers tab.
  2. Add a cost center for the developer group based in Paris:

    1. Click Add.
    2. Enter the following information:

      • Cost Center: DEVGRP_PARIS
      • Display Name: DEVGRP_PARIS
    3. Select the Top Level (Root) level.
    4. Click OK.
  3. Add a cost center for the developer group based in Rome by repeating the same operations using DEVGRP_ROME for the name.
  4. Add a cost center for the first user of the Paris developers group:

    1. Click Add.
    2. Enter the following information:

      • Cost Center: PARIS_USER1
      • Display Name: PARIS_USER1
    3. Select the Member of DEVGRP_PARIS level.
    4. Click OK.
  5. Add a cost center for the second user of the Paris developers group by repeating the same operations using PARIS_USER2 for Cost Center and Display Name.
  6. Add a cost center for the first user of the Rome developers group by repeating the same operations using ROME_USER1 for Cost Center and Display Name and Member of DEVGRP_ROME for Level.
  7. Add a cost center for the second user of the Rome developers group by repeating the same operations using ROME_USER2 for Cost Center and Display Name and Member of DEVGRP_ROME for Level.
Set up the Cost Centers

Figure 73 - Set up the Cost Centers

Assign the Charge Plans to Targets

Since we have not yet configured the Oracle VM infrastructure cloud (done during the lab), we don't have the Oracle VM targets (zone, pool, and so on) and we cannot assign the charge plans at this time. The assignment will be done during the lab.

Appendix B: References

In addition, this document is available at http://blogs.oracle.com/cpauliat/entry/hol_oow2013.

Revision 1.1, 12/24/2013:
Made the following changes:
  • In the "Download the Required Binaries" section, changed the download instructions in Step 3 and Step 4.
  • In the "Install Oracle VM Server for x86" section, added substep c to Step 2.
  • In the "Install Oracle VM Manager" section, did the following:

    • Changed Step 9.
    • Added a new step between the old Step 12 and Step 13 (this new step is now Step 13), and renumbered subsequent steps.
    • Changed what was Step 15 (now Step 16) to show becoming superuser first.
  • In the "Install Oracle Enterprise Manager Cloud Control 12c" section, did the following:

    • Changed the last bullet under Step 3.
    • Added two new steps between the old Step 11 and Step 12 (these new steps are now Step 12 and Step 13), and renumbered subsequent steps.
    • Added a new step between the old Step 14 and Step 15 (this is now Step 17).

Follow us:
Blog | Facebook | Twitter | YouTube