Skip to content

Commit 6a30cf6

Browse files
committed
policies
1 parent ff1b0f7 commit 6a30cf6

File tree

10 files changed

+68
-89
lines changed

10 files changed

+68
-89
lines changed

articles/devtest-labs/devtest-lab-set-lab-policy.md

Lines changed: 68 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,161 +1,140 @@
11
---
2-
title: Control costs with lab policies
2+
title: Set lab policies
33
description: Learn how to define lab policies such as VM sizes, maximum VMs per user, and shutdown automation.
44
ms.topic: how-to
55
ms.author: rosemalcolm
66
author: RoseHJM
7-
ms.date: 09/30/2023
7+
ms.date: 03/27/2025
88
ms.custom: UpdateFrequency2
99
---
1010

11-
# Manage lab policies to control costs in Azure DevTest Labs
11+
# Manage lab policies in Azure DevTest Labs
1212

13-
This article describes how you can manage Azure DevTest Labs policies to control lab costs and minimize waste. Lab policies you can set to control costs include:
13+
This article describes how Azure DevTest Labs administrators can manage lab policies to control lab costs, minimize waste, and improve managability. Lab policies include:
1414

15+
- Internal support
1516
- Allowed virtual machine (VM) sizes
1617
- Maximum VMs per user
1718
- Maximum VMs per lab
18-
- Auto-shutdown settings
19-
- Auto-shutdown policy settings
20-
- Autostart settings
19+
- Autoshutdown
20+
- Autostart
21+
- Autoshutdown policy
2122

22-
## Access lab Configuration and policies
23+
## Prerequisites
2324

24-
1. In the [Azure portal](https://go.microsoft.com/fwlink/p/?LinkID=525040), on the **Overview** page for your lab, select **Configuration and policies** from the left navigation.
25+
**Contributor** or **Owner** level permissions to the lab.
2526

26-
:::image type="content" source="./media/devtest-lab-set-lab-policy/configuration-policies-menu.png" alt-text="Screenshot that shows the Configuration and policies menu for a lab.":::
27+
## Set lab policies
2728

28-
1. On the **Configuration and policies** page, select the policy you want to configure from the left navigation.
29-
30-
:::image type="content" source="./media/devtest-lab-set-lab-policy/policies-menu.png" alt-text="Screenshot that shows a lab's Configuration and Policies options.":::
29+
To set lab policies, on your lab page in the [Azure portal](https://go.microsoft.com/fwlink/p/?LinkID=525040), select **Configuration and policies** from the left navigation.
3130

32-
## Set allowed virtual machine sizes
31+
:::image type="content" source="./media/devtest-lab-set-lab-policy/configuration-policies-menu.png" alt-text="Screenshot that shows the Configuration and policies menu for a lab.":::
3332

34-
This policy specifies the VM sizes that users can create in the lab.
33+
On the **Configuration and policies** page, select the policy you want to configure from the **Settings** and **Schedules** sections of the left navigation.
3534

36-
1. On the lab's **Configuration and policies** page, select **Allowed virtual machines sizes** from the left navigation.
37-
38-
1. On the **Allowed virtual machines sizes** screen, select **Yes** or **No** to enable or disable the policy.
35+
:::image type="content" source="./media/devtest-lab-set-lab-policy/policies-menu.png" alt-text="Screenshot that shows a lab's Configuration and Policies options.":::
36+
37+
### Allowed virtual machine sizes
3938

40-
1. If you enable the policy, select the VM sizes to allow in the lab.
39+
This policy specifies the VM sizes that users can create in the lab.
4140

41+
1. On the lab's **Configuration and policies** page, select **Allowed virtual machines sizes** from the left navigation.
42+
1. On the **Allowed virtual machines sizes** page, select **All sizes** or **Selected sizes**.
43+
1. If you select **Selected sizes**, select the VM sizes to allow users to create in the lab.
4244
1. Select **Save**.
4345

44-
:::image type="content" source="./media/devtest-lab-set-lab-policy/allowed-vm-sizes.png" alt-text="Screenshot showing Allowed virtual machines sizes.":::
46+
:::image type="content" source="./media/devtest-lab-set-lab-policy/allowed-vm-sizes.png" alt-text="Screenshot showing Allowed VM sizes.":::
4547

46-
## Set virtual machines per user
48+
### Virtual machines per user
4749

48-
This policy specifies the maximum number of VMs that an individual lab user can own.
50+
This policy specifies the maximum number of VMs that an individual lab user can claim or create.
4951

5052
1. On the lab's **Configuration and policies** page, select **Virtual machines per user** from the left navigation.
51-
52-
1. On the **Virtual machines per user** screen, under **Limit the number of virtual machines**, select **On** or **Off** to enable or disable the policy.
53-
54-
1. If you enable the policy, under **What is the limit**, enter the maximum number of VMs that a user can own.
55-
56-
1. Under **Limit the number of virtual machines using premium OS disks**, select **On** or **Off** to enable or disable limiting the number of a user's VMs that use premium solid-state disks (SSDs).
57-
58-
1. If you selected **On**, enter the maximum number of VMs using premium disks that a user can own.
59-
60-
> [!NOTE]
61-
> This policy applies only to Premium SSDs. The limitation doesn't apply to Standard SSDs.
62-
53+
1. On the **Virtual machines per user** page, under **Limit the number of virtual machines**, select **On** or **Off** to enable or disable the policy.
54+
1. If you select **On**, under **What is the limit**, enter the maximum number of VMs that a user can claim or create.
55+
1. Under **Limit the number of virtual machines using premium OS disks**, select **On** or **Off** to enable or disable the policy.
56+
1. If you select **On**, enter the maximum number of VMs using premium solid-state disks (SSDs) that a user can claim or create. This number applies only to Premium SSDs, not Standard SSDs.
6357
1. Select **Save**.
6458

6559
:::image type="content" source="./media/devtest-lab-set-lab-policy/max-vms-per-user.png" alt-text="Screenshot showing Virtual machines per user.":::
6660

67-
If a user tries to create or claim a VM when the user limit has been met, an error message indicates that the user can't exceed their VM limit.
61+
If a user tries to create or claim a VM after the user limit is met, an error message indicates that the user can't exceed their VM limit.
6862

6963
:::image type="content" source="./media/devtest-lab-set-lab-policy/error.png" alt-text="Screenshot showing the error that the user can't exceed their VM limit.":::
7064

71-
## Set virtual machines per lab
65+
### Virtual machines per lab
7266

73-
This policy specifies the maximum number of VMs that all users can create or claim in the current lab.
67+
This policy specifies the maximum number of VMs that all users can create in the current lab.
7468

7569
1. On the lab's **Configuration and policies** page, select **Virtual machines per lab** from the left navigation.
76-
77-
1. On the **Virtual machines per user** screen, under **Limit the number of virtual machines**, select **On** or **Off** to enable or disable the policy.
78-
79-
1. If you enable the policy, under **What is the limit**, enter the maximum number of VMs that can be created or claimed.
80-
81-
1. Under **Limit the number of virtual machines using premium OS disks**, select **On** or **Off** to enable or disable limiting the number of VMs that use premium SSDs.
82-
83-
1. If you selected **On**, enter the maximum number of VMs that can use premium disks.
84-
70+
1. On the **Virtual machines per lab** page, under **Limit the number of virtual machines**, select **On** or **Off** to enable or disable the policy.
71+
1. If you select **On**, under **What is the limit**, enter the maximum number of VMs that can be created in the lab.
72+
1. Under **Limit the number of virtual machines using premium OS disks**, select **On** or **Off** to enable or disable the policy.
73+
1. If you selected **On**, enter the maximum number of VMs in the lab that can use premium SSDs.
8574
1. Select **Save**.
8675

87-
:::image type="content" source="./media/devtest-lab-set-lab-policy/max-vms-per-lab.png" alt-text="Screenshot showing Virtual machines per lab.":::
76+
:::image type="content" source="./media/devtest-lab-set-lab-policy/max-vms-per-lab.png" alt-text="Screenshot showing VMs per lab.":::
8877

89-
If a user tries to create or claim a VM when the lab limit has been met, an error message indicates that the VM can't be created or claimed.
78+
If a user tries to create or claim a VM after the lab limit is met, an error message indicates that the VM can't be created or claimed.
9079

91-
## Set auto-shutdown
80+
<a name="set-auto-shutdown"></a>
81+
### Autoshutdown
9282

93-
Auto-shutdown helps minimize lab waste by shutting down lab VMs at a specific time of day.
83+
Autoshutdown helps minimize lab waste by shutting down lab VMs at a specific time of day.
9484

9585
1. On the lab's **Configuration and policies** page, select **Auto-shutdown** from the left navigation.
96-
97-
1. On the **Auto-shutdown** screen, for **Enabled**, select **On** or **Off** to enable or disable the policy.
98-
99-
1. For **Scheduled shutdown** and **Time zone**, if you enabled auto-shutdown, specify the time and time zone to shut down all lab VMs.
100-
101-
1. For **Send notification before auto-shutdown**, select **Yes** or **No** for the option to send a notification before the specified auto-shutdown time.
102-
103-
If you choose **Yes**, enter a webhook URL endpoint under **Webhook URL** or semicolon-separated email addresses under **Email address** where you want to post or send the notification.
104-
86+
1. On the **Auto-shutdown** page, select **On** or **Off** to enable or disable the policy.
87+
1. If you select **On**, for **Scheduled shutdown** and **Time zone**, specify the time and time zone to shut down all lab VMs.
88+
1. For **Send notification before auto-shutdown**, select **Yes** or **No** for the option to send a notification before the specified autoshutdown time.
89+
1. If you choose **Yes**, enter a webhook URL endpoint under **Webhook URL** or semicolon-separated email addresses under **Email address** to post or send the notification.
10590
1. Select **Save**.
10691

10792
:::image type="content" source="./media/devtest-lab-set-lab-policy/auto-shutdown.png" alt-text="Screenshot showing Auto shutdown.":::
10893

109-
By default, auto-shutdown applies to all lab VMs. If allowed by policy, lab users can override auto-shutdown settings for their individual lab VMs. To access auto-shutdown settings for individual VMs:
94+
By default, autoshutdown applies to all lab VMs. If allowed by [autoshutdown policy](#autoshutdown-policy), lab users can override lab autoshutdown settings for their own lab VMs as follows:
11095

11196
1. Select the VM from **My virtual machines** on the lab **Overview** page.
112-
1. On the home page for the VM, in the **Operations** section of the left navigation, select **Auto-shutdown**.
97+
1. On the home page for the VM, select **Auto-shutdown** from the **Operations** section of the left navigation.
11398

114-
For more information about auto-shutdown and sending notifications, see [Configure auto shutdown for labs and VMs in DevTest Labs](devtest-lab-auto-shutdown.md).
99+
For more information about autoshutdown and sending notifications, see [Configure autoshutdown for labs and VMs in DevTest Labs](devtest-lab-auto-shutdown.md).
115100

116-
## Set auto-shutdown policy
101+
### Autostart
117102

118-
Lab owners can configure auto-shutdown on all lab VMs centrally, and set a policy to let lab users override the settings for their own VMs. You can set auto-shutdown policy to allow lab users full control, partial control, or no control over their own VMs' auto-shutdown activity.
103+
Autostart policy helps you minimize waste by specifying a specific time of day and days of the week to start up lab VMs.
119104

120-
> [!IMPORTANT]
121-
> Auto-shutdown policy changes apply only to new lab VMs, not to already-existing VMs.
122-
123-
1. On the lab's **Configuration and policies** page, select **Auto shutdown policy** from the left navigation.
124-
125-
1. Select one of the following options:
126-
127-
- **User sets a schedule and can opt out**: Lab users can override or opt out of lab auto-shutdown. Lab users can override the lab schedule, and they don't have to set any auto-shutdown for their VMs.
128-
129-
- **User sets a schedule and cannot opt out**: Lab users can override the lab schedule for their VMs, but they can't opt out of auto-shutdown. This option ensures that every VM in the lab is on some auto-shutdown schedule.
130-
131-
- **User has no control over the schedule set by lab administrator**: Lab users can't override or opt out of the lab auto-shutdown schedule. Lab users can set up auto-shutdown notifications for their own VMs.
105+
> [!NOTE]
106+
> This policy isn't automatically applied to lab VMs. To apply this setting to VMs, open the VM's page and change its **Auto-start** setting.
132107
108+
1. On the lab's **Configuration and policies** page, select **Auto-start** from the left navigation.
109+
1. Select **Yes** or **No** to enable or disable the policy.
110+
1. If you select **Yes**, specify the **Scheduled start**, **Time zone**, and **Days of the week** to start up the lab VMs.
133111
1. Select **Save**.
134112

135-
:::image type="content" source="./media/devtest-lab-set-lab-policy/auto-shutdown-policy-options.png" alt-text="Screenshot showing Auto-shutdown policy options.":::
113+
:::image type="content" source="./media/devtest-lab-set-lab-policy/auto-start.png" alt-text="Screenshot showing the Autostart selection.":::
136114

137-
For more information and details about auto-shutdown policy, see [Configure lab auto shutdown policy](devtest-lab-auto-shutdown.md#configure-lab-auto-shutdown-policy).
115+
For more information and details about autostart policy, see [Start up lab virtual machines automatically](devtest-lab-auto-startup-vm.yml).
138116

139-
## Set autostart
117+
### Autoshutdown policy
140118

141-
Autostart policy helps you minimize waste by specifying a specific time of day and days of the week to start up all lab VMs.
119+
If you set autoshutdown for lab VMs, you can also set a policy to let lab users override the lab autoshutdown settings for their own VMs. You can set autoshutdown policy to allow lab users full control, partial control, or no control over their own VMs' autoshutdown activity.
142120

143-
1. On the lab's **Configuration and policies** page, select **Auto-start** from the left navigation.
121+
> [!IMPORTANT]
122+
> Autoshutdown policy changes apply only to new lab VMs, not to already-existing VMs.
144123
145-
1. Select **Yes** or **No** to enable or disable the policy.
124+
1. On the lab's **Configuration and policies** page, select **Auto shutdown policy** from the left navigation.
125+
1. Select one of the following options:
146126

147-
1. If you enable this policy, specify the **Scheduled start**, **Time zone**, and **Days of the week** to start up the lab VMs.
127+
- **User sets a schedule and can opt out**: Lab users can override or opt out of lab autoshutdown. Lab users can override the lab schedule, and they don't have to set any autoshutdown for their VMs. This setting is the default.
128+
- **User sets a schedule and cannot opt out**: Lab users can override the lab schedule for their VMs, but they can't opt out of autoshutdown. This option ensures that every VM in the lab is on some autoshutdown schedule.
129+
- **User has no control over the schedule set by lab administrator**: Lab users can't override or opt out of the lab autoshutdown schedule. They can set up autoshutdown notifications for their own VMs.
148130

149131
1. Select **Save**.
150132

151-
:::image type="content" source="./media/devtest-lab-set-lab-policy/auto-start.png" alt-text="Screenshot showing the Autostart selection.":::
133+
:::image type="content" source="./media/devtest-lab-set-lab-policy/auto-shutdown-policy-options.png" alt-text="Screenshot showing autoshutdown policy options.":::
152134

153-
> [!NOTE]
154-
> This policy isn't automatically applied to current VMs in the lab. To apply this setting to current VMs, open the VM's page and change its **Auto-start** setting.
155-
156-
For more information and details about autostart policy, see [Start up lab virtual machines automatically](devtest-lab-auto-startup-vm.yml).
135+
For more information and details about autoshutdown policy, see [Configure lab autoshutdown policy](devtest-lab-auto-shutdown.md#configure-lab-auto-shutdown-policy).
157136

158-
## Next steps
137+
## Related content
159138

160139
Besides setting policies, here are more ways to control and manage DevTest Labs costs:
161140

11.6 KB
Loading
14.4 KB
Loading
8.33 KB
Loading
13.1 KB
Loading
-84.4 KB
Loading
2.77 KB
Loading
14 KB
Loading
15.1 KB
Loading
19.4 KB
Loading

0 commit comments

Comments
 (0)