Skip to content

Commit a9931d6

Browse files
author
Jill Grant
authored
Merge pull request #276659 from dhruvchand/devbox-stop-on-disconnect
set up instructions for stop on disconnect
2 parents 651f33f + 051d0bf commit a9931d6

File tree

4 files changed

+82
-3
lines changed

4 files changed

+82
-3
lines changed

articles/dev-box/how-to-configure-dev-box-hibernation.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ Hibernating dev boxes at the end of the workday can help you save a substantial
2121

2222
With the introduction of Dev Box Hibernation (Preview), you can enable this capability on new dev boxes and hibernate and resume them. This feature provides a convenient way to manage your dev boxes while maintaining your work environment.
2323

24-
There are two steps to enable hibernation:
24+
There are three steps to enable hibernation:
2525

2626
1. Enable hibernation on your dev box image
2727
1. Enable hibernation on your dev box definition
28+
1. Automate hibernation of pools of dev boxes using auto-stop schedules, or stop on RDP disconnect.
2829

2930
> [!IMPORTANT]
3031
> Dev Box Hibernation is currently in PREVIEW.
@@ -184,6 +185,7 @@ az devcenter admin devbox-definition update
184185

185186
## Related content
186187

187-
- [Configure a dev box by using Azure VM Image Builder](how-to-customize-devbox-azure-image-builder.md)
188+
188189
- [How to hibernate your dev box](how-to-hibernate-your-dev-box.md)
190+
- [Configure a dev box by using Azure VM Image Builder](how-to-customize-devbox-azure-image-builder.md)
189191
- [Azure CLI reference for az devcenter admin devbox-definition](/cli/azure/devcenter/admin/devbox-definition?view=azure-cli-latest&preserve-view=true)
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: Stop dev boxes automatically when a user disconnects.
3+
titleSuffix: Microsoft Dev Box
4+
description: Learn how to automatically stop a dev box when a user disconnects by configuring the auto stop setting on the Dev Box Pool.
5+
6+
7+
services: dev-box
8+
ms.service: dev-box
9+
ms.custom: devx-track-azurecli
10+
author: dhruvchand
11+
ms.author: dhruvmu
12+
ms.date: 01/10/2024
13+
ms.topic: how-to
14+
15+
#Customer intent: As a Dev Box administrator, I want to configure dev boxes to stop when a user disconnects so that I can control costs.
16+
---
17+
18+
# Auto-stop your Dev Boxes when users disconnect
19+
20+
21+
To save on costs, you can configure your Dev Box pools to stop when a user disconnects from their RDP session, after a timeout period that you can configure. Microsoft Dev Box attempts to stop all dev boxes after a user disconnects, and they do not re-establish a new RDP session within the configured timeout period.
22+
23+
> [!NOTE]
24+
> Stop on disconnect will only apply to Dev Boxes that are created with hibernation enabled Dev Box definitions. To learn more about enabling hibernation on your Dev Box definitions, see [how to configure dev box hibernation](./how-to-configure-dev-box-hibernation.md).
25+
26+
## Permissions
27+
28+
To manage a dev box schedule, you need the following permissions:
29+
30+
| Action | Permission required |
31+
|---|---|
32+
| _Configure a schedule_ | Owner, Contributor, or DevCenter Project Admin. |
33+
34+
35+
## Manage an auto-stop schedule with the Azure CLI
36+
37+
You can manage stop on disconnect settings on dev box pools by using the Azure CLI.
38+
39+
40+
### Update a pool with stop on disconnect
41+
42+
The following Azure CLI command enables stop on disconnect on a dev box pool:
43+
44+
```azurecli
45+
az devcenter admin pool update --pool-name {poolName} --project {projectName} --resource-group {resourceGroupName} --stop-on-disconnect status="Enabled" grace-period-minutes="180"
46+
```
47+
48+
| Parameter | Value |
49+
|---|---|
50+
| `pool-name` | Name of your dev box pool. |
51+
| `project` | Name of your dev box project. |
52+
| `resource-group` | Name of the resource group for your dev box pool. |
53+
| `grace-period-minutes` | Duration to wait after the user disconnects from an RDP session before stopping the dev box, in minutes|
54+
| `status` | Indicates whether the schedule is in use. The options include `Enabled` or `Disabled`. |
55+
56+
### Disable stop on disconnect
57+
58+
The following Azure CLI command disables stop on disconnect on a dev box pool:
59+
60+
```azurecli
61+
az devcenter admin pool update --pool-name {poolName} --project {projectName} --resource-group {resourceGroupName} --stop-on-disconnect status="Disabled"
62+
```
63+
64+
| Parameter | Value |
65+
|---|---|
66+
| `pool-name` | Name of your dev box pool. |
67+
| `project-name` | Name of your dev box project. |
68+
69+
## Related content
70+
- [How to configure dev box hibernation](./how-to-configure-dev-box-hibernation.md)
71+
- [Manage a dev box definition](./how-to-manage-dev-box-definitions.md)
72+
- [Manage a dev box by using the developer portal](./how-to-create-dev-boxes-developer-portal.md)

articles/dev-box/how-to-configure-stop-schedule.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ ms.topic: how-to
1313

1414
# Auto-stop your Dev Boxes on schedule
1515

16-
To save on costs, you can enable an auto-stop schedule on a dev box pool. Microsoft Dev Box attempts to shut down all dev boxes in the pool at the time specified in the schedule. You can configure one stop time in one timezone for each pool.
16+
To save on costs, you can enable an auto-stop schedule on a dev box pool. Microsoft Dev Box attempts to stop all dev boxes in the pool at the time specified in the schedule. You can configure one stop time in one timezone for each pool.
17+
18+
> [!NOTE]
19+
> Auto-stop schedules hibernate Dev Boxes that were created with a hibernation-enabled Dev Box definition. Dev boxes that were created using Dev Box definitions that do not support hibernation will be shut down. To learn more about enabling hibernation on your Dev Box definitions, see [how to configure dev box hibernation](./how-to-configure-dev-box-hibernation.md)
1720
1821
## Permissions
1922

articles/dev-box/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ items:
9797
href: how-to-hibernate-your-dev-box.md
9898
- name: Configure an auto-stop schedule
9999
href: how-to-configure-stop-schedule.md
100+
- name: Configure stop on disconnect
101+
href: how-to-configure-stop-on-disconnect.md
100102
- name: Skip or delay an automatic shutdown
101103
href: how-to-skip-delay-stop.md
102104
- name: Reference

0 commit comments

Comments
 (0)