AVD for Azure Local: Enable dynamic host pool Auto-scaling

Note

The feature is in Public Preview.

Enable host pool Auto-scaling

The auto-scale feature ensures that only the number of session host VMs required to serve the current demand are running. When not in use, VMs are stopped or deleted. When demand rises, or at specific times of the day, additional VMs in the host pool are started or created. This allows for cost savings.

You can enable and configure the auto-scaling feature for dynamic host pools.

Note

By default, the Auto-scale option is disabled. When you enable auto-scaling, you can configure the desktop image, vCPU, RAM, and resource group template, and also set the criteria for host pool sizing, scaling logic, and pre-stage hosts.

Note

Auto-Scale Analytics provides an overview of the provisioned capacity of your host pool, overlaid with session usage, to help you identify the optimal provisioning requirements for your users. The Host Session Density field within it specifies the optimal user sessions per host. This number is automatically populated based on the maximum observed users per host; you can edit it to match your users' contention and performance requirements.

To enable Azure Local host pool auto-scaling:
  1. Locate the dynamic Azure Local host pool you wish to work with on the Hybrid Host Pools tab.

  2. From the action menu, select Enable auto-scale.

  3. Enter the following basic auto-scale information:

    UI Element

    Type

    Description

    Auto-scale timezone

    Drop-down list

    Select the time zone for the auto-scale process. The task always runs at the scheduled start time in the selected geography, regardless of the UTC offset shown; the timezone may appear inaccurate due to regional daylight saving time (DST).

    Name

    Text field / drop-down list

    Type the name of the newly added hosts, and from the drop-down list, select whether to use an Exact name, a Prefix, or a Pattern:

    • Exact applies when adding a single host and specifying an exact name. For example, MYADVHOST.

    • 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. For example: AVDHOST{###} (AVDHOST000..AVDHOST999), or AVDHOST-{???} (AVDHOST-d83, AVDHOST-7sl, etc.).

    Azure local network

    Drop-down list

    Select the Azure Local logical network that the session host VMs will be connected to.

    Desktop image (template)

    Drop-down list

    Select the desktop image used to provision session host VMs. Images must be replicated from Azure to your Azure Local location using Azure Compute Gallery before they can be used. Configure replication on the Desktop Images page.

    Use the "staged" image version

    Toggle

    When enabled, uses the staged (pre-production) version of the selected desktop image instead of the published version. Use this to validate a new image on a subset of hosts before promoting it to production. Only available for desktop images with Geographic distribution & Azure compute gallery enabled.

    VCPUs (template)

    Drop-down list

    Select the total number of virtual CPUs assigned to each session host VM.

    RAM (GB) (template)

    Drop-down list

    Select the amount of memory allocated to each session host VM, in gigabytes.

    RAM type

    Radio buttons

    Select Static or Dynamic for the new session hosts.

    Resource group (VMs)

    Drop-down list

    Select the Azure resource group where Arc-enabled machine resources for these session hosts will be registered.

    VM naming

    Drop-down list

    Select the VM naming mode to use. Host VMs that are created automatically by the scale out or auto-grow process use names based on the selected mode. See How Session Host VM Names are Generated for more information.

    • Reuse: Always attempt to re-use names that were previously used in the pool, if available.

    • Standard names: Use the next available name.

    • Unique names: Always attempt to use a unique name for new hosts.

    Automatically re-image used hosts

    Drop-down list

    Select when hosts that have had at least one user log into them should be automatically re-imaged: Disabled, Always, or During scale-in restrictions only. For multi-session hosts, the host is re-imaged once the last user logs off. Hosts with active sessions are deactivated if the Spare (available) desktops trigger is selected.

    Note

    Changes to the template apply to newly created or re-imaged host VMs.

  4. Select the Default Schedule or Alternative Schedule tab.

    Note

    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, or more session hosts available two weeks prior to Christmas when you have a large number of temporary customer support agents.

    Everything from Auto-scale profile through Auto-Heal Broken Hosts below is configured independently for each tab. Use the Alternative Schedule tab to configure a separate copy of those settings for the periods when it's active.

    On the Alternative Schedule tab only, also configure the following before the settings described below:

    Note

    The Estimated Monthly Costs shown at the top of this page only consider the Default Schedule's settings.

    UI Element

    Type

    Description

    Schedule

    Toggle

    Toggle this option on to turn on the Alternative Schedule process.

    Days

    Drop-down list (multi-select)

    Select the off-peak day(s).

    Dates

    Date picker

    Select the specific off-peak date(s). Select + or - to add or remove off-peak dates.

  5. Enter the following information:

    UI Element

    Type

    Description

    Auto-scale profile

    Drop-down list

    Select a shared auto-scale profile to use, or select Custom to create a custom auto-scale configuration. See Manage Auto-scale Profiles for details about creating and working with auto-scale profiles.

  6. Enter the following Host Pool Properties information:

    Note

    These properties override the values set in the host pool properties modal window in the AVD section.

    UI Element

    Type

    Description

    Session limit per host

    Text field

    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

    Drop-down list

    • Breadth first LB algorithm spreads users evenly across available session hosts.

    • Depth first LB algorithm places users on a single host until the session limit is reached, at which point users start being placed on the next host until the session limit is reached again.

    Start VM on connect

    Checkbox

    Select this option to have Nerdio Manager start a stopped session host VM automatically when a user attempts to connect to it.

  7. Enter the following Host Pool Sizing information:

    Note

    Host pool sizing sets the auto-scale boundaries, defines what's considered an "active" host, and sets the minimum available and maximum possible capacity.

    UI Element

    Type

    Description

    Measure type

    Drop-down list

    Select how the Min active host capacity and Burst beyond base capacity values below are measured: by Count or by Percent.

    Active host defined as

    Drop-down list

    • When set to VM Running, the system identifies a session host VM as active as long as the VM is running in Azure. There are very few instances when this option 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 this option.

    Base host pool capacity

    Text field

    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

    Text field

    Type the minimum number of running session hosts that are always available. When this value is set to 0, the system stops all running hosts during the scale in period; be sure to configure a scale in period other than <any time> and enable Pre-Stage Hosts to turn VMs back on. Typically, a session host must be running for users to sign in, or the "Start on connect" feature must be enabled. Other VMs can be either stopped or turned on, as configured by the scaling logic.

    Burst beyond base capacity

    Text field

    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.

  8. Enter the following Scaling Logic information:

    Note

    Scaling logic defines the logic for growing the size of the host pool (scale out) or shrinking it (scale in).

    UI Element

    Type

    Description

    Auto-scale trigger type

    Drop-down list

    Select the auto-scale trigger for event-based scaling: Average active sessions, Available sessions, or User-driven. See the corresponding tab below for that trigger's specific fields.

    Note

    Azure Local (Hybrid) host pools support only the three triggers listed above. CPU usage and RAM usage triggers, available on Azure Cloud host pools, are not offered for Azure Local host pools.

    Average active sessions

    Available sessions

    User-driven

    Average active sessions

    UI Element

    Type

    Description

    Start or create (scale out) up to

    Text field

    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 exceeds this number.

    Stop or remove (scale in) up to

    Text field

    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 falls below this number.

    Available sessions

    Note

    Available sessions maintains the number of available hosts by scaling out and scaling in within the limits of Host Pool Sizing and the maximum number of sessions per host. The system automatically calculates the available session desktop capacity and tries to maintain up to the number of spare desktops specified below. It is possible for the maximum number of desktop sessions to be constrained by the Host Pool Sizing parameters, which take precedence.

    UI Element

    Type

    Description

    Maximum host pool sessions

    Read-only display

    Displays the maximum number of concurrent sessions the host pool can support, calculated automatically from the host pool's current sizing settings.

    Maintain up to X available sessions

    Drop-down list + text field

    From the drop-down list, select whether to maintain the number of available sessions specified in the adjacent field Always or only During work hours. Selecting During work hours reveals the Outside work hours and Working hours fields below.

    Outside work hours

    Text field

    Displayed only when Maintain up to X available sessions is set to During work hours. Type the number of sessions to maintain outside of work hours. This value cannot exceed the number of desktops available during work hours.

    Working hours

    Drop-down lists (start and end time)

    Displayed only when Maintain up to X available sessions is set to During work hours. Select the start and end times for working hours.

    User-driven

    Note

    In user-driven mode, hosts are started when users connect and are automatically stopped after a defined amount of time after all users log off.

    UI Element

    Type

    Description

    Desktops are stopped after

    Drop-down list

    Select the number of minutes to scale in after all users have signed out. Regular desktops are automatically shut down only if there are no active or disconnected sessions. Hibernation-enabled desktops are placed in hibernation after this time period, but users are not forcibly logged off. To automatically log off disconnected users after a certain time, use the user session limits settings on the host pool properties page.

    Burst hosts when available sessions below

    Text field

    Optionally, type the burst host capacity. When specified, a new host is automatically added, up to this maximum, when the number of available sessions falls below the specified value.

    Enter the following Scale in Restrictions information:

    UI Element

    Type

    Description

    Stop or remove (scale in) hosts only from

    Drop-down list

    Perform the scale in operation at any time or only after the end of business hours. Select <any time> to allow scaling in to be performed at any time.

    Scale in aggressiveness

    Drop-down list

    Auto-scale first looks for hosts without sessions and scales them in. Once only hosts with sessions remain, it scales in hosts with the fewest active sessions first after notifying users and waiting according to the configuration below.

    • High (default): 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. The auto-scale logic first removes hosts with no sessions, then sorts remaining hosts by fewest sessions, consolidates users with active sessions onto a single host, and removes the others. A warning message is sent to active session users before removal.

    • Medium: After business hours, the scaling logic only removes hosts that have disconnected sessions running on them. Hosts with active sessions are not removed, so the host pool is only scaled in to some extent.

    • Low: After business hours, the scaling logic only removes session hosts that have absolutely no sessions running on them. This option is less disruptive for users, but there is no guarantee that the host pool is ever scaled in.

    Deactivate (drain mode) hosts

    Drop-down list

    Displayed only after a specific scale in time window is set in Stop or remove (scale in) hosts only from above (that is, not set to <any time>). Select No to leave this disabled, or select All but a number of hosts to have the auto-scale engine deactivate all hosts at the start of the scale in window except that many. This leaves at least the minimum number of hosts specified in Min active host capacity under Host Pool Sizing.

  9. 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.

    UI Element

    Type

    Description

    Rolling drain mode

    Toggle

    Toggle this option on to enable rolling drain mode.

    Window name

    Text field

    Type the name for this drain window.

    Start time

    Drop-down list

    Select the start time when this drain window comes into effect. The last drain window remains in effect until 11:59 PM.

    % hosts in drain mode

    Text field

    Type the percentage of hosts in drain mode during this window. This setting applies to all hosts in the pool, not the current number of running hosts.

    Load balancing

    Drop-down list

    Optionally, override the host pool's default load balancing setting for this drain window.

    Scale in aggressiveness

    Drop-down list

    Optionally, override the host pool's default scale in aggressiveness setting for this drain window.

    Note

    Use the add/remove icons to add or remove drain windows.

  10. Enter the following Pre-Stage Hosts information:

    Note

    Pre-stage host pool capacity by powering on or creating session hosts before the start of business hours to avoid a "logon storm." 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.

    UI Element

    Type

    Description

    Pre-stage hosts

    Toggle

    Toggle this option on to enable host pre-staging.

    Use multiple schedules

    Checkbox

    Select this option to enable multiple, non-overlapping pre-staging schedules to be used. This is not available for the Available Sessions trigger when the During Work Hours option is specified.

    Work days

    Drop-down list (multi-select)

    Select the work days when pre-stage tasks should be run.

    Start of work hours

    Drop-down list

    Select the starting hour when pre-stage tasks should be run.

    Measure type

    Drop-down list

    Select how to measure the number of hosts to be ready: by Count or by Percent.

    Hosts to be active by start of work hours

    Text field

    Type the number of session hosts that should be ready to accept user connections by this time.

    Scale in delay

    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.

  11. Enter the following Messaging information:

    Note

    During a scale in operation after business hours, the system finds session hosts with no active session or with the smallest number of active sessions. If there are still users connected to a session host selected for scale in, a message is sent to the user, the session host is placed in drain mode to prevent new connections, and it is stopped or removed after a pre-defined delay.

    UI Element

    Type

    Description

    Send a warning message to users on the host

    Drop-down list

    Select the number of minutes before scaling in that the message should be sent.

    Message content

    Text field

    Type the message to send to users before disconnecting them during a scale in operation.

  12. Enter the following Auto-Heal Broken Hosts information:

    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 can detect and attempt to repair "broken" session host VMs that are not being seen by the AVD service as "Available," by restarting, running scripted actions (for example, re-installing the AVD agent), and deleting/recreating them. The auto-heal operations run when all scale out activity is complete and the system is otherwise in steady-state.

    UI Element

    Type

    Description

    Auto-heal broken hosts

    Toggle

    Toggle this option on to enable auto-heal.

    Sign of a broken host

    Multi-select tags + drop-down list

    Select one or more AVD agent status values, and, using the and connector, select the corresponding session status (for example, Has no active sessions) that together define a broken host. 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," though not every non-"Available" status indicates a problem. See this Microsoft article for more details. Hosts with active sessions may still be somewhat functional and are not treated as broken. Only hosts with no sessions at all, or only disconnected sessions, are considered broken by auto-scale.

    Select + to add another sign-of-a-broken-host rule.

    First action timeout

    Text field (minutes)

    Type the number of minutes to wait before running the first recovery action.

    Recovery actions

    Ordered list

    Select the recovery action(s) to run, in order: a VM action (for example, Restart VM or Delete VM (and re-create by auto-scale)), or a scripted action (for example, reinstall SxS, re-register host with AVD, etc.). By default, this list contains Restart VM, Restart VM, and Delete VM (and re-create by auto-scale) — that is, two restart attempts before the host is deleted and recreated. Select the x next to an action to remove it from the list, and drag and drop any action to change its place in the list, and therefore the order it is run.

    Timeout between recovery actions

    Text field (minutes)

    Type the number of minutes to wait after each recovery action before moving on to the next one. 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.

  13. Once you have entered all the desired information, select Save or Save & close.

    Note

    Optionally, select Export auto-scale configuration to export the current configuration.

Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request

Comments (0 comments)

Article is closed for comments.