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-add-vm.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ This article describes how to create Azure virtual machines (VMs) in Azure DevTe
27
27
28
28
:::image type="content" source="./media/devtest-lab-add-vm/portal-lab-add-vm.png" alt-text="Screenshot that shows the lab overview page with the Add button.":::
29
29
30
-
1. On the **Choose a base** page, select an image for the VM. You can choose from Marketplace images, custom images, or formulas that the lab administrator made available. The following instructions use a Windows Server 2022 Datacenter image. Some bases might have different settings.
30
+
1. On the **Choose a base** page, select an image for the VM. You can choose from Marketplace images, custom images, or formulas that the lab administrator made available. The following instructions use a Windows 11 Pro image. Some bases might have different settings.
31
31
32
32
1. On the **Basic Settings** tab of the **Create lab resource** screen, provide the following information:
33
33
@@ -113,9 +113,9 @@ When you create a VM in DevTest Labs, you automatically have permission to acces
113
113
114
114
DevTest Labs users in the **Owner** and **Contributor** roles can see all lab VMs on the lab's **All Resources** page. Users in the **DevTest Labs User** role can't automatically access VM resources that other users created, so they don't see those VMs on the **All resources** page.
115
115
116
-
## Copy existing VMs into a lab
116
+
## Copy existing Azure VMs into a lab
117
117
118
-
You can copy existing VMs to DevTest Labs as follows:
118
+
You can copy existing Azure VMs to DevTest Labs as follows:
119
119
120
120
1. Use a [PowerShell script](https://github.com/Azure/azure-devtestlab/blob/master/samples/DevTestLabs/Scripts/CopyVirtualMachines/CopyAzVHDFromVMToLab.ps1) to copy your existing VM's virtual hard disk (VHD) file to the lab.
121
121
1. Use the VHD file to [create a custom image](devtest-lab-create-template.md) in your lab.
Copy file name to clipboardExpand all lines: articles/devtest-labs/devtest-lab-attach-detach-data-disk.md
+1-5Lines changed: 1 addition & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.custom: UpdateFrequency2
12
12
13
13
# Attach or detach a data disk for a lab VM in Azure DevTest Labs
14
14
15
-
This article explains how to attach and detach a lab virtual machine (VM) data disk in Azure DevTest Labs by using the Azure portal. You can create, attach, detach, and reattach multiple [data disks](/azure/virtual-machines/managed-disks-overview) for your lab VMs. Data disks let you manage storage or software separately from individual VMs.
15
+
This article explains how to attach and detach a lab virtual machine (VM) data disk in Azure DevTest Labs by using the Azure portal. Depending on VM size, you can create, attach, detach, and reattach multiple [data disks](/azure/virtual-machines/managed-disks-overview). Data disks let you manage storage or software separately from individual VMs.
16
16
17
17
## Prerequisites
18
18
@@ -23,9 +23,7 @@ To attach or detach a data disk, you need to own the lab VM, and the VM must be
23
23
Follow these steps to create and attach a new managed data disk for a DevTest Labs VM.
24
24
25
25
1. In the Azure portal, select your VM from the **My virtual machines** list on your lab **Overview** page.
26
-
27
26
1. On the VM **Overview** page, select **Disks** under **Settings** in the left navigation.
28
-
29
27
1. On the **Disks** page, select **Attach new**.
30
28
31
29
:::image type="content" source="./media/devtest-lab-attach-detach-data-disk/devtest-lab-attach-new.png" alt-text="Screenshot of Attach new on the V M's Disk page.":::
@@ -49,9 +47,7 @@ Follow these steps to create and attach a new managed data disk for a DevTest La
49
47
Follow these steps to attach an existing available data disk to a running VM.
50
48
51
49
1. In the Azure portal, select your VM from the **My virtual machines** list on the lab **Overview** page.
52
-
53
50
1. On the VM **Overview** page, select **Disks** under **Settings** in the left navigation.
54
-
55
51
1. On the **Disks** page, select **Attach existing**.
56
52
57
53
:::image type="content" source="./media/devtest-lab-attach-detach-data-disk/devtest-lab-attach-existing-button.png" alt-text="Screenshot of Attach existing on the VM's Disk page.":::
Copy file name to clipboardExpand all lines: articles/devtest-labs/devtest-lab-concepts.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ author: RoseHJM
7
7
ms.date: 03/17/2025
8
8
ms.custom: UpdateFrequency2
9
9
10
-
#customer intent: As a lab user or administrator, I want to understand basic DevTest Labs concepts so I can create, manage, or use labs, VMs, and environments.
10
+
#customer intent: As a lab user or administrator, I want to understand basic DevTest Labs concepts so I can manage or use labs, VMs, and environments.
11
11
---
12
12
13
13
# DevTest Labs concepts
@@ -31,17 +31,17 @@ A DevTest Labs lab is the infrastructure that encompasses a group of resources s
31
31
32
32
[Azure role-based access control (RBAC)](/azure/role-based-access-control/overview) defines DevTest Labs access and roles. DevTest Labs has three roles that define lab member permissions: **Owner**, **Contributor**, and **DevTest Labs User**.
33
33
34
-
- Lab **Owners** can do all lab tasks, including creating labs and managing policies and users. For more information about managing user access and roles, see [Add lab owners, contributors, and users](devtest-lab-add-devtest-user.md).
34
+
- Lab **Owners** can do all lab tasks, including creating labs and managing policies and users. Only lab Owners can add and manage lab users and roles. For more information about managing user access and roles, see [Add lab owners, contributors, and users](devtest-lab-add-devtest-user.md).
35
35
36
-
A lab Owner must have at least Contributor rights in the Azure subscription the lab is in. Azure subscription Owners have access to all resources and user assignments in their subscriptions, so they automatically inherit the lab Owner role.
36
+
Lab Owners must have at least Contributor rights in the Azure subscription their lab is in. Azure subscription Owners have access to all resources and user assignments in their subscriptions, so they automatically inherit the lab Owner role.
37
37
38
38
Lab Owners can also create and assign custom DevTest Labs roles. For more information, see [Grant user permissions to specific lab policies](devtest-lab-grant-user-permissions-to-specific-lab-policies.md).
39
39
40
-
- Lab **Contributors** can do everything that Owners can, such as create and configure labs and policies, but can't assign or manage users and roles.
40
+
- Lab **Contributors** can do everything that lab Owners can, such as create and configure labs and policies, but they can't assign or manage users and roles.
41
41
42
42
-**DevTest Labs Users** can view all lab resources and policies and can create and modify their own VMs and environments, within policy restrictions such as number of VMs per user.
43
43
44
-
DevTest Labs Users can't modify lab policies, or change any other users' VMs. DevTest Labs Users automatically have Owner permissions on their own VMs.
44
+
DevTest Labs Users can't modify lab policies, or view or change any other users' VMs unless the VM or lab owner grants them permission. DevTest Labs Users automatically have Owner permissions on their own VMs.
45
45
46
46
### Policies
47
47
@@ -55,9 +55,9 @@ You can use ARM templates to create and update DevTest Labs labs, environments,
55
55
56
56
For more information about using ARM templates in DevTest Labs, see:
57
57
58
-
-[Create labs from ARM templates](create-lab-windows-vm-template.md)
59
-
-[Create environments from ARM templates](devtest-lab-create-environment-from-arm.md)
60
-
-[Create ARM templates for VMs](devtest-lab-use-resource-manager-template.md)
58
+
-[Create labs from ARM templates](create-lab-windows-vm-template.md).
59
+
-[Create environments from ARM templates](devtest-lab-create-environment-from-arm.md).
60
+
-[Create ARM templates for VMs](devtest-lab-use-resource-manager-template.md).
61
61
62
62
### Repositories
63
63
@@ -97,7 +97,7 @@ After a lab user claims a VM, the VM moves to that user's **My virtual machines*
97
97
98
98
DevTest Labs custom images and formulas are mechanisms for fast VM creation and provisioning.
99
99
100
-
- A custom image is a VM image created from an existing VM or virtual hard drive (VHD), which can have software and other artifacts installed. Lab users can create identical VMs from the custom image. For more information, see [Create a custom image from a VM](devtest-lab-create-custom-image-from-vm-using-portal.md).
100
+
- A custom image is a VM image created from an existing VM or virtual hard disk (VHD), which can have software and other artifacts installed. Lab users can create identical VMs from the custom image. For more information, see [Create a custom image from a VM](devtest-lab-create-custom-image-from-vm-using-portal.md).
101
101
102
102
- A formula is a list of default property values for creating a lab VM, such as base image, VM size, virtual network, and artifacts. When you create a VM from a formula, you can use the default values as-is or modify them. For more information, see [Manage Azure DevTest Labs formulas](devtest-lab-manage-formulas.md).
Copy file name to clipboardExpand all lines: articles/devtest-labs/devtest-lab-upload-vhd-using-storage-explorer.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,11 +40,11 @@ To get the name of the lab storage account:
40
40
41
41
:::image type="content" source="media/devtest-lab-upload-vhd-using-storage-explorer/upload-image-powershell.png" alt-text="Screenshot that shows the link to upload a VHD by using PowerShell.":::
42
42
43
-
1. On the **Upload an image using PowerShell** page, scroll right to see the call to the `Add-AzureRmVhd` cmdlet. The `-Destination` parameter contains the URI for the blob container in the format `https://<storageAccountName>.blob.core.windows.net...`.
43
+
1. On the **Upload an image using PowerShell** page, scroll right to see the call to the `Add-AzureRmVhd` cmdlet. The `Destination` parameter contains the URI for the blob container in the format `https://<storageAccountName>.blob.core.windows.net`.
44
44
45
45
:::image type="content" source="media/devtest-lab-upload-vhd-using-storage-explorer/destination-parameter.png" alt-text="Screenshot that shows an example of a storage account name in the Add VHD box.":::
46
46
47
-
1. Note the storage account name to use in the next section.
47
+
1. Note the `<storageAccountName>` to use in the next section.
48
48
49
49
### Upload the VHD file
50
50
@@ -67,17 +67,17 @@ When you open Storage Explorer, the Explorer pane shows all the Azure subscripti
67
67
1. For **Blob type**, select **Page Blob**.
68
68
1. Select **Upload**.
69
69
70
-
:::image type="content" source="media/devtest-lab-upload-vhd-using-storage-explorer/upload-file.png" alt-text="Screenshot that shows the Upload Files dialog box.":::
70
+
:::image type="content" source="media/devtest-lab-upload-vhd-using-storage-explorer/upload-file.png" alt-text="Screenshot that shows the Upload Files dialog box.":::
71
71
72
72
1. Track the upload status in the **Activities** pane at the bottom of Storage Explorer. Uploading the VHD file might take a long time, depending on the size of the VHD file and your connection speed.
73
73
74
74
:::image type="content" source="media/devtest-lab-upload-vhd-using-storage-explorer/upload-status.png" alt-text="Screenshot that shows the Activities pane with upload status.":::
75
75
76
76
After the VHD file uploads, you can see it in your lab storage account in the Azure portal.
77
77
78
-
1. Open your lab storage account by searching for and selecting it in the Azure Search bar, or by selecting it from **Storage accounts**.
78
+
1. Open your lab storage account by searching for and selecting its name in the Azure Search bar, or by selecting it from **Storage accounts**.
79
79
1. On the storage account's **Overview** page, select **Data storage** > **Containers** from the left navigation.
80
-
1. On the **Containers** page, open the **Uploads** folder to see the uploaded VHD file along with any other uploads to the storage account.
80
+
1. On the **Containers** page, open the **Uploads** folder to see the uploaded VHD file and any other uploads to the storage account.
81
81
82
82
:::image type="content" source="media/devtest-lab-upload-vhd-using-storage-explorer/uploads.png" alt-text="Screenshot that shows the uploaded VHD file in the Azure storage account.":::
Copy file name to clipboardExpand all lines: articles/devtest-labs/use-command-line-start-stop-virtual-machines.md
+29-12Lines changed: 29 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,19 +20,19 @@ This article shows how you can use PowerShell or Azure CLI commands to script or
20
20
- Start and stop a VM when a continuous integration and continuous delivery (CI/CD) workflow begins and finishes. For an example of this workflow, see [Run an image factory from Azure DevOps](image-factory-set-up-devops-lab.md).
21
21
22
22
>[!NOTE]
23
-
>You can also use the Azure portal to start, stop, or [restart](devtest-lab-restart-vm.md) DevTest Labs VMs. Lab admins can use the portal to configure [automatic startup](devtest-lab-auto-startup-vm.yml) and [automatic shutdown](devtest-lab-auto-shutdown.md) schedules and policies for lab VMs.
23
+
>You can also start, stop, or [restart](devtest-lab-restart-vm.md) DevTest Labs VMs by using the Azure portal. Lab admins can use the portal to configure [automatic startup](devtest-lab-auto-startup-vm.yml) and [automatic shutdown](devtest-lab-auto-shutdown.md) schedules and policies for lab VMs.
24
24
25
25
## Prerequisites
26
26
27
27
# [Azure PowerShell](#tab/PowerShell)
28
28
29
-
- Ownership of a [lab VM in DevTest Labs](devtest-lab-add-vm.md).
30
-
- Access to Azure PowerShell. You can [use Azure Cloud Shell](/azure/cloud-shell/quickstart?tabs=powershell) in the Azure portal, or [install Azure PowerShell](/powershell/azure/install-azure-powershell) locally. If necessary, run `Update-Module -Name Az` to update your local installation.
29
+
- Ownership of a [lab VM](devtest-lab-add-vm.md) in DevTest Labs.
30
+
- Access to Azure PowerShell. You can [use the PowerShell environment of Azure Cloud Shell](/azure/cloud-shell/quickstart) in the Azure portal, or [install Azure PowerShell](/powershell/azure/install-azure-powershell) to use locally. If necessary, run `Update-Module -Name Az` to update your local installation.
31
31
32
32
# [Azure CLI](#tab/CLI)
33
33
34
-
- Ownership of a [lab VM in DevTest Labs](devtest-lab-add-vm.md).
35
-
- Access to Azure CLI. You can [use Azure Cloud Shell](/azure/cloud-shell/quickstart?tabs=powershell) in the Azure portal, or [install Azure CLI ](/cli/azure/install-azure-cli) locally.
34
+
- Ownership of a [lab VM](devtest-lab-add-vm.md) in DevTest Labs.
35
+
- Access to Azure CLI. You can [use the Bash environment of Azure Cloud Shell](/azure/cloud-shell/quickstart) in the Azure portal, or [install Azure CLI ](/cli/azure/install-azure-cli)to use locally in a Bash or Windows environment.
36
36
37
37
---
38
38
@@ -88,10 +88,7 @@ The following PowerShell script starts or stops a VM in a lab by using the [Invo
88
88
89
89
The following script uses the Azure CLI [az lab vm start](/cli/azure/lab/vm#az-lab-vm-start) or [az lab vm stop](/cli/azure/lab/vm#az-lab-vm-stop) commands to start or stop a lab VM.
90
90
91
-
>[!NOTE]
92
-
>This script assumes a Bash environment. The variables and command for a Windows environment, like a command prompt, have slight variations.
93
-
94
-
1. In Cloud Shell, make sure the **Bash** environment is selected.
91
+
To run locally, use the appropriate syntax for setting and calling variables depending on whether you have a Bash or Windows environment. In Cloud Shell, use the **Bash** environment and syntax.
95
92
96
93
1. Sign in to your Azure account. If you have multiple Azure subscriptions, uncomment the `az account set` line and provide a subscription ID to use.
97
94
@@ -103,6 +100,8 @@ The following script uses the Azure CLI [az lab vm start](/cli/azure/lab/vm#az-l
103
100
104
101
1. Set variables by providing values for `<SubscriptionId>`, `<resourceGroup>`, `<lab name>`, `<VM name>`, and whether to `Start` or `Stop` the VM.
105
102
103
+
**Bash**
104
+
106
105
```azurecli
107
106
SUBSCRIPTIONID=<SubscriptionId>
108
107
RESOURCEGROUP=<resourceGroup>
@@ -111,19 +110,37 @@ The following script uses the Azure CLI [az lab vm start](/cli/azure/lab/vm#az-l
111
110
ACTION=<Start or Stop>
112
111
```
113
112
114
-
>[!TIP]
115
-
>If you don't know the name of the Azure resource group that contains your lab, you can find it by providing your `<lab name>` in the following query.
113
+
**Windows**
116
114
117
115
```azurecli
118
-
az resource list --resource-type "Microsoft.DevTestLab/labs" --name "<lab name>" --query "[0].resourceGroup"
116
+
set SUBSCRIPTIONID=<SubscriptionId>
117
+
set RESOURCEGROUP=<resourceGroup>
118
+
set DEVTESTLABNAME=<lab name>
119
+
set VMNAME=<VM name>
120
+
set ACTION=<Start or Stop>
119
121
```
120
122
123
+
>[!TIP]
124
+
>If you don't know the name of the Azure resource group that contains your lab, you can find it by providing your `<lab name>` in the following query.
125
+
>
126
+
>```azurecli
127
+
>az resource list --resource-type "Microsoft.DevTestLab/labs" --name "<lab name>" --query "[0].resourceGroup"
128
+
>```
129
+
121
130
1. Run the following Azure CLI command to start or stop the VM, based on the value passed to `ACTION`.
122
131
132
+
**Bash**
133
+
123
134
```azurecli
124
135
az lab vm $ACTION --lab-name $DEVTESTLABNAME --name $VMNAME --resource-group $RESOURCEGROUP
125
136
```
126
137
138
+
**Windows**
139
+
140
+
```azurecli
141
+
az lab vm %ACTION% --lab-name %DEVTESTLABNAME% --name %VMNAME% --resource-group %RESOURCEGROUP%
0 commit comments