You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-desktop/autoscale-create-assign-scaling-plan.md
+8-87Lines changed: 8 additions & 87 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,15 +65,15 @@ To use a dynamic scaling plan, make sure you follow these guidelines:
65
65
::: zone pivot="power-management"
66
66
## Assign the Desktop Virtualization Power On Off Contributor role with the Azure portal
67
67
68
-
Before creating your first scaling plan, you'll need to assign the *Desktop Virtualization Power On Off Contributor* RBAC role to the Azure Virtual Desktop service principal with your Azure subscription as the assignable scope. Assigning this role at any level lower than your subscription, such as the resource group, host pool, or VM, will prevent autoscale from working properly. You'll need to add each Azure subscription as an assignable scope that contains host pools and session host VMs you want to use with autoscale. This role and assignment will allow Azure Virtual Desktop to manage the power state of any VMs in those subscriptions. It will also let the service apply actions on both host pools and VMs when there are no active user sessions.
68
+
Before creating your first scaling plan, you'll need to assign the *Desktop Virtualization Power On Off Contributor* RBAC role to the Azure Virtual Desktop service principal with your Azure subscription as the assignable scope. Assigning this role at any level lower than your subscription, such as the resource group, host pool, or VM, will prevent autoscale from working properly. You'll need to add each Azure subscription as an assignable scope that contains host pools and session host VMs you want to use with autoscale. This role and assignment allows Azure Virtual Desktop to manage the power state of any VMs in those subscriptions. It also lets the service apply actions on both host pools and VMs when there are no active user sessions.
69
69
70
70
To learn how to assign the *Desktop Virtualization Power On Off Contributor* role to the Azure Virtual Desktop service principal, see [Assign Azure RBAC roles or Microsoft Entra roles to the Azure Virtual Desktop service principals](service-principal-assign-roles.md).
71
71
::: zone-end
72
72
73
73
::: zone pivot="dynamic"
74
74
## Assign the Desktop Virtualization Power On Off Contributor and Desktop Virtualization Virtual Machine Contributor roles with the Azure portal
75
75
76
-
Before creating your first scaling plan, you'll need to assign the *Desktop Virtualization Power On Off Contributor* and *Desktop Virtualization Virtual Machine Contributor* RBAC roles to the Azure Virtual Desktop service principal with your Azure subscription as the assignable scope. Assigning these roles at any level lower than your subscription, such as the resource group, host pool, or VM, will prevent autoscale from working properly. You'll need to add each Azure subscription as an assignable scope that contains host pools and session host VMs you want to use with autoscale. These roles and assignments will allow Azure Virtual Desktop to manage the power state of any VMs and to create, delete, update, start, and stop any VMs in those subscriptions. They'll also let the service apply actions on both host pools and VMs when there are no active user sessions.
76
+
Before creating your first scaling plan, you'll need to assign the *Desktop Virtualization Power On Off Contributor* and *Desktop Virtualization Virtual Machine Contributor* RBAC roles to the Azure Virtual Desktop service principal with your Azure subscription as the assignable scope. Assigning these roles at any level lower than your subscription, such as the resource group, host pool, or VM, will prevent autoscale from working properly. You'll need to add each Azure subscription as an assignable scope that contains host pools and session host VMs you want to use with autoscale. These roles and assignments allow Azure Virtual Desktop to manage the power state of any VMs and to create, delete, update, start, and stop any VMs in those subscriptions. They also let the service apply actions on both host pools and VMs when there are no active user sessions.
77
77
78
78
To learn how to assign the *Desktop Virtualization Power On Off Contributor* role to the Azure Virtual Desktop service principal, see [Assign Azure RBAC roles or Microsoft Entra roles to the Azure Virtual Desktop service principals](service-principal-assign-roles.md).
79
79
::: zone-end
@@ -115,7 +115,7 @@ Now that you've assigned the *Desktop Virtualization Power On Off Contributor* r
115
115
116
116
#### Pooled host pools
117
117
118
-
In each phase of the schedule, autoscale only turns off VMs when in doing so the used host pool capacity won't exceed the capacity threshold. The default values you'll see when you try to create a schedule are the suggested values for weekdays, but you can change them as needed.
118
+
In each phase of the schedule, autoscale only turns off VMs when in doing so the used host pool capacity won't exceed the capacity threshold. The default values you see when you try to create a schedule are the suggested values for weekdays, but you can change them as needed.
119
119
120
120
To create or change a schedule:
121
121
@@ -234,7 +234,7 @@ Here's how to create a scaling plan using the Az.DesktopVirtualization PowerShel
2. Create a scaling plan for your pooled or personal host pool(s) using the [New-AzWvdScalingPlan](/powershell/module/az.desktopvirtualization/new-azwvdscalingplan) cmdlet:
237
+
2. Create a scaling plan for your pooled or personal host pools using the [New-AzWvdScalingPlan](/powershell/module/az.desktopvirtualization/new-azwvdscalingplan) cmdlet:
238
238
239
239
```azurepowershell
240
240
$scalingPlanParams = @{
@@ -355,8 +355,6 @@ Here's how to create a scaling plan using the Az.DesktopVirtualization PowerShel
355
355
::: zone-end
356
356
357
357
::: zone pivot="dynamic"
358
-
### [Azure portal](#tab/portal)
359
-
360
358
Now that you've assigned the *Desktop Virtualization Power On Off Contributor* role to the service principal on your subscriptions, you can create a dynamic scaling plan. To create a dynamic scaling plan using the portal:
361
359
362
360
1. Sign in to the [Azure portal](https://portal.azure.com).
@@ -399,7 +397,7 @@ Now that you've assigned the *Desktop Virtualization Power On Off Contributor* r
399
397
400
398
- Define the virtual machine limit:
401
399
402
-
-**Minimum percentage of active hosts (%)**: The percentage of minimum number of running session host VMs based on the minimum host pool size that are always available. For example, if the minimum percentage of active hosts (%) is specified as 10 and the minimum host pool size is specified as 10, autoscale will ensure one session host is always available to take user connections.
400
+
-**Minimum percentage of active hosts (%)**: The percentage of minimum number of running session host VMs based on the minimum host pool size that is always available. For example, if the minimum percentage of active hosts (%) is specified as 10 and the minimum host pool size is specified as 10, autoscale will ensure one session host is always available to take user connections.
403
401
404
402
-**Minimum host pool size**: The number of session host VMs to always be part of the host pool. These session hosts can either be in a running state or a stopped state.
405
403
@@ -450,7 +448,7 @@ Now that you've assigned the *Desktop Virtualization Power On Off Contributor* r
450
448
- Load-balancing algorithm. We recommend choosing **depth-first** to gradually reduce the number of session hosts based on sessions on each VM.
451
449
- Just like peak hours, you can't configure the capacity threshold here. Instead, the value you entered in **Ramp-down** will carry over.
452
450
453
-
1. Select **Next** to take you to the **Host pool assignments** tab. Select the check box next to each host pool you want to include. If you don't want to enable autoscale, unselect all check boxes. You can always return to this setting later and change it. You can only assign the dynamic scaling plan to pooled host pool(s) with session host configuration.
451
+
1. Select **Next** to take you to the **Host pool assignments** tab. Select the check box next to each host pool you want to include. If you don't want to enable autoscale, unselect all check boxes. You can always return to this setting later and change it. You can only assign the dynamic scaling plan to pooled host pools with session host configuration.
454
452
455
453
> [!NOTE]
456
454
> - When you create or update a scaling plan that's already assigned to host pools, its changes will be applied immediately.
@@ -462,85 +460,8 @@ Now that you've assigned the *Desktop Virtualization Power On Off Contributor* r
462
460
463
461
1. Once you're done, go to the **Review + create** tab and select **Create** to create and assign your scaling plan to the host pools you selected.
464
462
465
-
### [Azure PowerShell](#tab/powershell)
466
-
467
-
Here's how to create a dynamic scaling plan using the Az.DesktopVirtualization PowerShell module. The following examples show you how to create a scaling plan and scaling plan schedule. Be sure to change the `<placeholder>` values for your own.
2. Create a scaling plan for your pooled or personal host pool(s) using the [New-AzWvdScalingPlan](/powershell/module/az.desktopvirtualization/new-azwvdscalingplan) cmdlet:
472
-
473
-
```azurepowershell
474
-
$scalingPlanParams = @{
475
-
ResourceGroupName = '<resourceGroup>'
476
-
Name = '<scalingPlanName>'
477
-
Location = '<AzureRegion>'
478
-
Description = '<Scaling plan description>'
479
-
FriendlyName = '<Scaling plan friendly name>'
480
-
HostPoolType = '<Pooled>'
481
-
TimeZone = '<Time zone, such as Pacific Standard Time>'
3. Create a dynamic scaling plan schedule using the [New-AzWvdScalingPlanPooledSchedule](/powershell/module/az.desktopvirtualization/new-azwvdscalingplanpooledschedule) cmdlet. This example creates a pooled scaling plan that runs on Monday through Friday, ramps up at 6:30 AM, starts peak hours at 8:30 AM, ramps down at 4:00 PM, and starts off-peak hours at 10:45 PM.
4. Use [Get-AzWvdScalingPlan](/powershell/module/az.desktopvirtualization/get-azwvdscalingplan) to get the host pool(s) that your scaling plan is assigned to.
You have now created a new dynamic scaling plan, one or more schedules, assigned it to your automated pooled host pool(s), and enabled autoscale.
542
-
543
-
---
463
+
> [!IMPORTANT]
464
+
> When you deploy session hosts in the portal using session host configuration, it currently by default doesn't automatically delete the NIC and/or disk when deleting the VM. Scaling honors the setting therefore NIC and disks for the VMs created manually in the portal won't be automatically deleted. This default setting will be changed so that NIC and disk for the VMs created by the scaling service will be automatically deleted together with the VMs.
Copy file name to clipboardExpand all lines: articles/virtual-desktop/autoscale-faq.yml
+22-2Lines changed: 22 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -156,6 +156,26 @@ sections:
156
156
No. You only need to define the virtual machine limit with the minimum host pool size, the maximum host pool size, and the minimum percentage of active hosts (%). When the actual number of VMs needed isn't larger than the minimum host pool size, autoscale will turn on VMs if the used host pool capacity exceeds your defined capacity threshold. When the actual number of VMs needed is larger than the minimum host pool size, autoscale will turn on the stopped VMs and create additional VMs given the total number of active VMs won’t exceed the maximum host pool size defined in the scaling plan if the used host pool capacity exceeds your defined capacity threshold.
157
157
158
158
- question: |
159
-
test
159
+
Which image version will be used for the VMs created by autoscale?
160
160
answer: |
161
-
test
161
+
Autoscale will create VMs with the latest image version defined in the active session host configuration, if you don’t already have an active session host configuration.
162
+
163
+
- question: |
164
+
How can I configure my scaling plan to only turn on and deallocate session host VMs?
165
+
answer: |
166
+
You can either choose **Power management autoscaling** as the scaling method when you create your scaling plan, or you can set the same value for **Minimum host pool size** and **Maximum host pool size** if you chose **Dynamic autoscaling**.
167
+
168
+
- question: |
169
+
How can I configure my scaling plan to only create and delete session host VMs?
170
+
answer: |
171
+
You can set the **Minimum percentage of active hosts (%)** to 100. Autoscale will only create or delete session host VMs if the Used host pool capacity exceeds or drops below your defined capacity threshold.
172
+
173
+
- question: |
174
+
What happens if the number of session host VMs in the host pool exceeds the maximum host pool size?
175
+
answer: |
176
+
This might happen if the **Maximum host pool size** is configured differently in each phase. Autoscale will delete the active deallocated session host VMs with no sessions to honor the **Maximum host pool size** setting in the current phase, and then continue to delete/deallocate session host VMs based on the schedule and capacity threshold except in the ramp-up phase. No delete/deallocate action will be taken as long as the number of session host VMs in the host pool doesn't exceed the maximum host pool size. This behavior is consistent with the power management autoscaling scaling method, where session host VMs aren't deallocated in the ramp-up phase for pooled host pools.
177
+
178
+
- question: |
179
+
Can I still manually create and delete session host VMs?
180
+
answer: |
181
+
Yes, but when the scaling service deletes a session host VM that you manually created, it will honor the settings you set whether to automatically delete the NIC and/or disk.
0 commit comments