Auto-scale Settings for Host Pools

Auto-scale Settings for Host Pools

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:

  1. At the Account level, navigate to AVDHost Pools.

    Note: Alternatively, when creating a host pool, you are presented with an option to configure auto-scaling.

  2. Locate the host pool you wish to work with.

  3. From the action menu, select Auto-scaleConfigure.

Host Pool Settings

Enter the following basic auto-scale information:

  • Auto-Scale: Toggle this option On.

  • Name Prefix: Type the name prefix to be used when creating multiple session hosts.

    Note: The name prefix limit is 10 valid, Windows computer name characters. When using a prefix, the system automatically appends “-xxxx” (with four random characters) to the name prefix to make a unique name.

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

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

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:

  • 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:

    • Maximum sessions per host: Type the maximum sessions per host.

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

    • Load Balancing: From the drop-down list, select the desired load balancing.

      Note:

      Breadth First means that the load-balancing algorithm spreads the users evenly across all available session hosts.

      Depth First means the load-balancing algorithm places all the users in the first session host until the host's session limit is reached. Only then, does it place the users in the next session host. If necessary, it powers on the VM and makes it available to the users.

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

    • 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 above for details.)

  • 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: Drop 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.

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.

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.

  • Set all hosts to running OS disk type: When selected, all stopped host VM OS disks are converted to running disk type specified above in the template section.

    Note: This is necessary to ensure that if a VM is started via Azure Start VM on Connect that it has the correct, high-performance disk type.

  • Time Zone: From the drop-down list, select the time zone when pre-stage times should be scheduled.

  • 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:

  1. At the Account level, navigate to AVDHost Pools.

  2. Locate the host pool you wish to work with.

  3. Locate the host you wish to work with.

  4. From the action menu, select HostsExclude from auto-scale.

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

  6. Once you have entered your selections, select Confirm.

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:

  1. At the Account level, navigate to AVDHost Pools.

  2. Locate the host pool you wish to work with.

  3. From the action menu, select Auto-scaleHistory.

  4. Select the desired Time Range and Graphs to include in the report.

  5. Once you have made your selections, at the bottom, select Print.

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.