Skip to content

Commit d650a18

Browse files
authored
Merge pull request #189307 from dknappettmsft/avd-peak-offpeak-definition
AVD scaling script - defined peak and off-peak hours
2 parents 94e8385 + 5819b77 commit d650a18

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

articles/virtual-desktop/set-up-scaling-script.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,18 @@ The scaling tool provides a low-cost automation option for customers who want to
1919

2020
You can use the scaling tool to:
2121

22-
- Schedule VMs to start and stop based on Peak and Off-Peak business hours.
22+
- Schedule VMs to start and stop based on peak and off-peak business hours.
2323
- Scale out VMs based on number of sessions per CPU core.
2424
- Scale in VMs during Off-Peak hours, leaving the minimum number of session host VMs running.
2525

2626
The scaling tool uses a combination of an Azure Automation account, a PowerShell runbook, a webhook, and the Azure Logic App to function. When the tool runs, Azure Logic App calls a webhook to start the Azure Automation runbook. The runbook then creates a job.
2727

28+
Peak and off-peak hours are defined as:
29+
30+
| Peak | Off-peak |
31+
|--|--|
32+
| The time when *maximum* user session concurrency is expected to be reached. | The time when *minimum* user session concurrency is expected to be reached. |
33+
2834
During peak usage time, the job checks the current number of sessions and the VM capacity of the current running session host for each host pool. It uses this information to calculate if the running session host VMs can support existing sessions based on the *SessionThresholdPerCPU* parameter defined for the **CreateOrUpdateAzLogicApp.ps1** file. If the session host VMs can't support existing sessions, the job starts additional session host VMs in the host pool.
2935

3036
>[!NOTE]
@@ -63,10 +69,10 @@ Before you start setting up the scaling tool, make sure you have the following t
6369

6470
The machine you use to deploy the tool must have:
6571

66-
- Windows PowerShell 5.1 or later
67-
- The Microsoft Az PowerShell module
72+
- PowerShell 5.1 or later
73+
- The [Azure Az PowerShell module](/powershell/azure/new-azureps-module-az)
6874

69-
If you have everything ready, then let's get started.
75+
If you have everything ready, let's get started.
7076

7177
## Create or update an Azure Automation account
7278

@@ -75,7 +81,7 @@ If you have everything ready, then let's get started.
7581
7682
First, you'll need an Azure Automation account to run the PowerShell runbook. The process this section describes is valid even if you have an existing Azure Automation account that you want to use to set up the PowerShell runbook. Here's how to set it up:
7783

78-
1. Open Windows PowerShell.
84+
1. Open PowerShell.
7985

8086
2. Run the following cmdlet to sign in to your Azure account.
8187

@@ -152,7 +158,7 @@ To create a Run As account in your Azure Automation account:
152158
153159
Finally, you'll need to create the Azure Logic App and set up an execution schedule for your new scaling tool. First, download and import the [Desktop Virtualization PowerShell module](powershell-module.md) to use in your PowerShell session if you haven't already.
154160
155-
1. Open Windows PowerShell.
161+
1. Open PowerShell.
156162
157163
2. Run the following cmdlet to sign in to your Azure account.
158164
@@ -288,15 +294,15 @@ When you report an issue, you'll need to provide the following information to he
288294
289295
If you decided to use Log Analytics, you can view all the log data in a custom log named **WVDTenantScale_CL** under **Custom Logs** in the **Logs** view of your Log Analytics Workspace. We've listed some sample queries you might find helpful.
290296
291-
- To see all logs for a host pool, enter the following query
297+
- To see all logs for a host pool, enter the following query:
292298
293299
```Kusto
294300
WVDTenantScale_CL
295301
| where hostpoolName_s == "<host_pool_name>"
296302
| project TimeStampUTC = TimeGenerated, TimeStampLocal = TimeStamp_s, HostPool = hostpoolName_s, LineNumAndMessage = logmessage_s, AADTenantId = TenantId
297303
```
298304
299-
- To view the total number of currently running session host VMs and active user sessions in your host pool, enter the following query
305+
- To view the total number of currently running session host VMs and active user sessions in your host pool, enter the following query:
300306
301307
```Kusto
302308
WVDTenantScale_CL
@@ -307,7 +313,7 @@ If you decided to use Log Analytics, you can view all the log data in a custom l
307313
| project TimeStampUTC = TimeGenerated, TimeStampLocal = TimeStamp_s, HostPool = hostpoolName_s, LineNumAndMessage = logmessage_s, AADTenantId = TenantId
308314
```
309315
310-
- To view the status of all session host VMs in a host pool, enter the following query
316+
- To view the status of all session host VMs in a host pool, enter the following query:
311317
312318
```Kusto
313319
WVDTenantScale_CL
@@ -316,7 +322,7 @@ If you decided to use Log Analytics, you can view all the log data in a custom l
316322
| project TimeStampUTC = TimeGenerated, TimeStampLocal = TimeStamp_s, HostPool = hostpoolName_s, LineNumAndMessage = logmessage_s, AADTenantId = TenantId
317323
```
318324
319-
- To view any errors and warnings, enter the following query
325+
- To view any errors and warnings, enter the following query:
320326
321327
```Kusto
322328
WVDTenantScale_CL
@@ -326,4 +332,4 @@ If you decided to use Log Analytics, you can view all the log data in a custom l
326332
327333
## Report issues
328334
329-
Issue reports for the scaling tool are currently being handled by Microsoft Support. When you make an issue report, make sure to follow the instructions in [Reporting issues](#reporting-issues). If you have feedback about the tool or want to request new features, open a GitHub issue labeled "4-WVD-scaling-tool" on the [RDS GitHub page](https://github.com/Azure/RDS-Templates/issues?q=is%3Aissue+is%3Aopen+label%3A4-WVD-scaling-tool).
335+
Issue reports for the scaling tool are currently being handled by Microsoft Support. When you make an issue report, make sure to follow the instructions in [Reporting issues](#reporting-issues). If you have feedback about the tool or want to request new features, open a GitHub issue labeled *4-WVD-scaling-tool* on the [RDS GitHub page](https://github.com/Azure/RDS-Templates/issues?q=is%3Aissue+is%3Aopen+label%3A4-WVD-scaling-tool).

0 commit comments

Comments
 (0)