Skip to content

Commit 722fa38

Browse files
committed
edits
1 parent 7713f31 commit 722fa38

File tree

6 files changed

+47
-34
lines changed

6 files changed

+47
-34
lines changed

articles/devtest-labs/devtest-lab-add-vm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This article describes how to create Azure virtual machines (VMs) in Azure DevTe
2727

2828
:::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.":::
2929

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.
3131

3232
1. On the **Basic Settings** tab of the **Create lab resource** screen, provide the following information:
3333

@@ -113,9 +113,9 @@ When you create a VM in DevTest Labs, you automatically have permission to acces
113113

114114
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.
115115

116-
## Copy existing VMs into a lab
116+
## Copy existing Azure VMs into a lab
117117

118-
You can copy existing VMs to DevTest Labs as follows:
118+
You can copy existing Azure VMs to DevTest Labs as follows:
119119

120120
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.
121121
1. Use the VHD file to [create a custom image](devtest-lab-create-template.md) in your lab.

articles/devtest-labs/devtest-lab-attach-detach-data-disk.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.custom: UpdateFrequency2
1212

1313
# Attach or detach a data disk for a lab VM in Azure DevTest Labs
1414

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.
1616

1717
## Prerequisites
1818

@@ -23,9 +23,7 @@ To attach or detach a data disk, you need to own the lab VM, and the VM must be
2323
Follow these steps to create and attach a new managed data disk for a DevTest Labs VM.
2424

2525
1. In the Azure portal, select your VM from the **My virtual machines** list on your lab **Overview** page.
26-
2726
1. On the VM **Overview** page, select **Disks** under **Settings** in the left navigation.
28-
2927
1. On the **Disks** page, select **Attach new**.
3028

3129
:::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
4947
Follow these steps to attach an existing available data disk to a running VM.
5048

5149
1. In the Azure portal, select your VM from the **My virtual machines** list on the lab **Overview** page.
52-
5350
1. On the VM **Overview** page, select **Disks** under **Settings** in the left navigation.
54-
5551
1. On the **Disks** page, select **Attach existing**.
5652

5753
:::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.":::

articles/devtest-labs/devtest-lab-concepts.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: RoseHJM
77
ms.date: 03/17/2025
88
ms.custom: UpdateFrequency2
99

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.
1111
---
1212

1313
# DevTest Labs concepts
@@ -31,17 +31,17 @@ A DevTest Labs lab is the infrastructure that encompasses a group of resources s
3131

3232
[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**.
3333

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).
3535

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.
3737

3838
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).
3939

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.
4141

4242
- **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.
4343

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.
4545

4646
### Policies
4747

@@ -55,9 +55,9 @@ You can use ARM templates to create and update DevTest Labs labs, environments,
5555

5656
For more information about using ARM templates in DevTest Labs, see:
5757

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).
6161

6262
### Repositories
6363

@@ -97,7 +97,7 @@ After a lab user claims a VM, the VM moves to that user's **My virtual machines*
9797

9898
DevTest Labs custom images and formulas are mechanisms for fast VM creation and provisioning.
9999

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).
101101

102102
- 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).
103103

articles/devtest-labs/devtest-lab-upload-vhd-using-storage-explorer.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ To get the name of the lab storage account:
4040

4141
:::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.":::
4242

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`.
4444

4545
:::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.":::
4646

47-
1. Note the storage account name to use in the next section.
47+
1. Note the `<storageAccountName>` to use in the next section.
4848

4949
### Upload the VHD file
5050

@@ -67,17 +67,17 @@ When you open Storage Explorer, the Explorer pane shows all the Azure subscripti
6767
1. For **Blob type**, select **Page Blob**.
6868
1. Select **Upload**.
6969

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.":::
7171

7272
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.
7373

7474
:::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.":::
7575

7676
After the VHD file uploads, you can see it in your lab storage account in the Azure portal.
7777

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**.
7979
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.
8181

8282
:::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.":::
8383

1.42 KB
Loading

articles/devtest-labs/use-command-line-start-stop-virtual-machines.md

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ This article shows how you can use PowerShell or Azure CLI commands to script or
2020
- 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).
2121

2222
>[!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.
2424
2525
## Prerequisites
2626

2727
# [Azure PowerShell](#tab/PowerShell)
2828

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.
3131

3232
# [Azure CLI](#tab/CLI)
3333

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.
3636

3737
---
3838

@@ -88,10 +88,7 @@ The following PowerShell script starts or stops a VM in a lab by using the [Invo
8888
8989
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.
9090
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.
9592
9693
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.
9794
@@ -103,6 +100,8 @@ The following script uses the Azure CLI [az lab vm start](/cli/azure/lab/vm#az-l
103100

104101
1. Set variables by providing values for `<SubscriptionId>`, `<resourceGroup>`, `<lab name>`, `<VM name>`, and whether to `Start` or `Stop` the VM.
105102

103+
**Bash**
104+
106105
```azurecli
107106
SUBSCRIPTIONID=<SubscriptionId>
108107
RESOURCEGROUP=<resourceGroup>
@@ -111,19 +110,37 @@ The following script uses the Azure CLI [az lab vm start](/cli/azure/lab/vm#az-l
111110
ACTION=<Start or Stop>
112111
```
113112

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**
116114

117115
```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>
119121
```
120122

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+
121130
1. Run the following Azure CLI command to start or stop the VM, based on the value passed to `ACTION`.
122131
132+
**Bash**
133+
123134
```azurecli
124135
az lab vm $ACTION --lab-name $DEVTESTLABNAME --name $VMNAME --resource-group $RESOURCEGROUP
125136
```
126137
138+
**Windows**
139+
140+
```azurecli
141+
az lab vm %ACTION% --lab-name %DEVTESTLABNAME% --name %VMNAME% --resource-group %RESOURCEGROUP%
142+
```
143+
127144
---
128145

129146
## Related content

0 commit comments

Comments
 (0)