Auto-scale Settings for Host Pools
Warning: Nerdio Manager does not install the BgInfo Azure extension during any automation or management process. However, the BgInfo extension may be installed either through a scripted action directly, or unintentionally, as stated in the Azure PowerShell module issues report.
Nerdio Manager's auto-scale feature allows host pools to grow as necessary to serve current demand, and then shrink when additional capacity is no longer needed. For example, if a company has 300 virtual desktop users online during business hours, and only 50 users online after hours, the host pool serving those users can be configured to have more VMs powered on during business hours, and then shut down those VMs after hours when they're not needed. This allows businesses to save money while meeting demand seamlessly.
Configure Auto-scale
Auto-scale settings differ somewhat based on the Desktop Experience of the host pool. In this guide, we will work with the auto-scale settings for a common type of host pool-- Multi-user Shared Desktop.
To configure auto-scale for a host pool:
-
At the Account level, navigate to AVD > Host Pools.
Note: Alternatively, when creating a host pool, you are presented with an option to configure auto-scaling.
Locate the host pool you wish to work with.
From the action menu, select Auto-scale > Configure.
Host Pool Settings
Enter the following basic auto-scale information:
Auto-Scale: Toggle this option On.
Auto-scale Timezone: From the drop-down list, select the time zone for the auto-scale process.
-
Name: Type the name of the newly added hosts for Prefix or the Prefix+Pattern.
-
Prefix/Pattern: From the drop-down list, select whether to use a Prefix or a Pattern.
Note:
- Prefix can be used when creating multiple session hosts. The Prefix limit is 10 valid, Windows computer name characters. When using a Prefix, a unique suffix is automatically appended in the format "-xxxx", where xxxx are 4 random alphanumeric characters. For example: AVDHOST-s72h. Do not add a "-" to the Prefix.
-
Pattern can be used to specify an advanced naming convention for new hosts. Pattern characters must be enclosed in {} and can be # (for sequential numbers) and/or ? (for random alphanumeric characters). One # implies numbers from 0 to 9, two #s implies numbers of 0 to 99, etc.
Example 1: AVDHOST{###} (AVDHOST000..AVDHOST999).
Example 2: AVDHOST-{???} (AVDHOST-d83, AVDHOST-7sl, etc.).
-
-
Network: From the drop-down list, select a network to connect the new session hosts.
Note: The network determines the Azure region of the new session hosts.
Desktop Image (Template): From the drop-down list, select a desktop image to be used as the golden image for new session hosts.
VM Size (Template): From the drop-down list, select the VM size for new session hosts.
Running OS Disk (Template): From the drop-down list, select the OS disk type and size for new session hosts.
-
Custom OS Disk Size (GIB): From the drop-down list, select the OS disk size.
Note: The disk that is provisioned, and thus the cost, is still be based on the standard disk sizes available in Azure. For example, if you enter a custom size of 200 GiB, you are billed for the 256 GiB provisioned. The custom size is typically used if you want to provision a 4 TiB OS disk. Type 4095 GiB and the system provisions a 4096 TiB disk.
Stopped OS Disk Type: From the drop-down list, select the OS disk type when session host VMs are stopped.
Resource Group: From the drop-down list, select the resource group where the VMs should be created.
-
Re-use Host Names: Select this option for Nerdio Manager to reuse names of host VMs that are automatically created (for example, during creation of a host pool, by auto-scale, or when re-imaging hosts).
Note: If host VMs are deleted manually, the user is offered the option to reuse the host names. In addition, select this option to reuse the VM names removed by auto-scale.
Automatically Re-image Used Hosts: Selecting this option to re-image hosts that had at least one user logged into them. For multi-session hosts, the hosts are re-imaged once the last user signs out.
Default Schedule and Alternative Schedule
Nerdio Manager allows you to configure separate auto-scale settings for a Default Schedule (normal operations) and an Alternative Schedule (outside of normal operations). For example, you may want fewer session hosts available on weekends or bank holidays. Alternatively, you may want more session hosts available two weeks prior to Christmas when you have a large number of temporary customer support agents. In either case, you would use the Alternative Schedule tab to configure the auto-scale settings for those periods that are outside of normal operations.
Companion Video
-
Select the desired tab when configuring Default Schedule and Alternative Schedule auto-scale settings.
Alternative Schedule
The Alternative Schedule period is determined by the schedule in the Alternative Schedule tab. You may select days (for example, Saturday-Sunday) or specific dates (for example, December 10-24).
-
Navigate to the Alternative Schedule tab and enter the following information:
Schedule: Toggle on the Schedule option to turn on the Alternative Schedule process.
Days: From the drop-down list, select the off-peak day(s).
Dates: Select + add date to add specific off-peak date(s).
-
Enter the auto-scale settings for the Alternative Schedule as shown above.
Note: The Estimated Monthly Costs shown at the top of this page only consider the Default Schedule's settings.
Host Pool Sizing
Enter the following Host Pool Sizing information:
-
Active Host Defined As: From the drop-down list, select the active host definition.
Note: When set to “VM started,” the system identifies a session host VM as active as long as the VM is running in Azure. There are very few instances when "VM started" should be selected.
When set to “AVD Agent Available,” the system identifies a session host VM as active only when the AVD back-end is receiving heartbeats and sees the session host as “Available.” In general, you should select "AVD Agent Available.”
Base Host Pool Capacity: Type the number of session host VMs to always be part of this host pool. These session hosts may be stopped or running.
Min Active Host Capacity: Type the minimum number of running session hosts that are always available. Typically, a session host must be running for users to sign in or the "Start on connect" feature is enabled. Other VMs can be either stopped or turned on, as configured by the user auto-scaling logic.
Burst Beyond Base Capacity: Type the capacity to burst above the standard number of session host VMs when there is user demand. The system automatically creates up to this number of new session host VMs above the Base Host Pool Capacity, when needed. These session hosts are the first ones to be removed when the system scales in after business hours.
Scaling Logic
Enter the following Scaling Logic information:
-
Enter the following Pool Settings:
Session limit per host: Type the maximum number of sessions per host. Once this session limit is reached, and there are no more available hosts, a new host is started automatically, if it exists.
Load Balancing: From the drop-down list, select the desired load balancing. (See the Available sessions section below for details.)
-
Start on Connect: Select this option to start session hosts on connect.
Note: These Load Balancing settings override the Load Balancing settings in the host pool's Properties > AVD settings.
-
Select Auto-scale Trigger: From the drop-down list, select the auto-scale trigger.
Note: The available triggers are:
CPU or RAM Usage: This scales out when the average CPU or RAM usage across all running session hosts in the pool exceeds a predefined value for a predefined duration.
Average Active Session: This scales out when the average number of active sessions per host exceeds a predefined value.
Available Sessions: This maintains the number of available hosts by scaling out and scaling in within the limits of the Host Pool Sizing and the maximum number of sessions per host.
User-driven: Hosts are started when users connect and are automatically stopped after a defined amount of time after all users sign out.
-
For CPU or RAM Usage:
Start or Create (Scale Out) Up To: Scale out by starting (if there are stopped VMs) or creating (if there are no stopped VMs) session hosts if the trigger is exceeded.
Stop or Remove (Scale In) Up To: Scale in by stopping (if there are no burst VMs) or removing (if there are burst VMs) session hosts if scale in trigger is met.
-
For Average Active Sessions:
Start or Create (Scale Out) Up To: Scale out by starting (if there are stopped VMs) or creating (if there are no stopped VMs) session hosts if the average active sessions across all hosts is exceeded.
Stop or Remove (Scale In) Up To: Scale in by stopping (if there are no burst VMs) or removing (if there are burst VMs) session hosts if the average active sessions across all hosts is below the number specified.
-
For Available Sessions:
-
Maintain up to X available sessions: Type the number of sessions that must be available either always or during work hours.
Note: This ensures that there are this many available sessions during work hours or at all times. Work hours start at Start of work hours specified in the Pre-Stage Hosts section and end at the beginning of scale in period specified in the Scale in restrictions section below.
-
-
For User Driven:
-
When all users log off, scale in hosts after: From the drop-down list, select the number of minutes to scale in after all users have signed out.
Note: Desktops are automatically stopped only when there are no active or disconnected sessions. To automatically sign out disconnected users after a certain time, use the user session limits settings on the host pool properties.
Burst hosts when available sessions below: A new session host is automatically added, up to maximum burst capacity hosts, when the number of available sessions falls below the specified value.
-
-
Scale in Restrictions:
Stop or Remove (Scale In) Hosts Only From: From the drop-down list, select the time to perform the scale in operation. Select <any time> to allow scaling in to be performed at any time.
-
Scale In Aggressiveness: From the drop-down list, select the scale in aggressiveness.
Note:
- High Aggressiveness: Scale in aggressiveness is set to High by default, which means it is guaranteed that after business hours, hosts that have active or disconnected sessions running on them are automatically deleted or powered off to reduce capacity. After business hours, the auto-scale logic first removes the hosts that have no sessions running on them. The remaining hosts are sorted based on the least number of sessions running on them. The users with active sessions are then consolidated and moved to a single host and the other hosts are removed by auto-scale. A warning message is sent to the active session users before removing the session hosts.
Medium Aggressiveness: When scale in aggressiveness is set to Medium, after business hours, the scaling logic only removes the hosts that have disconnected sessions running on them. The session hosts with active sessions running on them won't be removed. In this case, the host pool is scaled in to some extent.
Low Aggressiveness: When scale in aggressiveness is set to Low, after business hours, the scaling logic only removes those session hosts that have absolutely no sessions running on them. The auto-scale logic does not remove any session host that have sessions, either active or disconnected, running on them. Though this option is less disruptive for the users, there is no guarantee that the host pool is ever scaled in.
-
Scale In Burst Host Select: From the drop-down list, select the host to scale in to minimize user impact.
Note:
Host with fewest active sessions: Scale in the host with the fewest active sessions.
Oldest host: Scale in the oldest host. That is, the host that was created first.
Combine Auto-scale Triggers
Nerdio Manager allows you to combine more than one auto-scale triggers on your host pool.
Select + add trigger to add additional triggers.
Select the delete iconto delete a trigger.
Auto-scale adds capacity when any of the scale out conditions are met. Capacity is removed only when all the scale in conditions are met.
Rolling Drain Mode
The Rolling Drain Mode feature determines which hosts are put into drain mode first, based on the following factors:
Hosts with the fewest active sessions
Hosts' current drain mode status
Hosts with the fewest total sessions
Enter the following Rolling Drain Mode information:
Note: You can create multiple drain windows and target a specific percentage of your hosts to drain mode, outside of the Scale-in Restriction window. This feature allows you to prevent new connections to a percentage of hosts and allows these hosts to be shut down more quickly, saving on resource costs.
Rolling Drain Mode: Toggle this option on to enable rolling drain mode.
Window name: Type the name for this drain window.
-
Start time: From the drop-down lists, select the start time when this drain window comes into effect.
Note: The last drain window remains in effect until 11:59 PM.
-
% hosts in drain mode: Type the percentage of hosts in drain mode during this window.
Note: Use to add or remove drain windows.
Pre-Stage Hosts
Enter the following Pre-Stage Hosts information:
Note: Configure the system to automatically pre-stage some hosts as available capacity with respect to the business hours. For example, you can pre-stage hosts at the beginning of the work day, so the system does not have to auto-scale in real time for users who all sign in at the same time when they start work.
-
Use Multiple Schedules: Select this option to enable multiple, non-overlapping pre-staging schedules to be used.
Note: This is not available for the Available Sessions trigger when During Work Hours option is specified.
Work Days: From the drop-down list, select the work days when pre-stage tasks should be run.
Start of Work Hours: From the drop-down select the starting hour when pre-stage tasks should be run.
Host to be Active by Start of Work Hours: Type the number of session hosts that should be ready to accept user connections by this time.
Scale In Delay: From the drop-down list, select a delay to restrict scale in operations after the start of work hours. Pre-staged hosts are not scaled in during this time even if they are unused.
Notify if isn't done: Type the email addresses, separated by commas, to receive notification if pre-stage hosts task does not execute properly.
Messaging
Enter the following Messaging information:
Note: The system sends messages to any users connected to a session host that has been selected for scale in.
Send a Warning Message to Users on the host: From the drop-down list, select the number of minutes before scaling in that the message should be sent.
The message should say: Type the warning message text.
Auto-Heal Broken Hosts
Note: Session hosts may get impaired due to domain trust issues or FSLogix configuration issues. The AVD agent reports the status of such hosts as unavailable. Admins then have to manually remove such hosts from the pool. However, Nerdio Manager allows you to configure a set of actions to repair these session hosts during the auto-scale process. Auto-scale can automatically attempt to repair "broken" session hosts by restarting and deleting/recreating them. It can make a few attempts to restart the host to try to get it back into an operational state and then either leave it alone or delete and recreate the host.
Enter the following Auto-Heal Broken Hosts information:
- Auto-Heal Broken Hosts: Toggle this option on to enable auto-heal.
-
Host is Broken if AVD Agent Status is: From the drop-down lists, select the desired statuses along with the sessions status.
Note: The status is reported to the AVD service by the AVD agent installed on the session host VM. If something is wrong, the status is something other than "Available." Not every status other than "Available" means that there is a problem. See this Microsoft article for more details. Hosts with active sessions may still be somewhat functional and such hosts are not treated as broken. Only hosts that have either no sessions at all or no active session (that is, disconnected sessions only) are considered broken by auto-scale.
Number of restart attempts Type the number of times auto-scale should try to restart the session host VM to see if the AVD agent status enters a normal state.
Minutes between restart attempts: Type the number of minutes to wait after each restart attempt before moving on to next step (for example, Restart VM, then Remove VM, then etc.).
-
Run Scripted actions after restart attempts: From the drop-down list, select the scripted action(s) to run to attempt to repair the session host VM.
Note: The scripted actions are run in the order shown. You can drag and drop any action to change its place in the list and, therefore, the order it is run.
-
Unrecoverable hosts should be: From the drop-down list, select what to do with the session host VM if the restarts do not resolved the problem.
Notes:
The session host VM can be removed and re-created based on host pool sizing configuration. Alternatively, it can be left alone to be dealt with manually.
If the Auto-Heal operation requires deletion and re-creation of a broken host VM, a spare VM is powered on to replace the capacity, if available.
Exclude from Auto-Scale
Nerdio Manager allows you to exclude certain hosts from auto-scale logic. This setting is available at the host pool level (shown below), as well as the individual session host level.
To exclude Session Hosts from auto-scale:
At the Account level, navigate to AVD > Host Pools.
Locate the host pool you wish to work with.
Locate the host you wish to work with.
-
From the action menu, select Hosts > Exclude from auto-scale.
-
From the drop-down menu, select how you wish to exclude the host from auto-scale.
Do not exclude host from auto-scale: The host is not excluded from auto-scale and it continues to be considered for scale-in/scale-out operations.
-
Exclude hosts from scale IN operations: The host is excluded from scale IN operations.
Select whether you wish to exclude the host from scale-in operations indefinitely. Alternatively, specify a date and time when the exclusion should terminate.
-
Exclude hosts from scale IN and scale OUT operations: The host is excluded from both scale-IN and scale-OUT operations.
Select whether you wish to exclude the host from both scale-in and scale-out operations indefinitely. Alternatively, specify a date and time when the exclusion should terminate.
Once you have entered your selections, select Confirm.
Pause a Host Pool's Auto-scaling
Nerdio Manager allows you to temporarily pause a host pool's auto-scaling logic. For example, you may wish to pause auto-scaling for maintenance or for holidays.
To pause a host pool's auto-scaling:
At the Account level, navigate to AVD > Host Pools.
Locate the host pool you wish to work with.
-
From the action menu, select Auto-scale > Pause auto-scale.
-
Enter the following information:
Pause Until: Toggle this option on to enable auto-scale pausing.
Date: Type the date to pause until.
Time zone: From the drop-down list, select the time zone for the time.
Time: From the drop-down lists, select the time to pause until.
-
Once you have entered all the desired information, select OK.
The host pool's auto-scaling is paused until the specified date and time.
Auto-Scale History Report
Nerdio Manager allows partners to view and print the auto-scale history information. The report can be shared with customers as evidence of auto-scale cost savings.
To generate the auto-scale history report:
At the Account level, navigate to AVD > Host Pools.
Locate the host pool you wish to work with.
-
From the action menu, select Auto-scale > History.
Select the desired Time Range and Graphs to include in the report.
Once you have made your selections, at the bottom, select Print.
Comments (0 comments)