You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/devtest-labs/devtest-lab-auto-shutdown.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,26 +4,26 @@ description: Learn how to set autoshutdown schedules and policies to shut down a
4
4
ms.topic: how-to
5
5
ms.author: rosemalcolm
6
6
author: RoseHJM
7
-
ms.date: 03/05/2025
7
+
ms.date: 03/06/2025
8
8
ms.custom: UpdateFrequency2
9
9
---
10
10
11
11
# Configure autoshutdown for lab VMs in DevTest Labs
12
12
13
-
Autoshutdown in Azure DevTest Labs helps minimize waste by automatically shutting down a lab's VMs at a specific time of day or night. As a lab or virtual machine (VM) owner, you can configure an autoshutdown schedule for all your lab VMs or your own VMs. Lab owners can also set a central autoshutdown policy to control whether lab users can schedule autoshutdown for their own VMs.
13
+
Autoshutdown in Azure DevTest Labs helps minimize waste by automatically shutting down a lab's VMs at a specific time of day or night. As a lab owner, you can configure an autoshutdown schedule for all your lab VMs. A lab owner can also set a central autoshutdown policy to control whether lab users can schedule autoshutdown for their own VMs. If allowed by policy, lab virtual machine (VM) owners can configure autoshutdown schedules for their own VMs.
14
14
15
15
This article explains how to set autoshutdown schedules and policies for labs and lab VMs in the Azure portal. The article also describes how to configure autoshutdown notifications, and how to create a logic app in Azure Logic Apps that automatically sends shutdown notifications.
16
16
17
17
## Prerequisites
18
18
19
19
- To set autoshutdown schedules or autoshutdown policy for a lab, at least **Contributor**-level access to the lab. For more information, see [Create a lab in the Azure portal](devtest-lab-create-lab.md).
20
20
- To set autoshutdown schedules for an individual lab VM if allowed by policy, at least **Contributor**-level permissions on the VM.
21
-
- To create the Logic Apps app to send shutdown notifications, an Outlook 365 email client, and at least **Contributor**-level permissions in the Azure subscription that contains the DevTest Lab instance.
21
+
- To create the Logic Apps app to send shutdown notifications, an Outlook 365 email client, and at least **Contributor**-level permissions in the Azure subscription that contains the DevTest Labs instance.
By default, this schedule applies to all VMs in the lab. To remove this setting from a specific VM if allowed by policy, open the VM's management pane and change its **Auto-shutdown** setting.
26
+
By default, lab autoshutdown is disabled. Once enabled, the autoshutdown schedule applies to all VMs in the lab unless it's changed for individual VMs. To change or remove the schedule for a specific lab VM if allowed by policy, see [Configure VM autoshutdown settings](#configure-vm-autoshutdown-settings).
27
27
28
28
To set your lab's autoshutdown schedule:
29
29
@@ -44,7 +44,7 @@ To set your lab's autoshutdown schedule:
44
44
<aname="configure-lab-auto-shutdown-policy"></a>
45
45
## Configure lab autoshutdown policy
46
46
47
-
As a lab owner, you can control cost and minimize waste in your labs by managing autoshutdown policy settings for your lab. For more information about lab policies, see [Define lab policies in Azure DevTest Labs](devtest-lab-set-lab-policy.md).
47
+
As a lab owner, you can control cost and minimize waste in your labs by managing autoshutdown policy settings. For more information about lab policies, see [Define lab policies in Azure DevTest Labs](devtest-lab-set-lab-policy.md).
48
48
49
49
> [!IMPORTANT]
50
50
> Autoshutdown policy changes apply only to new VMs created in the lab, not to already existing VMs.
@@ -55,19 +55,19 @@ To set autoshutdown policy for your lab:
55
55
1. On the **Configuration and policies** page, select **Auto shutdown policy** from the **Schedules** section of the left menu.
56
56
1. On the **Auto shutdown policy** page, select one of the following options:
57
57
58
-
-**User sets a schedule and can opt out**: Lab users can override or opt out of the lab schedule. This option grants VM owners full control to set their own VMs' autoshutdown schedules.
58
+
-**User sets a schedule and can opt out**: Lab users can override or opt out of the lab schedule. This option grants VM owners full control over their own VMs' autoshutdown behavior.
59
59
60
-
-**User sets a schedule and cannot opt out**: Lab users can change the shutdown schedule for their own VMs, but they can't opt out of the autoshutdown policy. VM owners can update the shutdown time and set up shutdown notifications. This option ensures that every lab VM is under an autoshutdown schedule.
60
+
-**User sets a schedule and cannot opt out**: Lab users can change the shutdown schedule for their own VMs, but they can't opt out of the lab autoshutdown policy. VM owners can update shutdown times and set up shutdown notifications for their own VMs. This option ensures that every lab VM is under an autoshutdown schedule.
61
61
62
-
-**User has no control over the schedule set by lab administrator**: Lab users can't alter or opt out of the lab autoshutdown schedule. VM owners can still set up shutdown notifications for their VMs. This option gives the lab administrator complete control of the schedule for all lab VMs.
62
+
-**User has no control over the schedule set by lab administrator**: Lab users can't alter or opt out of the lab autoshutdown schedule. They can still set up shutdown notifications for their own VMs. This option gives the lab administrator complete control of the schedule for all lab VMs.
If the autoshutdown policy allows, you can also set autoshutdown schedules for individual lab VMs.
70
+
If the autoshutdown policy allows, you can set autoshutdown schedules for individual lab VMs.
71
71
72
72
1. On the Azure portal home page for the VM, select **Auto-shutdown** from the **Operations** section of the left menu.
73
73
1. On the **Auto-shutdown** screen, select **On** for **Enabled** to enable autoshutdown, or **Off** to disable it.
@@ -83,15 +83,15 @@ If the autoshutdown policy allows, you can also set autoshutdown schedules for i
83
83
After you update autoshutdown settings, you can see that activity logged in the activity log for the VM.
84
84
85
85
1. On the Azure portal home page for the VM, select **Activity log** from the left menu.
86
-
1. Apply the appropriate **Resource group** filter, and view the entries for **Add or modify schedules**.
86
+
1. Apply the appropriate filters, and view the entries for **Add or modify schedules**.
87
87
88
88
:::image type="content" source="media/devtest-lab-auto-shutdown/activity-log-entry.png" alt-text="Screenshot showing Add or modify schedules in the Activity log.":::
89
89
90
90
1. Select the **Add or modify schedules** operation to open a summary page that shows more details about the operation.
91
91
92
92
## Configure autoshutdown notifications
93
93
94
-
When you enable autoshutdown notifications, lab users receive a notification 30 minutes before autoshutdown affects their VMs. The notification gives users a chance to save their work before the shutdown. If the autoshutdown settings specify an email address, the notification sends to that email address. If the settings specify a webhook, the notification sends to the webhook URL.
94
+
When you enable autoshutdown notifications, lab users receive a notification 30 minutes before autoshutdown shuts down their VMs. The notification gives users a chance to finish their work before the shutdown. If the autoshutdown settings specify an email address, the notification sends to that email address. If the settings specify a webhook, the notification sends to the webhook URL.
95
95
96
96
The notification can also provide links that allow the following actions for each VM:
97
97
@@ -141,17 +141,17 @@ Follow these steps to create a logic app in Azure.
141
141
142
142
### Configure the built-in template
143
143
144
-
1. On the Azure portal home page for your logic app, select **Create a workflow in Designer** on the **Get started** tab.
144
+
1. On the Azure portal home page for your logic app, select **Create a workflow in Designer** on the **Get started** tab, or select **Workflows** from the left menu.
145
145
1. On the **Workflows** page, select **Add** > **Add from Template**.
146
-
1. On the **Templates** page, search for *request* and then select **Request-Response: Receive and respond to messages over HTTP or HTTPS**.
147
146
148
-
:::image type="content" source="media/devtest-lab-auto-shutdown/select-http-request-response-option.png" alt-text="Screenshot showing the HTTP Request Response template.":::
147
+
:::image type="content" source="media/devtest-lab-auto-shutdown/add-workflow.png" alt-text="Screenshot showing Add from template on the Workflows page.":::
149
148
150
-
1. On the **Request-Response: Receive and respond to messages over HTTP or HTTPS**page, select **Use this template**.
149
+
1. On the **Templates** page, search for *request* and then select **Request-Response: Receive and respond to messages over HTTP or HTTPS**from the results.
151
150
152
-
:::image type="content" source="media/devtest-lab-auto-shutdown/select-use-this-template.png" alt-text="Screenshot showing selecting Use this template.":::
151
+
:::image type="content" source="media/devtest-lab-auto-shutdown/select-http-request-response-option.png" alt-text="Screenshot showing the HTTP Request Response template.":::
153
152
154
-
1. On the **Create a new workflow from template** page, provide a name for the workflow.
153
+
1. On the **Request-Response: Receive and respond to messages over HTTP or HTTPS** page, select **Use this template**.
154
+
1. On the **Create a new workflow from template** screen, provide a name for the workflow.
155
155
1. Select **Stateless** under **State type**, and then select **Next**.
156
156
157
157
:::image type="content" source="media/devtest-lab-auto-shutdown/create-from-template.png" alt-text="Screenshot showing the Create from template screen.":::
@@ -235,19 +235,19 @@ Follow these steps to create a logic app in Azure.
235
235
236
236
:::image type="content" source="media/devtest-lab-auto-shutdown/new-step.png" alt-text="Screenshot showing Add an action in the designer.":::
237
237
238
-
1. On the **Add an action** screen, enter *Office 365 Outlook* in the Search field, and then select **Send an email (V2)**.
238
+
1. On the **Add an action** screen, enter *Office 365 Outlook* in the Search field, and then select **Send an email (V2)** from the results.
239
239
240
240
:::image type="content" source="media/devtest-lab-auto-shutdown/select-send-email.png" alt-text="Screenshot showing the Send an email V2 option.":::
241
241
242
242
1. If prompted, sign in to your Outlook 365 email account.
243
243
244
244
1. In the **Send an email (V2)** form, fill in the **To**, **Subject**, and **Body** fields.
245
245
246
-
You can select the **Add dynamic content** icon next to the fields to automatically populate the notification with values that the app and connectors use. For example, select **owner** for **To**, select **vmName** and **labName** for **Subject**, and add **skipUrl** and **delayUrl** values to the message body.
246
+
You can select the **Add dynamic content** icon next to the fields to automatically populate the notification with values that the app and connectors use. For example, select **owner** for **To**, select **vmName** and **labName** for **Subject**, and add **skipUrl** and **delayUrl** to the message body.
247
247
248
248
:::image type="content" source="media/devtest-lab-auto-shutdown/email-options.png" alt-text="Screenshot showing shows an example notification email.":::
249
249
250
-
1. On the **Designer** page, select **Save** on the top toolbar.
250
+
1. Select **Save** on the **Designer** page.
251
251
252
252
### Get the webhook URL
253
253
@@ -259,10 +259,10 @@ Follow these steps to create a logic app in Azure.
259
259
260
260
1. On the **Auto-shutdown** configuration page for your lab, paste this webhook URL into the **Webhook URL** field in the notification settings, and select **Save**.
261
261
262
-
:::image type="content" source="media/devtest-lab-auto-shutdown/auto-shutdown-settings-webhook.png" alt-text="Screenshot showing pasting the webhook URL into the auto-shutdown settings.":::
262
+
:::image type="content" source="media/devtest-lab-auto-shutdown/auto-shutdown-settings-webhook.png" alt-text="Screenshot showing pasting the webhook URL into the autoshutdown settings.":::
0 commit comments