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
+30-16Lines changed: 30 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to set auto shutdown schedules and policies for Azure Dev
4
4
ms.topic: how-to
5
5
ms.author: rosemalcolm
6
6
author: RoseHJM
7
-
ms.date: 11/01/2021
7
+
ms.date: 12/18/2021
8
8
---
9
9
10
10
# Configure auto shutdown for labs and VMs in DevTest Labs
@@ -23,10 +23,12 @@ Auto shutdown helps minimize lab waste by shutting down all of a lab's VMs at a
23
23
1. In the **Schedules** section of the left menu, select **Auto-shutdown**.
24
24
1. On the **Auto-shutdown** screen, for **Enabled**, select **On** to enable auto shutdown, or **Off** to disable it.
25
25
1. For **Scheduled shutdown** and **Time zone**, if you turned on auto shutdown, specify the time and time zone to shut down all lab VMs.
26
-
1. For **Send notification before auto-shutdown?**, select **Yes** or **No** for the option to send a notification 30 minutes before the specified auto shutdown time. If you choose **Yes**, enter a webhook URL endpoint under **Webhook URL** or semicolon-separated email addresses under **Email address** where you want the notification to post or be sent. For more information, see the [auto shutdown notifications](#auto-shutdown-notifications) section.
27
-
1. Select **Save**.
26
+
1. For **Send notification before auto-shutdown?**, select **Yes** or **No** for the option to send a notification 30 minutes before the specified auto shutdown time.
27
+
- If you choose **Yes**, enter a webhook URL endpoint under **Webhook URL** or semicolon-separated email addresses under **Email address** where you want the notification to post or be sent. For more information, see the [auto shutdown notifications](#auto-shutdown-notifications) section.
28
+
29
+
:::image type="content" source="media/devtest-lab-auto-shutdown/auto-shutdown.png" alt-text="Screenshot showing setting auto shutdown details for a lab.":::
28
30
29
-

31
+
1. Select **Save**.
30
32
31
33
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.
32
34
@@ -46,7 +48,7 @@ As a lab owner, you can control cost and minimize waste in your labs by managing
46
48
47
49
1. Select one of the options.
48
50
49
-

51
+
:::image type="content" source="media/devtest-lab-auto-shutdown/policy-options.png" alt-text="Screenshot showing setting auto shutdown policy options.":::
50
52
51
53
-**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 VMs' auto shutdown schedules.
52
54
@@ -66,7 +68,7 @@ Depending on the auto shutdown policy, you can also set an auto shutdown schedul
66
68
1. For **Send notification before auto-shutdown?**, select **Yes** or **No** for the option to send a notification 30 minutes before the specified auto shutdown time. If you choose **Yes**, enter a webhook URL endpoint under **Webhook URL** or an email address under **Email address** where you want the notification to post or be sent. For more information, see the [auto shutdown notifications](#auto-shutdown-notifications) section.
67
69
1. Select **Save**.
68
70
69
-

71
+
:::image type="content" source="media/devtest-lab-auto-shutdown/compute-auto-shutdown.png" alt-text="Screenshot showing setting auto shutdown details for a virtual machine.":::
70
72
71
73
### View activity logs for auto shutdown updates
72
74
@@ -75,7 +77,7 @@ After you update auto shutdown settings, you can see the activity logged in the
75
77
1. On the home page for the VM, select **Activity log** from the left menu.
76
78
1. Remove the **Resource** filter, apply the appropriate **Resource group** filter, and view the entries for **Add or modify schedules**.
77
79
78
-

80
+
:::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.":::
79
81
80
82
1. Select the **Add or modify schedules** operation to open a summary page that shows more details about the operation.
81
83
@@ -116,8 +118,12 @@ To get started, create a logic app in Azure with the following steps:
116
118
- Select a **Resource Group** or create a new one.
117
119
- Enter a **Logic App name**.
118
120
- Select a **Region** for the logic app.
121
+
- Select a **Plan type** for the logic app.
122
+
- Select a **Windows Plan** for the logic app.
123
+
- Select a **Pricing plan** for the logic app.
124
+
- Enabled **Zone redundancy** if necessary.
119
125
120
-

126
+
:::image type="content" source="media/devtest-lab-auto-shutdown/new-logic-app-page.png" alt-text="Screenshot showing the Create Logic App page.":::
121
127
122
128
1. Select **Review + create**, and when validation passes, select **Create**.
123
129
@@ -131,15 +137,15 @@ Next, configure the built-in template.
131
137
132
138
1. Under **Templates**, select **HTTP Request/Response**.
133
139
134
-

140
+
:::image type="content" source="media/devtest-lab-auto-shutdown/select-http-request-response-option.png" alt-text="Screenshot showing the HTTP Request Response template.":::
135
141
136
142
1. On the **HTTP Request-Response** page, select **Use this template**.
137
143
138
-

144
+
:::image type="content" source="media/devtest-lab-auto-shutdown/select-use-this-template.png" alt-text="Screenshot showing selecting Use this template.":::
139
145
140
146
1. Paste the following JSON code into the **Request Body JSON Schema** section.
141
147
142
-

148
+
:::image type="content" source="media/devtest-lab-auto-shutdown/request-json.png" alt-text="Screenshot showing the Request Body JSON Schema in the designer.":::
143
149
144
150
```json
145
151
{
@@ -208,23 +214,31 @@ Now, integrate with your email client.
208
214
209
215
1. In the designer, select **New step**.
210
216
211
-

217
+
:::image type="content" source="media/devtest-lab-auto-shutdown/new-step.png" alt-text="Screenshot showing New step in the designer.":::
212
218
213
219
1. On the **Choose an operation** page, enter *Office 365 Outlook - Send an email* in the Search field, and then select **Send an email (V2)** from **Actions**.
214
220
215
-

221
+
:::image type="content" source="media/devtest-lab-auto-shutdown/select-send-email.png" alt-text="Screenshot showing the Send an email V2 option.":::
216
222
217
223
1. In the **Send an email (V2)** form, fill in the **To**, **Subject**, and **Body** fields.
218
224
219
225
Select **Add dynamic content** to automatically populate the notification with values that the app and connectors use. For example, for **To**, select **owner**. Populate **Subject** with **vmName** and **labName**. Add content like **skipUrl** and **delayUrl** values to the message body.
220
226
221
-

227
+
:::image type="content" source="media/devtest-lab-auto-shutdown/email-options.png" alt-text="Screenshot showing shows an example notification email.":::
222
228
223
229
1. Select **Save** on the toolbar.
224
230
225
-
Now you can copy the webhook URL. Select the **When an HTTP request is received** step, and then select the copy button to copy the HTTP POST URL to the clipboard. Paste this webhook URL into the auto shutdown notification settings.
231
+
1. Now you can copy the webhook URL.
232
+
233
+
1. Select the **When an HTTP request is received** step, and then select the copy button to copy the HTTP POST URL to the clipboard.
234
+
235
+
:::image type="content" source="media/devtest-lab-auto-shutdown/webhook-url.png" alt-text="Screenshot showing copying the webhook URL.":::
236
+
237
+
1. Paste this webhook URL into the auto shutdown notification settings.
238
+
239
+
:::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.":::
226
240
227
-

0 commit comments