Skip to content

Commit 662e7ec

Browse files
authored
Merge pull request #277099 from dknappettmsft/patch-1
AVD SVMONC freshness pass
2 parents 39a29e7 + 69262bc commit 662e7ec

File tree

2 files changed

+50
-69
lines changed

2 files changed

+50
-69
lines changed

articles/virtual-desktop/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@
440440
href: configure-automatic-updates.md
441441
- name: Start VM on Connect
442442
items:
443-
- name: Set up Start VM on Connect
443+
- name: Configure Start VM on Connect
444444
displayName: svmonc
445445
href: start-virtual-machine-connect.md
446446
- name: Start VM on Connect FAQ
Lines changed: 49 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,50 @@
11
---
2-
title: Set up Start VM on Connect for Azure Virtual Desktop
3-
description: How to set up the Start VM on Connect feature for Azure Virtual Desktop to turn on session host virtual machines only when they're needed.
4-
author: Heidilohr
2+
title: Configure Start VM on Connect for Azure Virtual Desktop
3+
description: Learn how to enable or disable Start VM on Connect for Azure Virtual Desktop to power on session host virtual machines only when they're needed.
54
ms.topic: how-to
6-
ms.date: 04/11/2024
7-
ms.author: helohr
8-
ms.custom: subject-rbac-steps
5+
author: dknappettmsft
6+
ms.author: daknappe
7+
ms.date: 06/04/2024
98
---
10-
# Set up Start VM on Connect
9+
10+
# Configure Start VM on Connect
1111

1212
> [!IMPORTANT]
1313
> Start VM on Connect for Azure Stack HCI with Azure Virtual Desktop is currently in PREVIEW. See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
1414
15+
Start VM on Connect lets you reduce costs by enabling end users to power on the virtual machines (VMs) used as session hosts only when they're needed. You can then power off VMs when they're not needed.
1516

16-
Start VM On Connect lets you reduce costs by enabling end users to turn on their session host virtual machines (VMs) only when they need them. You can then turn off VMs when they're not needed.
17-
18-
You can configure Start VM on Connect for session hosts on Azure and Azure Stack HCI in personal or pooled host pools using the Azure portal or PowerShell. Start VM on Connect is a host pool setting.
17+
For personal host pools, Start VM on Connect only powers on an existing session host VM that is already assigned or can be assigned to a user. For pooled host pools, Start VM on Connect only powers on a session host VM when none are turned on and more VMs are only be turned on when the first VM reaches the session limit.
1918

20-
For personal host pools, Start VM On Connect will only turn on an existing session host VM that has already been assigned or will be assigned to a user. For pooled host pools, Start VM On Connect will only turn on a session host VM when none are turned on and additional VMs will only be turned on when the first VM reaches the session limit.
19+
The time it takes for a user to connect to a remote session on a session host that is powered off (deallocated) increases because the VM needs time to power on again, much like turning on a physical computer. When a user uses Windows App and the Remote Desktop app to connect to Azure Virtual Desktop, they're told a VM is being powered on while they're connecting.
2120

22-
The time it takes for a user to connect to a session host VM that is powered off (deallocated) increases because the VM needs time to turn on again, much like turning on a physical computer. The Remote Desktop client has an indicator that lets the user know the VM is being powered on while they're connecting.
23-
24-
> [!NOTE]
25-
> Azure Virtual Desktop (classic) doesn't support Start VM On Connect.
21+
You can enable Start VM on Connect for session hosts on Azure and Azure Stack HCI in personal or pooled host pools using the Azure portal, Azure PowerShell, or Azure CLI. Start VM on Connect is configured per host pool.
2622

2723
## Prerequisites
2824

29-
To use Start VM on Connect, make sure you follow these guidelines:
25+
Before you can use Start VM on Connect, you need:
3026

31-
- You can only configure Start VM on Connect on existing host pools. You can't enable it at the same time you create a new host pool.
27+
- An existing host pool that's associated with an application group and workspace. You can only configure Start VM on Connect on existing host pools. You can't enable it at the same time you create a new host pool.
3228

33-
- The following Remote Desktop clients support Start VM on Connect:
34-
- The [Windows client](./users/connect-windows.md?toc=/azure/virtual-desktop/toc.json&bc=/azure/virtual-desktop/breadcrumb/toc.json) (version 1.2.2061 or later)
35-
- The [Web client](./users/connect-web.md?toc=/azure/virtual-desktop/toc.json&bc=/azure/virtual-desktop/breadcrumb/toc.json)
36-
- The [macOS client](./users/connect-macos.md?toc=/azure/virtual-desktop/toc.json&bc=/azure/virtual-desktop/breadcrumb/toc.json) (version 10.6.4 or later)
37-
- The [iOS and iPadOS client](./users/connect-ios-ipados.md?toc=/azure/virtual-desktop/toc.json&bc=/azure/virtual-desktop/breadcrumb/toc.json) (version 10.2.5 or later)
38-
- The [Android and Chrome OS client](./users/connect-android-chrome-os.md?toc=/azure/virtual-desktop/toc.json&bc=/azure/virtual-desktop/breadcrumb/toc.json) (version 10.0.10 or later)
39-
- The [Microsoft Store client](./users/connect-microsoft-store.md?toc=/azure/virtual-desktop/toc.json&bc=/azure/virtual-desktop/breadcrumb/toc.json) (version 10.2.2005.0 or later)
40-
- Thin clients listed in [Thin client support](./users/connect-thin-clients.md?toc=/azure/virtual-desktop/toc.json&bc=/azure/virtual-desktop/breadcrumb/toc.json)
41-
42-
- If you want to configure Start VM on Connect using PowerShell, you'll need to have [the Az.DesktopVirtualization PowerShell module](https://www.powershellgallery.com/packages/Az.DesktopVirtualization) (version 2.1.0 or later) installed on the device you use to run the commands.
29+
- The Azure account you use to configure Start VM on Connect must have the [Desktop Virtualization Host Pool Contributor](rbac.md#desktop-virtualization-host-pool-contributor) role-based access control (RBAC) role assigned.
4330

44-
- You must grant Azure Virtual Desktop access to power on session host VMs, check their status, and report diagnostic information. You must have the `Microsoft.Authorization/roleAssignments/write` permission on your subscriptions in order to assign the role-based access control (RBAC) role for the Azure Virtual Desktop service principal on those subscriptions. This is part of **User Access Administrator** and **Owner** built in roles.
31+
- Windows App or the Remote Desktop app installed on a local device with a user account assigned to a desktop or application in the application group you can test with.
4532

46-
- The Azure account you use to configure Start VM on Connect must have the [Desktop Virtualization Host Pool Contributor](rbac.md#desktop-virtualization-host-pool-contributor) role assigned.
33+
- Make sure that the name of the host pool, session hosts in that host pool, and the resource group only have ANSI characters.
4734

48-
- If you enable Start VM on Connect on a host pool, you must make sure that the host pool name, the names of the session hosts in that host pool, and the resource group name don't have non-ANSI characters. If their names contain non-ANSI characters, then Start VM on Connect won't work as expected.
35+
- If you want to use Azure PowerShell or Azure CLI locally, see [Use Azure PowerShell and Azure CLI with Azure Virtual Desktop](cli-powershell.md) to make sure you have the [Az.DesktopVirtualization](/powershell/module/az.desktopvirtualization) PowerShell module or the [desktopvirtualization](/cli/azure/desktopvirtualization) Azure CLI extension installed. Alternatively, use the [Azure Cloud Shell](../cloud-shell/overview.md).
4936

5037
## Assign the Desktop Virtualization Power On Contributor role with the Azure portal
5138

52-
Before you can configure Start VM on Connect, you'll need to assign the *Desktop Virtualization Power On Contributor* role-based access control (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 Start VM on Connect from working properly.
39+
To configure Start VM on Connect, you need to assign the *Desktop Virtualization Power On Contributor* role-based access control (RBAC) role to the Azure Virtual Desktop service principal with your Azure subscription as the assignable scope. If you assign this role at any level lower than a subscription, such as the resource group, host pool, or VM, prevents Start VM on Connect from working properly.
5340

54-
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 Start VM on Connect. This role and assignment will allow Azure Virtual Desktop to power on VMs, check their status, and report diagnostic information in those subscriptions.
41+
You need to add each Azure subscription that contains host pools and session host VMs you want to use with Start VM on Connect as an assignable scope. This role assignment allows Azure Virtual Desktop to power on VMs, check their status, and report diagnostic information for those subscriptions.
5542

5643
To learn how to assign the *Desktop Virtualization Power On Contributor* role to the Azure Virtual Desktop service principal, see [Assign RBAC roles to the Azure Virtual Desktop service principal](service-principal-assign-roles.md).
5744

5845
## Enable or disable Start VM on Connect
5946

60-
Now that you've assigned the *Desktop Virtualization Power On Contributor* role to the service principal on your subscriptions, you can configure Start VM on Connect using the Azure portal or PowerShell.
47+
Once you assign the *Desktop Virtualization Power On Contributor* role to the service principal on relevant subscriptions, you can configure Start VM on Connect using the Azure portal, Azure PowerShell, or Azure CLI.
6148

6249
# [Azure portal](#tab/azure-portal)
6350

@@ -71,7 +58,7 @@ To configure Start VM on Connect using the Azure portal:
7158

7259
1. Select **Properties**.
7360

74-
1. In the configuration section, you'll see **Start VM on connect**. Select **Yes** to enable it, or **No** to disable it.
61+
1. In the configuration section, set **Start VM on connect** to **Yes** to enable it, or **No** to disable it.
7562

7663
2. Select **Save** to apply the settings.
7764

@@ -83,15 +70,15 @@ You need to make sure you have the names of the resource group and host pool you
8370

8471
2. To enable or disable Start VM on Connect, do one of the following steps:
8572

86-
1. To enable Start VM on Connect, run the following command, replacing the value for `-ResourceGroupName` and `-Name` with your values:
73+
- To enable Start VM on Connect, run the following command, replacing the value for `-ResourceGroupName` and `-Name` with your values:
8774

88-
```powershell
89-
Update-AzWvdHostPool -ResourceGroupName <resourcegroupname> -Name <hostpoolname> -StartVMOnConnect:$true
90-
```
75+
```azurepowershell
76+
Update-AzWvdHostPool -ResourceGroupName <resourcegroupname> -Name <hostpoolname> -StartVMOnConnect:$true
77+
```
9178
92-
1. To disable Start VM on Connect, run the following command, replacing the value for `-ResourceGroupName` and `-Name` with your values:
79+
- To disable Start VM on Connect, run the following command, replacing the value for `-ResourceGroupName` and `-Name` with your values:
9380
94-
```powershell
81+
```azurepowershell
9582
Update-AzWvdHostPool -ResourceGroupName <resourcegroupname> -Name <hostpoolname> -StartVMOnConnect:$false
9683
```
9784
@@ -102,43 +89,37 @@ You need to make sure you have the names of the resource group and host pool you
10289
[!INCLUDE [include-cloud-shell-local-cli](includes/include-cloud-shell-local-cli.md)]
10390
10491
2. To enable or disable Start VM on Connect, do one of the following steps:
105-
1. To enable Start VM on Connect, run the following command, replacing the value for `--resource-group` and `--name` with your values:
106-
107-
```azurecli
108-
az desktopvirtualization hostpool update \
109-
--resource-group $resourceGroupName \
110-
--name $hostPoolName \
111-
--start-vm-on-connect true
112-
```
113-
114-
1. To disable Start VM on Connect, run the following command, replacing the value for `--resource-group` and `--name` with your values:
115-
116-
```azurecli
117-
az desktopvirtualization hostpool update \
118-
--resource-group $resourceGroupName \
119-
--name $hostPoolName \
120-
--start-vm-on-connect false
121-
```
122-
12392
124-
---
93+
- To enable Start VM on Connect, run the following command, replacing the value for `--resource-group` and `--name` with your values:
94+
95+
```azurecli
96+
az desktopvirtualization hostpool update \
97+
--resource-group $resourceGroupName \
98+
--name $hostPoolName \
99+
--start-vm-on-connect true
100+
```
125101
102+
- To disable Start VM on Connect, run the following command, replacing the value for `--resource-group` and `--name` with your values:
126103
104+
```azurecli
105+
az desktopvirtualization hostpool update \
106+
--resource-group $resourceGroupName \
107+
--name $hostPoolName \
108+
--start-vm-on-connect false
109+
```
127110
128-
>[!NOTE]
129-
>In pooled host pools, Start VM on Connect will start a VM every five minutes at most. If other users try to sign in during this five-minute period while there aren't any available resources, Start VM on Connect won't start a new VM. Instead, the users trying to sign in will receive an error message that says, "No resources available."
111+
---
130112
131-
## Troubleshooting
113+
> [!NOTE]
114+
> For pooled host pools, Start VM on Connect will start a VM every five minutes at most. If other users try to sign in during this five-minute period and there still aren't any available resources, Start VM on Connect won't start a new VM. Instead, the users trying to sign in will receive an error message that says, **No resources available**. They should wait a few minutes and try to connect again.
132115
133-
If you run into any issues with Start VM On Connect, we recommend you use the Azure Virtual Desktop [diagnostics feature](diagnostics-log-analytics.md) to check for problems. If you receive an error message, make sure to pay close attention to the message content and make a note of the error name for reference. You can also use [Azure Virtual Desktop Insights](insights.md) to get suggestions for how to resolve issues.
116+
## Troubleshooting
134117
135-
If the session host VM doesn't turn on, you'll need to check the health of the VM you tried to turn on as a first step.
118+
If the session host VM doesn't power on, you need to check the health of the VM you tried to power on as a first step. You can also view [Azure Virtual Desktop logs in Log Analytics](diagnostics-log-analytics.md) to check for problems. If you receive an error message, make sure to pay close attention to the message content and make a note of the error name for reference. You can also use [Azure Virtual Desktop Insights](insights.md) to get suggestions for how to resolve issues.
136119
137120
> [!NOTE]
138-
> Connecting to a session host outside of Azure Virtual Desktop that is powered off, such as by using the MSTSC client, won't start the VM.
139-
140-
For other questions, check out the [Start VM on Connect FAQ](start-virtual-machine-connect-faq.md).
121+
> Connecting to a session host outside of the Azure Virtual Desktop service that is powered off, such as by directly connecting to a VM by IP address or name, the VM isn't started.
141122
142-
## Next steps
123+
## Related content
143124
144125
For more information about Start VM on Connect, see our [Start VM on Connect FAQ](start-virtual-machine-connect-faq.md).

0 commit comments

Comments
 (0)