Forum Discussion
Oct 19, 2021
Azure Virtual Desktop (AVD) | Scaling plans and Autoscaling
Just notice that I have a new tab under my AVD Portal for Scaling Plan. Before I just explore it, I checked Microsoft DOCs to understand the new feature and see how I can enable it, but ...
- Oct 19, 2021
Please verify documentation here: https://docs.microsoft.com/en-us/azure/virtual-desktop/autoscale-scaling-plan, which came with slight delay. When searching the table of contents for autoscale you will find additional articles how to use diagnostics and FAQ
Ensure your review limitations and ensure you have the custom RBAC role set-up :)!
Patrick_Kunz
May 04, 2022Copper Contributor
Hi,
We're having a problem with the scaling plan feature.
Facts: We test with 2 identical hostpools, the scaling plan prerequisite (RBAC) are set on subscription level. we use the same scaling plan object for both hostpools.
Hostpool1:
w10Multisession Image created with our cloud based imaging service.
- W10Multisession from azure (21H2) Generation1
- FSLogix und VCRedist uninstalled
- Actual windows Updates installed
- Sysprep sysprep.exe /oobe /generalize /shutdown /mode:vm
Hostpool2:
w10Multisession Image manual created in azure.
- W10Multisession from azure (21H2) Generation1
- Sysprep sysprep.exe /oobe /generalize /shutdown /mode:vm
Testing Scenario: All VM's are down / deallocated
Scaling plan for both hostpools disabled
Problem scenario:
-> Enable scaling plan for hostpool 1
-> wait..... -> No host starts up !! -> checking scaling plan log -> Attached scalingplanlog1.json -> all 3 hosts are marked as
ExcludedSessionHostCount !!
Working scenario:
-> Enable scaling plan for hostpool 2
-> wait..... -> after 5 minutes host starts up !! -> checking scaling plan log -> Attached scalingplanlog2.json -> no hosts are marked as "ExcludedSessionHostCount" !!
Does anybody has this effect od knows in which constellations the scaling plan feature is evaluating session hosts as "ExcludedSessionHost" ?
thanks for your help,
Patrick
scalingplanlog1.json
{
"host_Ring": "R0",
"Level": 4,
"ActivityId": "00000000-0000-0000-0000-000000000000",
"time": "2022-05-03T15:20:21.4366865Z",
"resourceId": "/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/P-RG-EDU-TEST-01/PROVIDERS/MICROSOFT.DESKTOPVIRTUALIZATION/SCALINGPLANS/P-SCP-EDU-TEST-02",
"operationName": "ScalingEvaluationSummary",
"category": "Autoscale",
"resultType": "Succeeded",
"level": "Informational",
"correlationId": "8ae9e5b8-c6cb-47ce-943a-923b91c154df",
"properties": {
"Message": "0.00% of session hosts are active (0 of 3 session hosts). This is below the minimum hosts percentage of 20% (1 session hosts). Need to turn on 1 session hosts to meet minimum number of hosts.",
"HostPoolArmPath": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/p-rg-edu-test-01/providers/microsoft.desktopvirtualization/hostpools/p-vhp-edu-test-01",
"ScalingEvaluationStartTime": "5/3/2022 3:19:33 PM",
"TotalSessionHostCount": "3",
"ExcludedSessionHostCount": "3",
"ActiveSessionHostCount": "0",
"SessionCount": "0",
"NonActiveSessionCount": "0",
"CurrentSessionOccupancyPercent": "NaN",
"CurrentActiveSessionHostsPercent": "0",
"Config.ScheduleName": "weekdays_schedule",
"Config.SchedulePhase": "Peak",
"Config.MaxSessionLimitPerSessionHost": "1",
"Config.CapacityThresholdPercent": "60",
"Config.MinActiveSessionHostsPercent": "20",
"DesiredToScaleSessionHostCount": "1",
"EligibleToScaleSessionHostCount": "0",
"ScalingReasonType": "StartVMs_BelowMinimumActiveSessionHosts",
"BeganForceLogoffOnSessionHostCount": "0",
"BeganDeallocateVmCount": "0",
"BeganStartVmCount": "0",
"TurnedOffDrainModeCount": "0",
"TurnedOnDrainModeCount": "0"
}
}
scalingplanlog2.json
{
"host_Ring": "R0",
"Level": 4,
"ActivityId": "00000000-0000-0000-0000-000000000000",
"time": "2022-05-03T14:18:41.0012950Z",
"resourceId": "/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/P-RG-EDU-TEST-01/PROVIDERS/MICROSOFT.DESKTOPVIRTUALIZATION/SCALINGPLANS/P-SCP-EDU-TEST-02",
"operationName": "ScalingEvaluationSummary",
"category": "Autoscale",
"resultType": "Succeeded",
"level": "Informational",
"correlationId": "24ef99f5-650c-4d44-a6ab-1a309f9a1c76",
"properties": {
"Message": "0.00% of session hosts are active (0 of 3 session hosts). This is below the minimum hosts percentage of 20% (1 session hosts). Need to turn on 1 session hosts to meet minimum number of hosts.",
"HostPoolArmPath": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/p-rg-edu-test-01/providers/microsoft.desktopvirtualization/hostpools/p-vhp-edu-test-01",
"ScalingEvaluationStartTime": "5/3/2022 2:17:52 PM",
"TotalSessionHostCount": "3",
"ExcludedSessionHostCount": "0",
"ActiveSessionHostCount": "0",
"SessionCount": "0",
"NonActiveSessionCount": "0",
"CurrentSessionOccupancyPercent": "NaN",
"CurrentActiveSessionHostsPercent": "0",
"Config.ScheduleName": "weekdays_schedule",
"Config.SchedulePhase": "Peak",
"Config.MaxSessionLimitPerSessionHost": "1",
"Config.CapacityThresholdPercent": "60",
"Config.MinActiveSessionHostsPercent": "20",
"DesiredToScaleSessionHostCount": "1",
"EligibleToScaleSessionHostCount": "1",
"ScalingReasonType": "StartVMs_BelowMinimumActiveSessionHosts",
"BeganForceLogoffOnSessionHostCount": "0",
"BeganDeallocateVmCount": "0",
"BeganStartVmCount": "1",
"TurnedOffDrainModeCount": "0",
"TurnedOnDrainModeCount": "0"
}
}
We're having a problem with the scaling plan feature.
Facts: We test with 2 identical hostpools, the scaling plan prerequisite (RBAC) are set on subscription level. we use the same scaling plan object for both hostpools.
Hostpool1:
w10Multisession Image created with our cloud based imaging service.
- W10Multisession from azure (21H2) Generation1
- FSLogix und VCRedist uninstalled
- Actual windows Updates installed
- Sysprep sysprep.exe /oobe /generalize /shutdown /mode:vm
Hostpool2:
w10Multisession Image manual created in azure.
- W10Multisession from azure (21H2) Generation1
- Sysprep sysprep.exe /oobe /generalize /shutdown /mode:vm
Testing Scenario: All VM's are down / deallocated
Scaling plan for both hostpools disabled
Problem scenario:
-> Enable scaling plan for hostpool 1
-> wait..... -> No host starts up !! -> checking scaling plan log -> Attached scalingplanlog1.json -> all 3 hosts are marked as
ExcludedSessionHostCount !!
Working scenario:
-> Enable scaling plan for hostpool 2
-> wait..... -> after 5 minutes host starts up !! -> checking scaling plan log -> Attached scalingplanlog2.json -> no hosts are marked as "ExcludedSessionHostCount" !!
Does anybody has this effect od knows in which constellations the scaling plan feature is evaluating session hosts as "ExcludedSessionHost" ?
thanks for your help,
Patrick
scalingplanlog1.json
{
"host_Ring": "R0",
"Level": 4,
"ActivityId": "00000000-0000-0000-0000-000000000000",
"time": "2022-05-03T15:20:21.4366865Z",
"resourceId": "/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/P-RG-EDU-TEST-01/PROVIDERS/MICROSOFT.DESKTOPVIRTUALIZATION/SCALINGPLANS/P-SCP-EDU-TEST-02",
"operationName": "ScalingEvaluationSummary",
"category": "Autoscale",
"resultType": "Succeeded",
"level": "Informational",
"correlationId": "8ae9e5b8-c6cb-47ce-943a-923b91c154df",
"properties": {
"Message": "0.00% of session hosts are active (0 of 3 session hosts). This is below the minimum hosts percentage of 20% (1 session hosts). Need to turn on 1 session hosts to meet minimum number of hosts.",
"HostPoolArmPath": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/p-rg-edu-test-01/providers/microsoft.desktopvirtualization/hostpools/p-vhp-edu-test-01",
"ScalingEvaluationStartTime": "5/3/2022 3:19:33 PM",
"TotalSessionHostCount": "3",
"ExcludedSessionHostCount": "3",
"ActiveSessionHostCount": "0",
"SessionCount": "0",
"NonActiveSessionCount": "0",
"CurrentSessionOccupancyPercent": "NaN",
"CurrentActiveSessionHostsPercent": "0",
"Config.ScheduleName": "weekdays_schedule",
"Config.SchedulePhase": "Peak",
"Config.MaxSessionLimitPerSessionHost": "1",
"Config.CapacityThresholdPercent": "60",
"Config.MinActiveSessionHostsPercent": "20",
"DesiredToScaleSessionHostCount": "1",
"EligibleToScaleSessionHostCount": "0",
"ScalingReasonType": "StartVMs_BelowMinimumActiveSessionHosts",
"BeganForceLogoffOnSessionHostCount": "0",
"BeganDeallocateVmCount": "0",
"BeganStartVmCount": "0",
"TurnedOffDrainModeCount": "0",
"TurnedOnDrainModeCount": "0"
}
}
scalingplanlog2.json
{
"host_Ring": "R0",
"Level": 4,
"ActivityId": "00000000-0000-0000-0000-000000000000",
"time": "2022-05-03T14:18:41.0012950Z",
"resourceId": "/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/P-RG-EDU-TEST-01/PROVIDERS/MICROSOFT.DESKTOPVIRTUALIZATION/SCALINGPLANS/P-SCP-EDU-TEST-02",
"operationName": "ScalingEvaluationSummary",
"category": "Autoscale",
"resultType": "Succeeded",
"level": "Informational",
"correlationId": "24ef99f5-650c-4d44-a6ab-1a309f9a1c76",
"properties": {
"Message": "0.00% of session hosts are active (0 of 3 session hosts). This is below the minimum hosts percentage of 20% (1 session hosts). Need to turn on 1 session hosts to meet minimum number of hosts.",
"HostPoolArmPath": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/p-rg-edu-test-01/providers/microsoft.desktopvirtualization/hostpools/p-vhp-edu-test-01",
"ScalingEvaluationStartTime": "5/3/2022 2:17:52 PM",
"TotalSessionHostCount": "3",
"ExcludedSessionHostCount": "0",
"ActiveSessionHostCount": "0",
"SessionCount": "0",
"NonActiveSessionCount": "0",
"CurrentSessionOccupancyPercent": "NaN",
"CurrentActiveSessionHostsPercent": "0",
"Config.ScheduleName": "weekdays_schedule",
"Config.SchedulePhase": "Peak",
"Config.MaxSessionLimitPerSessionHost": "1",
"Config.CapacityThresholdPercent": "60",
"Config.MinActiveSessionHostsPercent": "20",
"DesiredToScaleSessionHostCount": "1",
"EligibleToScaleSessionHostCount": "1",
"ScalingReasonType": "StartVMs_BelowMinimumActiveSessionHosts",
"BeganForceLogoffOnSessionHostCount": "0",
"BeganDeallocateVmCount": "0",
"BeganStartVmCount": "1",
"TurnedOffDrainModeCount": "0",
"TurnedOnDrainModeCount": "0"
}
}
Seneca_Friend
Microsoft
May 04, 2022Hi Patrick_Kunz, session hosts marked as ExcludedSessionHosts are those that have the exclusion tag applied to them. Do the session hosts in host pool 1 have any tags on them? Does the scaling plan (P-SCP-EDU-TEST-02) have exclusion tags specified?
- Patrick_KunzMay 05, 2022Copper ContributorHi Seneca_Friend, Thanks for your answer. The Session Hosts (Hostpool1 & 2) have one Tag: "Owner", but the scaling plan has no tag definied. We left that field empty. Also Drain mode on all Hosts is off. Any further ideas? thanks a lot, patrick