Skip to content

Commit 6f1b5ac

Browse files
committedNov 3, 2021
few more changes
1 parent 77c6e58 commit 6f1b5ac

File tree

8 files changed

+36
-32
lines changed

8 files changed

+36
-32
lines changed
 

‎articles/devtest-labs/devtest-lab-auto-shutdown.md

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
---
22
title: Manage autoshutdown in Azure DevTest Labs and virtual machines
3-
description: Learn how to set autoshutdown policies for Azure DevTest Labs or for individual virtual machines (VMs) to shut down the VMs at a specific time.
3+
description: Learn how to set autoshutdown policies for Azure DevTest Labs or for individual virtual machines (VMs) to shut down the VMs at a specific time daily.
44
ms.topic: how-to
55
ms.date: 11/01/2021
66
---
77

8-
# Configure autoshutdown for DevTest Labs labs and VMs
8+
# Configure autoshutdown for labs and VMs in DevTest Labs
99

10-
As an Azure DevTest Labs lab owner, you can configure a shutdown schedule for all the virtual machines (VMs) in your lab. You save costs of running machines that aren't being used.
10+
As an Azure DevTest Labs lab owner, you can configure a schedule to shut down all the virtual machines (VMs) in your lab at a specific time of day or night. You save the cost of running machines that aren't being used.
1111

12-
You can also set a central autoshutdown policy on all your lab VMs so lab users don't have to schedule autoshutdown for their individual machines. Autoshutdown policies range from allowing lab users to fully control their VM's shutdown schedules to allowing them no control over shutdown.
12+
You can also set a central autoshutdown policy to control whether lab users can schedule autoshutdown for their own individual VMs. Autoshutdown policies range from allowing VM owners to fully control their VM's shutdown schedules to allowing them no control over the schedules.
1313

14-
This article explains how to configure autoshutdown for DevTest Labs labs and for individual VMs. The article also describes how to set autoshutdown policies, and how to configure autoshutdown notifications.
14+
This article explains how to set autoshutdown schedules for DevTest Labs labs and for individual lab VMs. The article also describes how to set lab autoshutdown policy, and how to configure autoshutdown notifications.
1515

1616
## Configure lab autoshutdown schedule
1717

18-
Autoshutdown helps minimize lab waste by shutting down a lab's VMs at a specific time daily. To view or change a lab's autoshutdown schedule, follow these steps:
18+
Autoshutdown helps minimize lab waste by shutting down all of a lab's VMs at a specific time of day or night. To view or change a lab's autoshutdown schedule, follow these steps:
1919

2020
1. On the home page for your lab, select **Configuration and policies**.
2121
1. In the **Schedules** section of the left menu, select **Auto-shutdown**.
22-
1. Select **On** to enable autoshutdown, or **Off** to disable it.
23-
1. If you turned on autoshutdown, specify the time and time zone to shut down all VMs in the lab.
24-
1. Select **Yes** or **No** for the option to send a notification 30 minutes before the specified autoshutdown time. If you choose **Yes**, enter a webhook URL endpoint or email addresses where you want the notification to post or be sent. For more information and instructions, see the [Autoshutdown notifications](#autoshutdown-notifications) section.
22+
1. On the **Auto-shutdown** screen, for **Enabled**, select **On** to enable autoshutdown, or **Off** to disable it.
23+
1. For **Scheduled shutdown** and **Time zone**, if you turned on autoshutdown, specify the time and time zone to shut down all lab VMs.
24+
1. For **Send notification before auto-shutdown?**, select **Yes** or **No** for the option to send a notification 30 minutes before the specified autoshutdown 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 [Autoshutdown notifications](#autoshutdown-notifications) section.
2525
1. Select **Save**.
2626

27-
![Screenshot that shows setting autoshutdown details for a lab.](media/devtest-lab-auto-shutdown/auto-shutdown.png)
27+
![Screenshot that shows setting autoshutdown details for a lab.](media/devtest-lab-auto-shutdown/auto-shutdown.png)
2828

29-
By default, once enabled, this policy applies to all VMs in the current lab. To remove this setting from a specific VM, open the VM's management pane and change its **Auto-shutdown** setting.
29+
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.
3030

3131
> [!NOTE]
3232
> If you update the autoshutdown schedule for your lab or a VM within 30 minutes of the previously scheduled shutdown time, the new shutdown time takes effect the next day.
@@ -46,59 +46,61 @@ As a lab owner, you can control cost and minimize waste in your labs by managing
4646

4747
![Screenshot that shows autoshutdown policy options.](./media/devtest-lab-auto-shutdown/policy-options.png)
4848

49-
- **User sets a schedule and can opt out**: Lab users can override or opt out of the lab schedule. This option grants lab users full control over their VMs' autoshutdown schedules. Lab users can set their VMs' autoshutdown schedule.
49+
- **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' autoshutdown schedules.
5050

51-
- **User sets a schedule and cannot opt out**: Lab users can override the lab schedule, but they can't opt out of the autoshutdown policy. This option ensures that every lab VM is under an autoshutdown schedule. Lab users can update the schedules, and set up shutdown notifications.
51+
- **User sets a schedule and cannot opt out**: Lab users can override the lab schedule, but they can't opt out of the autoshutdown policy. This option ensures that every lab VM is under an autoshutdown schedule. VM owners can update the schedule time, and set up shutdown notifications.
5252

53-
- **User has no control over the schedule set by lab administrator**: Lab users can't alter or opt out of the lab autoshutdown schedule. This option gives the lab administrator complete control of the schedule for all lab VMs. Lab users can still set up autoshutdown notifications for their VMs.
53+
- **User has no control over the schedule set by lab administrator**: Lab users can't alter or opt out of the lab autoshutdown schedule. This option gives the lab administrator complete control of the schedule for all lab VMs. VM owners can still set up autoshutdown notifications for their VMs.
5454

5555
1. Select **Save**.
5656

5757
## Configure VM autoshutdown settings
5858

59-
Depending on the autoshutdown policy, you can also set an autoshutdown schedule for an individual VM.
59+
Depending on the autoshutdown policy, you can also set an autoshutdown schedule for individual lab VMs.
6060

6161
1. On the home page for the VM, in the **Operations** section on the left menu, select **Auto-shutdown**.
62-
1. On the **Auto-shutdown** page, select **On** to enable autoshutdown, or **Off** to disable it.
63-
1. If you turned on autoshutdown, specify the time and time zone to shut down the VM.
64-
1. Select **Yes** or **No** for the option to send a notification 30 minutes before the specified autoshutdown time. If you choose **Yes**, enter a webhook URL endpoint or email addresses where you want the notification to post or be sent. For more information and instructions, see the [Autoshutdown notifications](#autoshutdown-notifications) section.
62+
1. On the **Auto-shutdown** screen, for **Enabled**, select **On** to enable autoshutdown, or **Off** to disable it.
63+
1. For **Scheduled shutdown** and **Time zone**, if you turned on autoshutdown, specify the time and time zone to shut down all lab VMs.
64+
1. For **Send notification before auto-shutdown?**, select **Yes** or **No** for the option to send a notification 30 minutes before the specified autoshutdown 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 [Autoshutdown notifications](#autoshutdown-notifications) section.
6565
1. Select **Save**.
6666

67-
![Screenshot that shows setting autoshutdown details for a V M.](media/devtest-lab-auto-shutdown/compute-auto-shutdown.png)
67+
![Screenshot that shows setting autoshutdown details for a V M.](media/devtest-lab-auto-shutdown/compute-auto-shutdown.png)
6868

6969
### View activity logs for autoshutdown updates
7070

7171
After you update autoshutdown settings, you can see the activity logged in the activity log for the VM.
7272

7373
1. On the home page for the VM, select **Activity log** from the left menu.
74-
1. Remove the **Resource** filter, apply the appropriate **Resource group** filter, and view the entries for **Add or modify policies** or **Add or modify schedules**.
74+
1. Remove the **Resource** filter, apply the appropriate **Resource group** filter, and view the entries for **Add or modify schedules**.
7575

7676
![Screenshot that shows Add or modify schedules in the Activity log.](media/devtest-lab-auto-shutdown/activity-log-entry.png)
7777

78-
1. Select the **Add or modify schedules** operation to open a summary page showing more details about the operation.
78+
1. Select the **Add or modify schedules** operation to open a summary page that shows more details about the operation.
7979

8080
## Autoshutdown notifications
8181

82-
When you enable notifications in autoshutdown configuration, lab users receive a notification 30 minutes before autoshutdown if any of their VMs will be affected. The notification gives users a chance to save their work before the shutdown. The notification also provides links that allow the following actions for each VM if someone needs to keep working:
82+
When you enable notifications in autoshutdown configuration, lab users receive a notification 30 minutes before autoshutdown if any of their VMs will be affected. 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.
83+
84+
The notification can also provide links that allow the following actions for each VM if someone needs to keep working:
8385

8486
- Skip the autoshutdown this time
8587
- Snooze the autoshutdown for an hour
8688
- Snooze the autoshutdown for 2 hours
8789

88-
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.
90+
You can use webhooks to implement your own way of sending notifications. You set up integrations that subscribe to certain events. When one of those events happens, an HTTP POST payload sends to the webhook's URL.
8991

90-
Webhooks are extensively supported by apps like Azure Logic Apps and Slack. With webhooks, you can implement your own way of sending notifications. You set up integrations that subscribe to certain events. When one of those events happens, DevTest Labs sends an HTTP POST payload to the webhook's URL. For more information about responding to webhooks, see [Azure Functions HTTP triggers and bindings overview](../azure-functions/functions-bindings-http-webhook.md) or [add an HTTP trigger for Azure Logic Apps](../connectors/connectors-native-http.md#add-an-http-trigger).
92+
Apps like [Azure Logic Apps](../logic-apps/logic-apps-overview.md) and Slack have extensive support for webhooks. For more information about responding to webhooks, see [Azure Functions HTTP triggers and bindings overview](../azure-functions/functions-bindings-http-webhook.md) and [Add an HTTP trigger for Azure Logic Apps](../connectors/connectors-native-http.md#add-an-http-trigger).
9193

92-
The following example shows you how to use Logic Apps to configure an autoshutdown notification that sends an email to the VM owner.
94+
The following example shows you how to use Logic Apps to configure an autoshutdown notification that sends an email to VM owners.
9395

9496
### Create a logic app that sends email notifications
9597

96-
[Logic Apps](../logic-apps/logic-apps-overview.md) provides many connectors that make it easy to integrate a service with other clients, like Office 365 and Twitter. At a high level, the steps to set up a Logic App for email notification are:
98+
Logic Apps provides many connectors that make it easy to integrate a service with other clients, like Office 365 and Twitter. At a high level, the steps to set up a Logic App for email notification are:
9799

98100
1. Create a logic app.
99101
1. Configure the built-in template.
100102
1. Integrate with your email client.
101-
1. Get the Webhook URL to use in the autoshutdown notification settings.
103+
1. Get the Webhook URL to use in autoshutdown notification settings.
102104

103105
To get started, create a logic app in Azure with the following steps:
104106

@@ -133,7 +135,9 @@ Next, configure the built-in template.
133135

134136
![Screenshot that shows selecting Use this template.](./media/devtest-lab-auto-shutdown/select-use-this-template.png)
135137

136-
1. Paste the following JSON code into the **Request Body JSON Schema** section:
138+
1. Paste the following JSON code into the **Request Body JSON Schema** section.
139+
140+
![Screenshot that shows the Request Body JSON Schema in the designer.](media/devtest-lab-auto-shutdown/request-json.png)
137141

138142
```json
139143
{
@@ -198,25 +202,25 @@ Next, configure the built-in template.
198202
}
199203
```
200204

201-
![Screenshot that shows the Request Body JSON Schema in the designer.](media/devtest-lab-auto-shutdown/request-json.png)
202-
203205
Now, integrate with your email client.
204206

205207
1. In the designer, select **New step**.
206208

209+
![Screenshot that shows New step in the designer.](media/devtest-lab-auto-shutdown/new-step.png)
210+
207211
1. Enter *Office 365 Outlook - Send an email* in the Search field, and then select **Send an email (V2)** from **Actions**.
208212

209213
![Screenshot that shows the Send an email V2 option.](media/devtest-lab-auto-shutdown/select-send-email.png)
210214

211215
1. In the **Send an email (V2)** form, fill in the **To**, **Subject**, and **Body** fields.
212216

213-
Select **Dynamic content** to automatically populate the notification with values that are used in the app and connectors. For example, for **To**, select **owner**. Populate **Subject** with **vmName** and **labName**. Add **skipUrl** and **delayUrl**s to the message body.
217+
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**s to the message body.
214218

215219
![Screenshot that shows an example notification email.](media/devtest-lab-auto-shutdown/email-options.png)
216220

217221
1. Select **Save** on the toolbar.
218222

219-
Now you can copy the webhook URL. Select the **When a HTTP request is received** step, and then select the copy button next to **HTTP POST URL** to copy the URL to the clipboard. Paste this webhook URL into the autoshutdown notification settings.
223+
Now you can copy the webhook URL. Select the **When a 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 autoshutdown notification settings.
220224

221225
![Screenshot that shows copying the webhook URL.](media/devtest-lab-auto-shutdown/webhook-url.png)
222226

Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.