Skip to content

Commit 7803737

Browse files
authored
set up instructions for stop on disconnect
1 parent a9648dd commit 7803737

File tree

3 files changed

+75
-3
lines changed

3 files changed

+75
-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: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
title: Set a dev box auto-stop schedule
3+
titleSuffix: Microsoft Dev Box
4+
description: Learn how to configure stop on disconnect to automatically stop dev boxes in a pool when a user .
5+
services: dev-box
6+
ms.service: dev-box
7+
ms.custom: devx-track-azurecli
8+
author: dhruvmu
9+
ms.author: rosemalcolm
10+
ms.date: 01/10/2024
11+
ms.topic: how-to
12+
---
13+
14+
# Auto-stop your Dev Boxes on schedule
15+
16+
To save on costs, you can configure your Dev Box pools to stop when a user disconnects from their RDP session
17+
18+
> [!NOTE]
19+
> 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)
20+
21+
## Permissions
22+
23+
To manage a dev box schedule, you need the following permissions:
24+
25+
| Action | Permission required |
26+
|---|---|
27+
| _Configure a schedule_ | Owner, Contributor, or DevCenter Project Admin. |
28+
29+
30+
## Manage an auto-stop schedule with the Azure CLI
31+
32+
You can manage stop on disconnect settings on dev box pools by using the Azure CLI.
33+
34+
35+
### Update a pool wiith stop on disconnect
36+
37+
The following Azure CLI command enables stop on disconnect on a dev box pool:
38+
39+
```azurecli
40+
az devcenter admin pool update --pool-name {poolName} --project {projectName} --resource-group {resourceGroupName} --stop-on-disconnect status="Enabled" grace-period-minutes="180"
41+
```
42+
43+
| Parameter | Value |
44+
|---|---|
45+
| `pool-name` | Name of your dev box pool. |
46+
| `project` | Name of your dev box project. |
47+
| `resource-group` | Name of the resource group for your dev box pool. |
48+
| `grace-period-minutes` | Duration to wait after the user disconnects from an RDP session before stopping the dev box, in minutes|
49+
| `status` | Indicates whether the schedule is in use. The options include `Enabled` or `Disabled`. |
50+
51+
### Disable stop on disconnect
52+
53+
The following Azure CLI command enabdisablesles stop on disconnect on a dev box pool:
54+
55+
```azurecli
56+
az devcenter admin pool update --pool-name {poolName} --project {projectName} --resource-group {resourceGroupName} --stop-on-disconnect status="Disabled"
57+
```
58+
59+
| Parameter | Value |
60+
|---|---|
61+
| `pool-name` | Name of your dev box pool. |
62+
| `project-name` | Name of your dev box project. |
63+
64+
## Related content
65+
- [How to configure dev box hibernation](./how-to-configure-dev-box-hibernation.md)
66+
- [Manage a dev box definition](./how-to-manage-dev-box-definitions.md)
67+
- [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

0 commit comments

Comments
 (0)