Power Management on VMware Horizon Cloud on Microsoft Azure
This guide describes several of the features and components of VMware Horizon Cloud on Microsoft Azure that help you right-size your environment by managing the power states of your deployed workloads. Options include power-based, load-based, and schedule-based power management policies and configurations that control how virtual machines behave when their associated desktops are not in use. Managing your workloads efficiently can reduce the amount of spend on Infrastructure-as-a-Service (IaaS) components on Microsoft Azure.
This guide is written for data center administrators and IT personnel who want to optimize their Windows operating systems. This guide can help you work with Horizon Cloud on Microsoft Azure, and it provides a reference as you become more proficient. VMware periodically updates this guide to reflect continuing enhancements to the Horizon Cloud on Microsoft Azure solution, as well as newer capabilities built in to Microsoft Azure or Windows operating systems that we can take utilize to reduce costs when leveraging an IaaS.
Horizon Cloud on Microsoft Azure
Horizon Cloud provides virtual desktops and hosted apps as a cloud service, and deploys and manages them in the cloud by using IaaS components from the Microsoft Azure platform. It enables users to securely access their desktops and apps from any device or browser.
Benefits of Power Management with Horizon Cloud on Microsoft Azure
Power management configurations control how a virtual machine behaves when the associated desktop or server is not in use. A desktop is considered not in use both before a user logs in, and after a user disconnects or logs off. A farm server or host is considered not in use when the last user session is ended from that host. Power policies also control how a virtual machine behaves after administrative tasks are completed, such as refresh, recompose, farm expansion, and farm refresh.
Horizon Cloud on Microsoft Azure has a number of methods for controlling the IaaS costs of your Horizon Cloud on Microsoft Azure environment. Most of these methods are included in the sizing components of the VDI user assignment configurations, or RDSH/Windows 10 multi-session farm configurations. By using these sizing components, you can implement a cost-effective deployment of Horizon Cloud on Microsoft Azure, while at the same time ensure that resources are available to your users when they need them.
You can also configure power management for virtual machines used for VDI capacity in a desktop assignment for your users. And you can configure power management features when you create or edit RDSH server or Windows 10 multi-session farm configurations in the Horizon Cloud Control Plane.
Choosing the Right Power Management Policy Settings
The primary reason for using power management policies is to reduce the amount of infrastructure resources necessary to support users, while still providing enough powered-on and available resources for users when they need them. Leveraging the power management policies effectively will help you adhere to a lower cost on infrastructure spending.
Figure 1: Powered on time for 30 desktops with Scheduled (Purple) vs. Load-Based Power Management (blue, and actual user demand in green)
The chart above demonstrates the differences between leveraging a schedule-based power management policy and a load-based power management policy. While the schedule-based power management policy helps reduce costs by only powering on resources during scheduled times, it does not account for variances in actual user load, as a load-based power management policy would.
It is important to match the correct policy configuration to the correct user assignments. There are several key user metrics that you should keep in mind:
- Size of User Group / Assignment – Configuring the assignment as close to the number of users in the given groups as possible. This applies to all power management policies.
- Peak Times – Knowing the times when you need to have the maximum or minimum amount of resources available on-demand. Knowing these will help you decide when to use load-based policies.
- Work schedules – Understanding the typical workday hours of the users in any given group, and if there are night, weekend or holiday specific items that might impact a schedule-based policy.
- Selecting the correct assignment type for each user group – Its always best to match a user group to the type of remote desktop or application delivery method. Consider, as you read below, that some power management and scalability configurations apply differently to each assignment type.
- Variability – All user groups will have some variability. With a larger percentage of work-from-home users, you may need to leverage a combination of load-based and schedule-based power management policies to accommodate.
All of these variables should weigh in on choosing which power management policy will apply to each user group.
Power Management for VDI Assignments
Power Management features allow you to automatically provision or de-provision (power off and deallocate) virtual machines running on Microsoft Azure. Each assignment type has different power management capabilities available to it. You can configure these capabilities in the Dedicated or Floating user assignment workflows. You can use these features in different combinations to maintain tight control of your IaaS spend in Microsoft Azure.
Configuring Minimum and Maximum VMs Capacity for VDI
One of the simplest methods to manage infrastructure costs is to right-size every desktop assignment based on measured usage. Be aware that each user group may have different usage patterns, based on their work schedule or SLAs assigned to their work. To start, you should interview key stakeholders for each user group to match an appropriate assignment for each individual group.
Managing basic capacity details for each assignment will help to ensure that you are only using resources that you need to support a user assignment.
Minimum Desktops / Maximum Desktops
You can specify the minimum number and maximum number of desktops that you want in this dedicated VDI desktop assignment. When the assignment is first created, the system deploys the number of desktops specified in the Max Desktops field, and then powers off the desktops, except for the number specified for Min Desktops.
Only the minimum number of desktop instances is initially powered on. As end-user demand increases, the system powers on additional desktops, up to the Max Desktops number. Then, as end-user demand shrinks, the system powers off the desktops until it reaches the Min Desktops number. A desktop must be free of a logged-in user session before the system will power it off.
When you specify zero (0) for Min Desktops, it indicates that you want the system to power off all the assignment's desktops until there is an end-user demand for a desktop. Note that while this saves the most money for IaaS costs, the amount of time it takes to boot a VM and have it ready for users to use can be considerable. Remember, desktops take a while to power up and boot before becoming available for a user to log in. Depending on the size of the VM used, use of encrypted disks, or the number of boot-up agents or applications that are set to start on startup, it may take more time for the VM to be ready and available for a user to access the virtual machine.
When you specify the same number for both the Min Desktops and Max Desktops value, all machines in the assignment will always be powered on.
Figure 2: New Desk Assignment Capacity Configuration
Power Off Protect Time
This setting specifies the number of minutes that you want the system to wait before automatically powering off a powered-on desktop. You can enter a value from 1 to 60. The default is 30 minutes. A lower number powers desktops off more quickly and reduces Microsoft Azure IaaS costs.
This Power Off Protect Time is used primarily for the situations where the system will automatically power off a desktop VM that has been claimed by a user. You can use this protect time setting to tell the system to wait the specified time before starting to power off the VM. That way, if the user is disconnected from the desktop or needs to log in to do more work, the desktop is still ready to use where the user left off.
It is best practice to select a value that balances the need to account for accidental disconnections, while keeping resources powered-on minimally when not in use.
Log Off Disconnected Sessions
This setting automatically logs off the user from a VM with a disconnected session. This setting can be very useful for dedicated assignments, so that claimed machines can be powered off after a defined amount of time after the user logs off the VM, but can cause your users to lose work if they are disconnected from their desktops unexpectedly.
Setting Optional Advanced Properties
Horizon Cloud on Microsoft Azure can automatically modify the number of powered-on virtual machines in each assignment by leveraging the configuration items in the Power Management Mode parameters.
Load-Based Power Management Policies
The power management settings are related to the thresholds at which the system automatically increases and shrinks the number of powered-on desktop instances in the floating VDI desktop assignment according to usage.
There is no load-based power management for Dedicated VDI assignments. You can use the schedule-based power management.
When the usage increases above an upper threshold (see Figure 3 for details), the system automatically powers up a new desktop instance. When the usage shrinks below a lower threshold, the system shuts down and deallocates desktop VMs as end users log off from the desktops.
Remember, desktops take a while to power up and boot before becoming available for a user to log in. Depending on the size of the VM used, or the number of boot-up agents or applications that are set to start on startup, it may take more time for the VM to be ready and available for a login.
Figure 3: New Desktop Assignment - Desktops Configuration
The power management selections balance capacity cost with faster availability as follows:
- Select Optimize for Performance when you want the system to power on the next desktop instance sooner rather than later. Even though you are spending more by having the next desktop ready to go before the user demand requires it, this setting increases the chance that when users try to launch a desktop from the assignment, the desktop is already powered up to meet that demand.
The threshold values used for assignments or farms configured with Optimized for Performance is as follows:
- Low threshold: 23%
- High threshold: 50%
- Select Optimize for Power when you want the system to wait, if possible, before powering on the next desktop instance. The occupancy of the assignment's set of desktops is higher before the system powers up the next desktop instance. Even though this selection minimizes capacity costs by having more utilization of the existing desktops, this setting increases the chance that there might be a delay when new users try to log in, because they might have to wait for the time it takes to power on desktops.
The threshold values used for assignments or farms configured with Optimized for Power is as follows:
- Low threshold: 38%
- High threshold: 80%
- The Balanced selection allows you to strike a balance between capacity costs and timely access to available user workspace constructs.
The threshold used for assignments of farms configurated with Balanced is as follows:
- Low threshold: 31%
- High threshold: 66%
Schedule-Based Power Management Policies
In addition to load-based power management policies, Horizon Cloud on Microsoft Azure also supports scheduled power management. You can define specific schedules for each assignment in each pod to grow or shrink a given assignment or farm based on set-times. Power management schedules takes precedence over automated power management features applied as part of a user assignment or an RDSH farm in a Horizon Cloud on Microsoft Azure deployment.
You can define multiple power management schedules per VDI assignment or RDSH farm. For example, you may want to define one power management schedule for standard workdays (such as 9AM to 5PM on Monday through Friday), and another power management schedule for weekends (such as 10AM to 3PM on Saturday and Sunday).
Figure 4: Scheduling Power Management
You can have up to 10 schedules for VDI desktop assignments (floating or dedicated). If schedules overlap and have different minimum VM values, the system uses the largest value of minimum number of desktops for the overlapping time period.
Dedicated Assignments and Schedule-Based Power Management
During a period that is scheduled, Horizon Cloud on Microsoft Azure takes the appropriate action to make the necessary number of minimum and maximum VMs in an assignment available. Power management schedules take precedence over other power management policies and the default assignment configuration over the duration of the schedule.
Also, when you configure a schedule for dedicated assignments, by default, the system keeps all of the assigned / claimed desktop VMs powered on, regardless of the schedule.
- With a Dedicated Assignment, the minimum number of desktops available only applies to unassigned or unclaimed desktops.
- A Dedicated Assignment with no schedule assigned will power off assigned / claimed desktops as soon as a user logs out, plus the Power Off Protection Time value in minutes.
- If you set any schedule here on a Dedicated Assignment, all assigned or claimed desktops will be powered on during the schedule period. This is to make sure that all Dedicated desktops are ready to use for mapped-to users use during the specified time period. As a result, if all desktops in a Dedicated Assignment are assigned / claimed, all desktops will be powered on, even if the schedule is set to power on zero (0) desktops, since that value only applies to unassigned / unclaimed virtual desktops.
Setting up VDI Desktop Assignments with Horizon Cloud on Microsoft Azure
Using power management options helps you to save money on your IaaS spend in Microsoft Azure. You can see more details about VDI Desktop Assignments in the product documentation:
For more information about implementing a Power Management policy with Floating assignments, see Create a Floating VDI Desktop Assignment Provisioned by a Single Pod in Microsoft Azure.
For more information about implementing a Power Management policy with Dedicated assignments, see Create a Dedicated VDI Desktop Assignment Provisioned by a Single Pod in Microsoft Azure.
Power Management for Farms
Hosted desktop and application hosts service multiple users as opposed to single-user virtual desktop assignments. Microsoft has multiple operating system versions to service these types of workloads, including Windows Server and Windows 10 Multi-Session.
To balance users and maintain availability, hosts are organized into a farm, a collection of Remote Desktop Services hosts (RDSHs). Each of those Remote Desktop Services (RDS) hosts is a VM that is instantiated based on the specific RDSH-capable image which you select for the farm. The RDSH-capable image is sometimes also called an RDS-enabled image, an RDSH image, or an RDSH-capable image.
For more information about implementing a power management policy with farms, see Create a Farm.
Configuring Minimum VM Hosts / Maximum VM Hosts Capacity
You can specify the minimum number and maximum number of RDSH VMs you want in your farm. When the farm is first created, the system deploys the number of VMs specified in the Max VMs field, and then powers off the VMs, except for the number specified for Min VMs.
Only the minimum number of VMs are initially powered on. As end-user demand increases, the system powers on additional VMs, up to the Max VMs number. Then as end-user demand shrinks, the system powers off the VMs, until it reaches the Min VMs number of VMs. A VM must be completely empty of user sessions before the system powers it off.
When you specify zero (0) for Min VMs, it indicates that you want the system to power off all the farm's RDSH VMs when there is no end-user demand for sessions to the farm. When you enter zero (0) for Min VMs, use the Power Of Protect Time field to specify the amount of time you want the system to wait after determining the remaining powered-on VM has no user sessions before the system powers off that VM.
Load-Based Power Management Policies on Farms
Load-based power management works similarly for farms as it does for floating VDI assignments. Note that users are distributed onto hosts within farms for session-based desktops or for applications. If you change the load-balancing options in each farm configuration, it can decrease the amount of time until a new host in a farm is set up to increase capacity based on user demand. See About Power Management and Load Balancing for Farms on Horizon Cloud for more details on how load-balancing configurations can affect power management.
Schedule-Based Power Management Policies on Farms
Schedule-based power management for Windows Server RDSH or Windows 10 Multi-Session farms works in the same way as for VDI assignments.
Using Encrypted Disks with VDI Assignments and Farms
Encrypted VMs take longer to power on than non-encrypted VMs. If you have set Encrypt Disks to Yes, and you want 100% of the encrypted VMs to be ready for end-user connections at a particular time of day, you might have to set an earlier start time. For more information, see When Scheduling Power Management for Farms and VDI Desktop Assignments That Have Large Numbers of Encrypted VMs.
The following scenarios provide examples of what load-based and schedule-based power management policies might look like for floating assignments and session-based desktop farms.
Example 1: Load-Based Power Policy for Floating Assignments
In this scenario, a simple floating assignment is configured for a small group of users. The assignment is configured with the following details:
- Desktop Type : Floating
- Min Desktops : 3
- Max Desktops : 10
- Power Management Mode : Optimized Performance
- Schedule Power Management : None
This example behaviors as follows:
Figure 5: Load-Based Power Management Example with VDI Desktops
As outlined above, with the Optimized Performance setting, the system powers on the next desktop at a lower occupancy threshold. This configuration trades the cost of faster ramp-up to make sure that new desktops are ready to use before any user demand requires it.
Example 2: Schedule-Based Power Management Policy for Session-Based Desktop Farm
In this example, we use a Farm that is delivering session-based desktops to demonstrate the results of a schedule-based power management configuration.
In this scenario, a Hosted assignment has been configured for a group of 160 users. They are scheduled to start work at 9AM and end at 5PM.
The assignment is configured with the following details:
- Default Settings
- Min 3 VM’s in Farm
- Max 10 VM’s in Farm
- 9AM to 6PM
- Min 8 VM’s in Farm
- Max 10 VM’s in Farm
- Logoff after disconnect = 30 min
This example behaviors as follows:
Figure 6: Scheduled Power Management Example with Session-Based Desktop Farm
As you can see, from 8AM until 9AM, you have users logging in. Based on the basic settings of the Farm, the minimum three hosts are running to service those users. In this case, as the hosts fill up, you see that although only two hosts are in use, three are powered on and available for use.
The bulk of the users are logging in between 9AM and 10AM and staying logged in for work until 5PM.
Users start to drain off the system at 5PM. For those who forget to logoff, the setting to automatically log off users who are disconnected for 30 minutes forces them to logoff. This results in the farm being drained of all users before 6PM. At that time, the Power Management feature stops and deallocates back to the 3 hosts required as a minimum in the default Farm settings.
Summary & Other Resources
Using Power management configurations to control how a virtual machine behaves when its associated desktop or server is not in use can have significant efficiency benefits, including reduced infrastructure costs.
You can use the Horizon Cloud on Microsoft Azure Cost Calculator to estimate costs of running Horizon on Azure. The calculator can estimate costs based on preset scenarios or you can provide details to create a custom scenario and estimate.
Power Polices are also available in Horizon running on vSphere. Details on this can be found in the Horizon 2006 product documentation.:
- Setting Power Policies for Desktop Pools in the Horizon 2006 Product Documentation.
- Creating and Managing Farms in the Horizon 2006 Product Documentation.
For additional information about power management policies, explore the following resources:
- Setting Power Policies for Desktop Pools
- Scheduling Power Management for Farms and VDI Desktop Assignments That Have Large Numbers of Encrypted VMs
- Create a Floating VDI Desktop Assignment Provisioned by a Single Pod in Microsoft Azure
- Create a Dedicated VDI Desktop Assignment Provisioned by a Single Pod in Microsoft Azure
- Create a Farm
- About Power Management and Load Balancing for Farms in Horizon Cloud
The following updates were made to this guide.
Description of Changes
Authors and Contributors
The following authors, contributors, and subject-matter-experts collaborated to create this guide.
Rick Terlep is an End-User Computing (EUC) Senior Architect, EUC Technical Marketing, VMware.
- Jerrid Cunniff is an End-User Computing (EUC) Product Line Manager, EUC Product Management, VMware
- Jim Yanik is an End-User Computing (EUC) Senior Manager, EUC Technical Marketing, VMware
- Mukundan Sampath Kumar is a Senior Member of Technical Staff, Virtual Workspace R&D, VMware
- Griff James is Staff Engineer, Virtual Workspace R&D, VMware
- Leo Imoto is an End User Computing (EUC) Senior Specialist Solution Engineer, VMware
- Cindy Carroll is an End User Computing (EUC) Technical Marketing Manager, EUC Technical Marketing, VMware
To comment on this paper, contact VMware End-User-Computing Technical Marketing at email@example.com.