Enable Personal Host Pool Auto-scaling

Nerdio Manager allows you to perform auto-scaling on personal host pools. This enables you to do the following:

  • Personal desktops can be automatically powered on and off based on a schedule. Alternatively, personal desktops can be stopped when there are no active or disconnected sessions.

  • The host OS disk type can be changed to a lower priced storage type when the personal desktop is not running.

  • Auto-healing automatically attempts to repair "broken" session hosts. In addition, it allows scripted actions, such as SxS re-install or AVD host re-register, to be executed against them.

To configure the basic auto-scale information:

  1. Locate the personal host pool you wish to work with.

  2. From the action menu, select Auto-scale > Configure.

  3. Auto-Scale: Toggle this option On.

  4. Enter the following basic auto-scale information:

    • 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 the network the VM connects to.

      Note: The VM that is created on the selected network is created in the Azure region associated with the network.

    • Desktop Image: From the drop-down list, select a desktop image to be used as the golden image for new session hosts.

    • VM Size: 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.

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

    • Resource Group: From the drop-down list, select the resource group where VMs should be created.

    • VM Naming: From the drop-down list, select the VM naming to use.

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

      • Re-use names: 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.

  5. Select the Default schedule or Alternative schedule.

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

    • To create an alternative schedule, navigate to the Alternative schedule tab and enter the following information:

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

      • 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 the specific off-peak date(s).

      • Select + or - to add or remove off-peak dates.

  6. Auto-scale Mode: From the drop-down list, select the desired auto-scale mode.

    Notes:

    • User-driven: The auto-scaling is performed when there are no active or disconnected sessions.
    • Schedule-based: The auto-scaling is performed as per the specified schedule.

  7. Auto-scale profile (Premium only): Optionally, from the drop-down list, select the auto-scale profile to use. Alternatively, select Custom to create a custom auto-scale configuration.

    Note: See Manage Auto-scale Profiles for details about creating and working with auto-scale profiles.

  8. Continue the configuration process with the relevant auto-scale mode:

To enable user-driven personal host pool auto-scaling:

  1. Auto-scale Mode: From the drop-down list, select the User-driven.

  2. Enter the following Host Pool Properties information:

    • Start on connect: Select this option to start the desktop on connect.

  3. Enter the following Desktop Start and Stop information:

    • Desktop Start and Stop: Toggle this option on to enable desktop start and stop.
    • Desktops are stopped when users log off after: From the drop-down list, select the number of minutes or hours to scale in after all users have signed out.

      Notes:

      • Desktops are automatically started when users connect.

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

    • Bypass drain mode for desktops in this pool: Select this option so that desktops do not enter drain mode before shutdown.
  4. Enter the following Pre-stage Host OS Disks information:

    • Pre-stage Host OS Disks: Toggle this option on to enable pre-staging OS disks.

    • From the drop-down lists, select the Days and Times the session host VMs' OS disks should be pre-staged.

    • Leave desktops that are not assigned to a user with STOPPED OS disk type: Select this option so that desktop VMs that are unassigned to a user do not have the OS disk converted from STOPPED to RUNNING.

    • Use intelligent disk pre-staging for users: Select this option to have intelligent disk pre-staging learn user behavior and automatically adjusts the disk pre-stage times.

      Note: This feature requires AVD insights to be enabled and configured for the host pool.

      • Mode: From the drop-down list, select the mode.

        Note:

        • Hybrid Mode: Disks are always be pre-staged based on the defined schedule. The behavior of users whose work patterns are learned, and additional staging activity are scheduled. This function is designed as "learning mode," with the benefits of both the standard pre-stage functionality and learned requirements.

        • Automated Mode: Disks are pre-staged for existing users only according to the learned schedule. New users respect the defined schedule until Intelligent pre-staging has enough data to automate this process. Disks are pre-staged 30 minutes before anticipated user log on events.

  5. Enter the following Auto-Grow information:

    Note: Automatically add desktops to the host pool when the number of unassigned desktops remaining falls below a specified threshold.

    • Auto-Grow: Toggle this option on to enable auto-grow.

    • Add a new host when the number of available (not assigned to a user) falls below: Type the threshold and from the drop-down list, select whether the threshold is a number of desktops or a percentage of total desktops.

  6. Enter the following Auto-Shrink information: 

    Note: The system automatically remove desktops that have not been used in a long time.

    • Auto-Shrink: Toggle this option on to enable auto-shrink.

    • Delete VM if the user hasn't logged in for: Type the number of days to wait before the system automatically deletes the VM.

      Note: User activity on this session host VM is determined based on Nerdio Manager auto-scale history and AVD diagnostics data. Each time the desktop is processed by auto-scale, an Azure tag with date/time the desktop was last used is set. If the desktop hasn't been used for the number of days specified in this setting, the session host VM is shut down and a "pending deletion" tag is set.

    • Desktop will be set to “Pending deletion” state and deleted after: From the drop-down list, select the "Pending deletion" duration.

      Note: The desktop is set to "Pending deletion" state by the auto-scale process by adding a tag to the VM. A task is logged during this process, which can be used for admin notification of a desktop entering the "Pending deletion" state. There also are notification banners in the Nerdio Manager UI indicating that a personal host pool has VMs that are pending deletion. After the "pending deletion" period expires (default: 24 hours), the VM is permanently deleted.

    • Exclude the following groups (or individual users): Enable this option, and then select the group(s) or individual user(s) to exclude from auto-shrink.

      Note: Desktops assigned to users listed here are not automatically removed, even after a prolonged time of inactivity.

    • Exclude unassigned Desktops from Auto-shrink: Select this option to exclude desktops that have not been assigned to a user from the auto-shrink operations.

      Note: Use this setting in combination with Auto-Grow to maintain a buffer of free unassigned desktops.

    • Notify users of scheduled deletion: Select this option to notify the user via email about deletion of their desktop when the inactivity period is exceeded.

      Note: Notifications on the Settings > Nerdio environment page must be enabled for this feature to work.

      • Message Subject: Expand this option to type the subject line of the auto-shrink message.

      • Message Text: Expand this option to open the editor to create a custom auto-shrink message for users.

        Note: The following variables are available for use in the message body:

        • %HOSTPOOL%: Returns the name of the affected host pool.

        • %HOSTNAME%: Returns the specific host name.

        • %HOST_IDLE_DAYS_THRESHOLD%: Returns the configured maximum idle days before auto shrink is started.

        • %SHRINK_TIME_UTC%: Returns the exact time in UTC when the auto-shrink task is set to occur.

        • %SHRINK_DATE%: Returns the exact date when the auto-shrink task is set to occur.

    • Notify an additional email recipient when desktops are scheduled to be deleted: Select this option to notify an additional email recipient when desktops are scheduled to be deleted.

      • Send notification emails to: Type the additional recipient's email address.

      • Send notification emails from: Type the sender's email address.

      • Notifications frequency (Premium only): From the drop-down list, select how frequently the email reminders are sent to the user.

        Note: A final email is always be sent 1 day before the scheduled deletion.

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

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

    • Minutes before first action: Type the number of minutes to wait before running the first action.

    • Recovery actions: From the drop-down list, select the recovery action(s).

      Notes:

      • You may select a VM action (for example, Restart VM or Remove VM), or a scripted action (for example, reinstall SxS, re-register host with AVD, etc.).

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

    • Minutes between recovery actions: Type the number of minutes to wait after each recovery action step before moving on to next step (for example, Restart VM, then Remove VM, then etc.).

      Note: 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.

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

To enable schedule-based personal host pool auto-scaling:

  1. Auto-scale Mode: From the drop-down list, select the Schedule-based.

  2. Enter the following Host Pool Properties information:

    • Start on connect: Select this option to start the desktop on connect.

  3. Enter the following Working Hours information:

    • From the drop-down lists, select the Days and Times the session host VMs' OS disks should be pre-staged.

    • Power off aggressiveness: From the drop-down list, select the power off aggressiveness. (Schedule-based only)

      Note:

      • High: Power off all session host VMs, including those with active and disconnected sessions. Users with active sessions are sent a message, defined below, and given time to sign out before their session host VM is powered off.
      • Medium: Power off only those session host VMs that do not have an active user session, including those with disconnected sessions.

      • Low: Only power off those session host VMs that have no active or disconnected sessions.

    • Power on timing: From the drop-down list, select the power on timing. (Schedule-based only)

      Note:

      • Never: Do not power on session host VMs at the beginning of the working hours defined above. Users must manually power on their session host VMs.

      • Once: All sessions host VMs are only powered on once at the start of the working hours. If a session host VM is powered off after the start of the working hours, it is not automatically powered back on by auto-scale.

      • Continuously: All session host VMs are powered on at the start of the working hours. In addition, for the duration of the working hours, auto-scale automatically powers on any session host VMs that were manually powered off.

    • Power off timing: From the drop-down list, select the power off timing.

      Note:

      • Never: Do not power off session host VMs at the end of the working hours defined above.
      • Once: At the end of the working hours, all session host VMs are powered off, subject to the aggressiveness defined above. If any session host VMs are manually powered on outside of the working hours, auto-scale does not automatically power them off.

      • Continuously: At the end of the working hours, all session host VMs are powered off, subject to the aggressiveness defined above. If any session host VMs are manually powered on outside of the working hours, auto-scale automatically powers them off, subject to the aggressiveness defined above.

    • Include hosts without assigned user: Select this option to also start unassigned desktops during the auto-scale process.

      Note: This may be useful for organizations wishing to perform scheduled tasks against desktops during the working day.

  4. Enter the following Host OS Disks information:

    • Set all hosts to running OS disk type during work hours: Select this option to convert all stopped host VM OS disks to running disk type during the working hours defined above.

      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. When this setting is enabled, all "Disk type differs from policy" warnings are hidden for this pool.

    • Use intelligent disk pre-staging for users: Select this option to have intelligent disk pre-staging learn user behavior and automatically adjusts the disk pre-stage times.

      Note: This feature requires AVD insights to be enabled and configured for the host pool.

      • Mode: From the drop-down list, select the mode.

        Note:

        • Hybrid Mode: Disks are always be pre-staged based on the defined schedule. The behavior of users whose work patterns are learned, and additional staging activity are scheduled. This function is designed as "learning mode," with the benefits of both the standard pre-stage functionality and learned requirements.

        • Automated Mode: Disks are pre-staged for existing users only according to the learned schedule. New users respect the defined schedule until Intelligent pre-staging has enough data to automate this process. Disks are pre-staged 30 minutes before anticipated user log on events.

  5. Enter the following Auto-Grow information:

    Note: Automatically add desktops to the host pool when the number of unassigned desktops remaining falls below a specified threshold.

    • Auto-Grow: Toggle this option on to enable auto-grow.

    • Add a new host when the number of available (not assigned to a user) falls below: Type the threshold and from the drop-down list, select whether the threshold is a number of desktops or a percentage of total desktops.

  6. Enter the following Auto-Shrink information: 

    Note: The system automatically remove desktops that have not been used in a long time.

    • Auto-Shrink: Toggle this option on to enable auto-shrink.

    • Delete VM if the user hasn't logged in for: Type the number of days to wait before the system automatically deletes the VM.

      Note: User activity on this session host VM is determined based on Nerdio Manager auto-scale history and AVD diagnostics data. Each time the desktop is processed by auto-scale, an Azure tag with date/time the desktop was last used is set. If the desktop hasn't been used for the number of days specified in this setting, the session host VM is shut down and a "pending deletion" tag is set.

    • Desktop will be set to “Pending deletion” state and deleted after: From the drop-down list, select the "Pending deletion" duration.

      Note: The desktop is set to "Pending deletion" state by the auto-scale process by adding a tag to the VM. A task is logged during this process, which can be used for admin notification of a desktop entering the "Pending deletion" state. There also are notification banners in the Nerdio Manager UI indicating that a personal host pool has VMs that are pending deletion. After the "pending deletion" period expires (default: 24 hours), the VM is permanently deleted.

    • Exclude the following groups (or individual users): Enable this option, and then select the group(s) or individual user(s) to exclude from auto-shrink.

      Note: Desktops assigned to users listed here are not automatically removed, even after a prolonged time of inactivity.

    • Notify user when their desktop is about to be deleted: Select this option to notify the user via email about deletion of their desktop when the inactivity period is exceeded.

      Note: Notifications on the Settings > Nerdio environment page must be enabled for this feature to work.

      • Message Subject: Expand this option to type the subject line of the auto-shrink message.

      • Message Text: Expand this option to open the editor to create a custom auto-shrink message for users.

        Note: The following variables are available for use in the message body:

        • %HOSTPOOL%: Returns the name of the affected host pool.

        • %HOSTNAME%: Returns the specific host name.

        • %HOST_IDLE_DAYS_THRESHOLD%: Returns the configured maximum idle days before auto shrink is started.

        • %SHRINK_TIME_UTC%: Returns the exact time in UTC when the auto-shrink task is set to occur.

        • %SHRINK_DATE%: Returns the exact date when the auto-shrink task is set to occur.

    • Notify an additional email recipient when desktops are scheduled to be deleted: Select this option to notify additional users about auto-shrink activity.

      • Send notification emails to: Type the additional email addresses.

    • Send notification emails from: From the drop-down list, select the "Send From" email address.

  7. 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 active users: 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.

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

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

    • Minutes before first action: Type the number of minutes to wait before running the first action.

    • Recovery actions: From the drop-down list, select the recovery action(s).

      Notes:

      • You may select a VM action (for example, Restart VM or Remove VM), or a scripted action (for example, reinstall SxS, re-register host with AVD, etc.).

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

    • Minutes between recovery actions: Type the number of minutes to wait after each recovery action step before moving on to next step (for example, Restart VM, then Remove VM, then etc.).

      Note: 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.

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

Related Topics

Create Dynamic Host Pools

Enable Dynamic Host Pool Auto-scaling