Configuring VM Power Schedules

You can automatically power VMs on and off at specified times using power schedules. Power schedules are especially useful for the public cloud, where you pay more when VMs are running. But private cloud VMs that are running unnecessarily consume resources as well.

NotePencil-smallIt's still possible to manually power on and use a VM during the scheduled power-off period.

Overview

The steps to configure automatic power-on and power-off schedules are:

1.Create one or more power schedule groups.

2.Assign existing VMs to a power schedule group.

3.Set the power schedule group for new VMs through the service catalog blueprint, a completion workflow, or the Default Attributes policy, or a combination of these methods, depending on your situation.

4.Monitor power schedule recommendations to ensure that all VMs in your virtual infrastructure have an optimal power schedule.

5.Configure the rules used to generate power schedule recommendations if necessary.

Required Service Portal permissions

Service Portal users with the Modify Power Schedule Groups permission can assign their VMs to power schedule groups. Without the Modify Power Schedule Groups permission, they can still view the power schedule group for their VMs. See Customizing Service Portal Roles for End Users for more information on these permissions.

Create a power schedule group

Access through:

Configuration menu > Groups > Power Schedule

Available to:

vCommander Role of Superuser and Enterprise Admin

Administrator Access Rights

To create a power schedule group:

1.Go to Configuration > Groups > Power Schedule.

2.On the Power Schedule Groups page, click Add.

3.On the Name & Description page, provide a name for the group (maximum 100 characters), with an optional description.

NotePencil-smallGive the group a descriptive name so that it makes sense when viewing the service's Power Schedule Group property, applying a recommendation and setting the group manually. For example, if you are creating a power schedule group for VMs that should be powered on during business hours in Eastern Standard Time, you could name it "Mon-Fri 9-5 EST".
NotePencil-smallThe schedules use the time on the Embotics® vCommander® application server. If you have Service Portal users in multiple time zones, set an appropriate schedule name and description (for example, including the time zone), to make sure the schedule is clear to users.

4.On the Schedule page, configure the schedule. Times are local to the vCommander server.

5.On the Summary page, review the settings and click Finish.

Assign existing VMs to a power schedule group

Access through:

Views menu > Operational, VMs and Templates, or Datastore

Available to:

Administrator and All Operator Levels of Access Rights

To set the power schedule for existing VMs, you add the VMs to a power schedule group.

NotePencil-smallYou can also use the Set Groups on Children command to assign many VMs to a group at the same time.

1.Navigate to and select the VM either through the tree or the Virtual Machines tab.

2.Right-click and select Power > Set Power Schedule Group.

3.In the Set Power Schedule Group dialog, select the appropriate group and click OK.

NotePencil-smallYou can see what power schedule group a VM belongs to on the Details pane of the Summary tab. For information about displaying the power schedule group on the Details pane, see Customizing the Embotics® vCommander® Display. The Power Schedule Group property is in the Lifecycle category.

Set the power schedule group for new VMs

There are three ways to set the power schedule group when a VM is deployed. How do you decide which is best for your situation? Here are some guidelines:

Blueprint: If you know the power scheduling requirements at service creation time, configure the power schedule group in the service catalog blueprint. An example would be a service for a virtual desktop. To set the power schedule group in the service catalog blueprint:

1.Edit the service.

2.On the Component Blueprint page for each component, go to the Attributes tab.

3.Click Add Groups. In the Add Groups dialog, select Power Schedule Group and click OK.

4.In the Power Schedule Group drop-down list, select the appropriate power schedule group.

5.Click Finish to save your changes.

Completion workflow: If you want the power schedule group to be dependent on answers to questions on the request form, such as "Does this service require 24 hour uptime?", then you must assign the power schedule group using a completion workflow. To set the power schedule group with a completion workflow based on a request form field value:

1.Create a list-type custom attribute named 24-hour uptime required, with selectable values of yes and no.

2.Add this custom attribute to the service catalog blueprint, first on the Attributes tab, and then on the Form tab.

3.Create a component-level completion workflow, or edit an existing completion workflow:

On the Steps page, click Add > Lifecycle Management > Set Groups.

In the Step Execution drop-down list, select Execute when conditions are met and click Edit.

In the Variable Assistant dialog, enter the following in the Condition field: #{target.settings.customAttribute['24-hour uptime required']} -eq yes

In the Set Groups Step Details pane, click Add Groups.

In the Add Groups dialog, select Power Schedule Group and click OK.

In the Power Schedule Group drop-down list, select the Always On group.

Add another Set Groups step to the workflow, with the condition #{target.settings.customAttribute['24-hour uptime required']} -eq no, and the power schedule group set to Weekdays.

On the Assigned Components page of the wizard, make sure the workflow is assigned to the appropriate service components.

Policy: When power scheduling requirements are linked to your infrastructure, use the Default Attributes policy to assign the power schedule group. For example, you may have "production" and "dev" environments with very different power schedules. Or you may provision all of your Oracle servers to the same cluster, and all of these servers would stay powered on 24/7. To learn how to set a power schedule group for new VMs through policy, see Assigning Groups to Services with the Default Attributes Policy.

Deleting a power schedule group

Access through:

Configuration menu > Groups > Power Schedule

Available to:

vCommander Role of Superuser and Enterprise Admin

Administrator Access Rights

To delete a power schedule group, select the group, click Delete and confirm the deletion.

caution

When you delete a power schedule group, all VMs in the group are automatically unassigned from the group.

Details on how VMs are powered on and off

When the scheduled power-on and power-off are executed, one task starts and stops all VMs. Events are generated for each VM power-on and power off. A Shutdown Guest OS command is executed if supported by the hypervisor; otherwise, a Stop VM command is executed.

Public cloud VMs: vCommander checks the VM's power state before sending the shutdown request. If a public cloud VM's power state was changed outside vCommander since the last automatic or manual inventory synchronization, vCommander will not be aware of the state change.