Skip Headers
Oracle® Enterprise Manager Cloud Administration Guide
12c Release 2 (12.1.0.2)

Part Number E28814-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

8 Managing Cloud Policies

This chapter describes the process to define policies for virtualization targets. It contains the following sections:

Managing Cloud Policies

Cloud management policies are rules that a CLOUD_ADMINISTRATOR can define to take certain actions based on either performance metric threshholds or based on a schedule. You can create your own policies or use the ready-to-use policies. The ready-to-use policies provided by Oracle cannot be edited but you can do a create like cloning of the policy and then edit it as required.

There are two kinds of cloud management polices: Performance-based policies and Schedule-based policies. Performance policies are based on the performance metrics of a specific type of target. Schedule based policies are executed based on the schedule you have defined. You can group one or more policies together to form policy groups. You can:

Viewing Cloud Policies

You can view all the cloud policies from the Cloud Policy Home page. You can view details like the status of the policy, type of policy, action type, policy associations and the schedule.

  1. From the Enterprise menu, select Cloud, then select Infrastructure Policies.

  2. On the Policy Home page, you will see a list of a policies that you own and for which you have administration privileges.

    Figure 8-1 Cloud Policies Page

    Cloud Policies
  3. Select a policy from the table. The policy details like the type, associations, and status are listed.

  4. You can view the associations for a selected policy. A policy can be associated with one or more targets. Click Add Association to associate a target with the policy. You can:

    • Click a target in the Associations region to drill down to the policies page for the target.

    • Click View History to view the history of policy associations for this target.

Viewing Policies for a Target

You can view the policies associated with a target on this page. You can associate or disassociate policies with a target.

The following details are displayed:

Defining a Performance Policy

Performance policies are formed based on the performance metrics of a specific target type and its associated targets. You can create conditions and rules for the policy based on the metrics.

Prerequisites

To define a performance policy, follow these steps:

  1. From the Enterprise menu, select Cloud, then select Infrastructure Policies.

  2. On the Policy Home page, you will see a list of a policies that you own and for which you have administration privileges.

  3. Click New Policy and select the Performance Policy type.

  4. In the General Information page, enter the name and description of the policy. Select the Target Type with which the policy is to be associated.

    Figure 8-2 Create Performance Policy - General

    Create Performance Policy: General
  5. Click Next. In the Rule page, select a metric from the left panel and click Add to Condition. Specify the condition, value, and number of occurrences. When these conditions are met, the policy is executed.

    Figure 8-3 Create Performance Policy - Rule

    Create Performance Policy: Rule
  6. Click Next. Specify the action to be performed when the policy condition is met. The list of available actions can vary depending on the selected target type.

    Figure 8-4 Create Performance Policy - Action

    Create Performance Policy: Action
  7. Review the policy and click Save to define this policy and return to the Policy Home page.

    Note:

    After you have defined the policy, you can associate one or more targets with the policy.

Defining a Schedule Based Policy

Schedules based on policies are based on a predefined schedule. To define a schedule based policy, follow these steps:

  1. From the Enterprise menu, select Cloud, then select Infrastructure Policies.

  2. On the Policy Home page, you will see a list of a policies that you own and for which you have administration privileges. Click New Policy and select the Schedule Policy type.

    Figure 8-5 Create Schedule Policy

    Create Schedule Policy
  3. In the Create Schedule Policy page, enter the name, description of the policy, and the Target Type with which the policy is to be associated.

  4. Specify the action that is to be performed when the policy conditions are met. The list of available actions can vary depending on the target type with which the policy is associated.

  5. Specify the frequency and the schedule for the policy.

  6. Click Save to define this policy.

    Note:

    After you have defined the policy, you can associate one or more targets with the policy.

Example 1

If you want to shut down a guest virtual machine every Friday at 6:00 pm and restart it every Monday at 9:00 pm, you can create policies as follows:

Policy for Shutting Down Guest Virtual Machine

To shut down a guest virtual machine every Friday, you can set up the poliicy as follows:

  1. From the Enterprise menu, select Cloud, then select Infrastructure Policies.

  2. In the Cloud Policies page, select Schedule Policy from the Create menu. In the Create Schedule Policy page, enter the following details:

    • Enter a name and description for the policy.

    • Select the Target Type as Oracle VM Guest.

    • Select Stop in the Policy Action field.

    • In the Start field, specify the date and time from which this policy should be effective.

    • In the Repeat field, select Specific Days of the Week and select Friday in the Days of Week checkbox.

    Figure 8-6 Create Schedule Policy (Example 1)

    Create Schedule Policy (Example 2)
  3. Click OK to save this policy and return to the Cloud Policies page.

  4. Click on the policy that you have created to view the details of the policy. In the Associations region, click Add.

  5. In the Search window, select the Oracle VM Guest checkbox and click Search to view a list of guest virtual machines.

  6. Select the virtual guest machine with which the policy should be associated and click Select.

  7. The policy is now associated with the selected guest virtual machine and the policy conditions will be applied.

Policy for Starting Up Guest Virtual Machine

To restart a guest virtual machine every Monday, navigate to the Cloud Policy page and select the policy you just created. Perform the following steps:

  1. Click Create Like to make a copy of the policy.

  2. In the Cloud Policies page, select Schedule Policy from the Create menu. In the Create Schedule Policy page, enter the following details:

    • Enter a name and description for the policy.

    • Select the Target Type as Oracle VM Guest.

    • Select Start in the Policy Action field.

    • In the Start field, specify the date and time from which this policy should be effective.

    • In the Repeat field, select Specific Days of the Week and select Monday in the Days of Week checkbox.

  3. Click OK to save this policy and return to the Cloud Policies page.

  4. Click on the policy that you have created to view the details of the policy. In the Associations region, click Add.

  5. In the Search window, select the Oracle VM Guest checkbox and click Search to view a list of guest virtual machines.

  6. Select the virtual guest machine with which the policy should be associated and click Select. The Guest VMs you select must be the same as the ones selected in the earlier example.

  7. The policy is now associated with the selected guest virtual machine and the policy conditions will be applied. You can click on the associated target to view details about the policy.

Creating a Policy Group (Start Up and Shut Down)

After defining the two policies for the guest virtual machine target type, you can combine these policies into a policy group and associate these policies to one or more targets. To create a policy group, follow these steps:

  1. From the Enterprise menu, select Cloud, then select Infrastructure Policies.

  2. On the Cloud Policies page, click the Policy Groups tab.

  3. Click Create. The Cloud Policy Group page appears.

  4. Enter a name and description for the group.

  5. Click Add and select the two schedule policies that you have created.

  6. Click OK to return to the Cloud Policies page and click on the Policy Group that you have created.

  7. The details of the policy group that you have created such as the name of the policy group, number of policies associated with this group. number of targets associated, and so on are displayed.

  8. Click the Policies Included tab in the bottom region to view the policies associated with this policy group.

  9. Click the Associations tab to view the list of guest virtual machines associated with this policy. Click Add to associate more guest virtual machines with this policy group.

  10. When this policy group is active, the guest virtual machines associated with the policies are shut down and started up as per the schedule.

Activating and Deactivating Policies

Once a policy is defined, it becomes active and can be applied to one or more targets. You can deactivate an active policy by following these steps:

  1. From the Enterprise menu, select Cloud, then select Infrastructure Policies.

  2. On the Policy Home page, you will see a list of a policies that you own and have administration privileges.

  3. Select a policy from the table and click Deactivate. The policy is deactivated and the status of the policy is marked as Inactive. You cannot associate this policy to any target until it is activated and its current associations will be suspended for further evaluations.

Defining Policy Groups

A policy group is a collection of policies that can be applied together and evaluated to generate a compliance score. To define a policy group, follow these steps:

  1. From the Enterprise menu, select Cloud, then select Infrastructure Policies.

  2. Click on the Policy Groups tab. On the Policy Groups page, you will see a list of a policies that have been defined.

  3. Click Create. In the New Policy Group page, click Select and Add Policy to add one or more policies to the group.

  4. A list of policies are displayed. Select one or more policies from the list and click Add.

  5. The selected policy will be added to the policy group. Based on the schedule details defined for each policy, the policy action will be scheduled.

  6. Click Save to save this policy group.

You can perform the following operations:

Example 2

Suppose you want to define a policy group for an Oracle Tier Instance target where the tier instance is scaled down to 1 every Friday and scaled up to 2 every Monday based on certain metric values. You can create the following policies:

Policy to Scale Down a Tier Instance

To scale down a tier instance every Friday, you can set up a performance policy as follows:

  1. From the Enterprise menu, select Cloud, then select Infrastructure Policies.

  2. In the Cloud Policies page, select Performance Policy from the Create menu.

  3. In the Create Performance Policy: General page, enter a name and description for the policy and select the Target Type as Oracle Tier Instance.

    Figure 8-7 Performance Policy: General Page (Example 2)

    Performance Policy: General Page (Example 1)
  4. Click Next. In the Create Performance Policy: Rule page, add the following metrics to the Definition table.

    • Physical CPU Utilization: Specify the Condition as Average of, Value greater than 90, Occurences as 5.

    • Total Throughput: Specify the Condition as Average of, Value greater than 75, Occurences as 3.

      Select Match Any option to indicate that the policy is applicable if any of the conditions are met.

      Figure 8-8 Performance Policy: Rule Page (Example 2)

      Performance Policy: Rule Page (Example 1)
  5. Click Next. In the Performance Policy: Action page, enter the following details:

    • In the Applies to Target field, select Oracle Tier Instance.

    • In the Action field, select Scale Down.

    • In the Action Parameters field, enter the Number of Nodes to be scaled down as 1.

    Figure 8-9 Performance Policy: Action Page (Example 2)

    Performance Policy: Actions Page (Example 1)
  6. Click Next. Review the details of the policy and click Save.

Policy to Scale Up a Tier Instance

To scale up a tier instance, navigate to the Cloud Policy page and select the Performance Policy that you just created. Follow these steps:

  1. Click Create Like to make a copy of the policy.

  2. Modify the name and description of the policy. Click Next.

  3. In the Performance Policy: Rule page, do the following:

    • Physical CPU Utilization: Specify the Condition as Average of, Value greater than 75, Occurences as 5.

    • Total Throughput: Specify the Condition as Average of, Value greater than 50, Occurences as 3.

      Select Match Any option to indicate that the policy is applicable if any of the conditions are met.

  4. In the Performance Policy: Action page, modify the Action to Scaleup and in the Action Parameters field, specify the Number of Nodes as 2.

  5. Click Next. Review the policy and click Save.

Creating a Policy Group (Scale Up and Scale Down)

After defining the two policies for the Oracle Tier Instance target type, you can combine these policies into a policy group and associate these policies to one or more targets. To create a policy group, follow these steps:

  1. From the Enterprise menu, select Cloud, then select Infrastructure Policies.

  2. On the Cloud Policies page, click the Policy Groups tab.

  3. Click Create. The Cloud Policy Group page appears.

  4. Enter a name and description for the group.

  5. Click Add and select the two schedule policies that you have created.

  6. Click OK to return to the Cloud Policies page and click on the Policy Group that you have created.

  7. The details of the policy group that you have created such as the name of the policy group, number of policies associated with this group. number of targets associated, and so on are displayed.

  8. Click the Policies Included tab in the bottom region to view the policies associated with this policy group.

  9. Click the Associations tab to view the list of Oracle Tier Instance targets associated with this policy. Click Add to associate more Oracle Tier Instance targets with this policy group.

  10. When this policy group is active, the Oracle Tier Instance targets are scaled down and scaled up based on the policy definition.

Managing DRS and DPM Policies

Apart from managing and defining policies for a zone, you can also manage Dynamic Resource Scheduling (DRS) and Distributed Power Management (DPM) policies for a virtual server pool. These automated policies improve quality of service and reduce power consumption by dynamically relocating running virtual machines within a server pool based on the load.

Dynamic Resource Scheduling (DRS) policies provide real-time monitoring of Oracle VM Server utilization to rebalance a server pool and provide consistent resources to the running virtual machines. DRS migrates VMs away from heavily loaded Oracle VM Servers to those servers with more resources available.

Distributed Power Management (DPM) policies optimize the server pool for minimum power consumption. DPM complements DRS by reducing the number of powered-on servers in the pool when there are periods of low resource utilization. It can automatically power-on capacity as needed when resource utilization ramps up.

To set up a DRS / DPM policy, follow these steps:

  1. From the Enterprise menu, select Cloud, then select Infrastructure Home.

  2. Right click on a VM Server Pool target in the left panel and select Manage DRS/DPM Policies. Click Configure. The Configure DRS/DPM General page appears.

    Figure 8-10 Configure DRS/DPM: General Page

    Configure DRS/DPM: General Page
  3. Select the Policy Type. This can be:

    • Distributed Resource Scheduler: Select this policy type to optimize virtual machine resource utilization in a server pool.

    • Distributed Power Management: Select this policy type to increase the consolidation ratio to use fewer Oracle VM Servers during periods of relative low resource utilization.

  4. Specify the Time Perid (Minutes). This is the time period for the policy job to run. This sets the policy job to run every n minutes, for example, 10 sets the policy job to run every 10 minutes. You can enter a number between 1 and 60.

  5. Click Add in the Virtual Servers region to add one or more virtual server targets for which the policy is to be enabled.

  6. Specify the Constraints for the Virtual Server CPU as follows:

    • Enable: Set this field to enable or disable logging of CPU performance and utilization.

    • Threshold: The maximum amount of CPU percentage usage allowed before the policy must be enacted. You can enter between 0 and 99.

  7. Click Next. The Configure DRS/DPM Network page appears.

    Figure 8-11 Configure DRS/DPM Policies: Network Page

    Configure DRS/DPM Policies: Network Page
  8. Select the Enable checkbox to indicate whether the policy is to be enabled on the network, and select the threshold at which the policy is to be enacted for the network.

  9. Click Apply.

Note:

Once the policy is created, it is enabled and applicable to all the virtual server pool targets that have been included in the policy. To disable the DRS/DPM policy, create a schedule based policy for the Oracle VM Server Pool target type and in the Policy Action field, select Disable DRS/DPM policies. See Defining a Schedule Based Policy for more details on creating a schedule based policy. You can enable the policy by editing the Schedule Policy and select Enable DRS or Enable DPM as necessary.

Creating Automated DRS and DPM Policies

You can create automated DRS or DPM policies by following these steps:

  1. From the Enterprise menu, select Cloud, then select Infrastructure Policies.

  2. Click New Policy and select the Schedule Policy type.

  3. In the Create Schedule Policy page, enter a name and description for the policy.

  4. Select Oracle VM Server Pool as the Target Type.

  5. Select Enable DRS or Enable DPM Policy from the Policy Action field.

  6. Specify the schedule and frequency for the policy and click OK to save the policy.

  7. In the Cloud Policies page, select the policy you have created and click Add in the Associations region.

  8. Select the Oracle VM Server Pool target with which the policy is to be associated and click Select.

  9. The DRM or DPM policy is now automatically enabled for the selected target.