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-attach-detach-data-disk.md
+7-7Lines changed: 7 additions & 7 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 use the Azure portal to attach or detach a data disk f
4
4
ms.topic: how-to
5
5
ms.author: rosemalcolm
6
6
author: RoseHJM
7
-
ms.date: 03/14/2025
7
+
ms.date: 03/17/2025
8
8
ms.custom: UpdateFrequency2
9
9
10
10
#customer intent: As a lab user, I want to attach and detach data disks for my DevTest Labs VMs so I can manage storage or software separately from individual VMs.
@@ -76,17 +76,17 @@ Follow these steps to detach an attached data disk from a running VM.
76
76
77
77
:::image type="content" source="./media/devtest-lab-attach-detach-data-disk/devtest-lab-detach-button.png" alt-text="Screenshot of selecting a data disk to detach.":::
78
78
79
-
1. On the data disk's page, select **Detach**, and at**Are you sure you want to detach it**, select **OK**.
79
+
1. On the data disk's page, select **Detach**, and respond**OK** to **Are you sure you want to detach it**.
80
80
81
81
:::image type="content" source="./media/devtest-lab-attach-detach-data-disk/devtest-lab-detach-data-disk-2.png" alt-text="Screenshot showing Detach on the Data disk page.":::
82
82
83
-
The disk is detached, and is available to reattach to this or another VM.
83
+
The disk detaches, and is available to reattach to this or another VM.
84
84
85
-
### Detach or delete a data disk on the lab management page
85
+
### Detach or delete a data disk from the lab page
86
86
87
-
You can also detach or delete a data disk from the lab's page.
87
+
You can also detach or delete a data disk from the lab's page instead of the VM's page.
88
88
89
-
1. On the lab **Overview** page in the Azure portal, select **My data disks** under **My Lab**from the left navigation.
89
+
1. On the lab **Overview** page in the Azure portal, select **My data disks** under **My Lab**in the left navigation.
90
90
91
91
1. On the **My data disks** page, either:
92
92
@@ -96,7 +96,7 @@ You can also detach or delete a data disk from the lab's page.
96
96
97
97
:::image type="content" source="./media/devtest-lab-attach-detach-data-disk/devtest-lab-detach-data-disk.png" alt-text="Screenshot of detaching a data disk from the listing's context menu.":::
98
98
99
-
To delete a detached data disk, select **Delete** from the context menu on the **My data disks** page, or from the disk's page. Deleting a data disk removes it from storage, and you can no longer reattach it.
99
+
To delete a detached data disk, select **Delete** from the context menu on the **My data disks** page, or select **Delete** on the disk's page. Deleting a data disk removes it from storage, and you can no longer reattach it.
Copy file name to clipboardExpand all lines: articles/devtest-labs/devtest-lab-concepts.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,10 @@ description: Learn about some basic Azure DevTest Labs concepts related to labs,
4
4
ms.topic: conceptual
5
5
ms.author: rosemalcolm
6
6
author: RoseHJM
7
-
ms.date: 03/14/2025
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 know how I can create, manage, and use labs, VMs, environments, and templates.
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.
11
11
---
12
12
13
13
# DevTest Labs concepts
@@ -20,8 +20,8 @@ A DevTest Labs lab is the infrastructure that encompasses a group of resources s
20
20
21
21
- Add and configure lab users.
22
22
- Create ready-made VMs for lab users to claim and use.
23
-
- Create and use templates to create and configure labs, VMs, and environments.
24
-
- Connect artifact and template repositories to the lab.
23
+
- Create and use Azure Resource Manager (ARM) templates to create and configure labs, VMs, and environments.
24
+
- Connect artifact and template source control repositories to the lab.
25
25
- Let users create and configure their own lab VMs and environments.
26
26
- Specify allowed virtual machine (VM) limits, sizes, and configurations.
27
27
- Set autoshutdown and autostartup policies.
@@ -49,9 +49,11 @@ Lab policies help control costs and reduce waste. For example, policies can auto
49
49
50
50
## Templates
51
51
52
+
You can use ARM templates to create and update DevTest Labs labs, environments, VMs, and artifacts.
53
+
52
54
[!INCLUDE [About Azure Resource Manager](~/reusable-content/ce-skilling/azure/includes/resource-manager-quickstart-introduction.md)] For more information about ARM template structure and properties, see [Template format](/azure/azure-resource-manager/templates/syntax#template-format).
53
55
54
-
You can use ARM templates to create and update DevTest Labs labs, environments, VMs, and artifacts, or for automation. For more information, see:
56
+
For more information about using ARM templates in DevTestLabs, see:
55
57
56
58
-[Create labs from ARM templates](create-lab-windows-vm-template.md)
57
59
-[Create environments from ARM templates](devtest-lab-create-environment-from-arm.md)
@@ -65,7 +67,9 @@ Lab administrators can also store custom artifacts and ARM templates in private
65
67
66
68
## Virtual machines
67
69
68
-
You can use templates, artifacts, custom images, and formulas to create and manage DevTest Labs VMs. Azure VMs are [on-demand, scalable computing resources](/azure/architecture/guide/technology-choices/compute-decision-tree) that give you the flexibility of virtualization without having to buy and maintain the physical hardware to run it. For more information about Azure VMs, see [Windows virtual machines in Azure](/azure/virtual-machines/windows/overview).
70
+
You can use templates, artifacts, custom images, and formulas to create and manage DevTest Labs VMs.
71
+
72
+
Azure VMs are [on-demand, scalable computing resources](/azure/architecture/guide/technology-choices/compute-decision-tree) that give you the flexibility of virtualization without having to buy and maintain the physical hardware to run it. For more information about Azure VMs, see [Windows virtual machines in Azure](/azure/virtual-machines/windows/overview).
69
73
70
74
### Base images
71
75
@@ -101,6 +105,6 @@ For more information about custom images and formulas, see [Compare custom image
101
105
102
106
## Environments
103
107
104
-
A DevTest Labs environment is a collection of Azure platform-as-a-service (PaaS) resources, such as an Azure Web App or a SharePoint farm, that's defined by an Azure Resource Manager (ARM) template. Lab administrators can add public or privately created environment tamplates to labs, and lab users can use them to quickly create environments. For more information, see [Use ARM templates to create DevTest Labs environments](devtest-lab-create-environment-from-arm.md).
108
+
A DevTest Labs environment is a collection of Azure platform-as-a-service (PaaS) resources, such as an Azure Web App or a SharePoint farm, that's defined by an ARM template. Lab administrators can add public or privately created environment tamplates to labs, and lab users can use them to quickly create environments. For more information, see [Use ARM templates to create DevTest Labs environments](devtest-lab-create-environment-from-arm.md).
@@ -19,23 +19,34 @@ This article shows how you can use PowerShell or Azure CLI commands to script or
19
19
- Turn off your VMs to save costs when they meet custom criteria.
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
-
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.
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
24
24
25
## Prerequisites
25
26
27
+
# [Azure PowerShell](#tab/PowerShell)
28
+
29
+
- Ownership of a [lab VM in DevTest Labs](devtest-lab-add-vm.md).
26
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.
27
31
32
+
# [Azure CLI](#tab/CLI)
33
+
28
34
- Ownership of a [lab VM in DevTest Labs](devtest-lab-add-vm.md).
29
-
- 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.
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.
36
+
37
+
---
30
38
31
-
## Azure PowerShell script
39
+
## Start or stop a VM
40
+
41
+
# [Azure PowerShell](#tab/PowerShell)
32
42
33
43
The following PowerShell script starts or stops a VM in a lab by using the [Invoke-AzResourceAction](/powershell/module/az.resources/invoke-azresourceaction) PowerShell cmdlet. The `ResourceId` parameter is the fully qualified ID for the lab VM you want to start or stop. The `Action` parameter determines whether to start or stop the VM, depending on which action you need.
34
44
35
-
1. In Cloud Shell, make sure the **PowerShell** environment is selected. Use the PowerShell [Connect-AzAccount](/powershell/module/Az.Accounts/Connect-AzAccount) cmdlet to sign in to your Azure account. If you have multiple Azure subscriptions, uncomment `Set-AzContext` and provide the `<SubscriptionId>` you want to use.
45
+
1. In Cloud Shell, make sure the **PowerShell** environment is selected.
46
+
47
+
1. Use the PowerShell [Connect-AzAccount](/powershell/module/Az.Accounts/Connect-AzAccount) cmdlet to sign in to your Azure account. If you have multiple Azure subscriptions, uncomment `Set-AzContext` and provide the `<SubscriptionId>` you want to use.
@@ -73,14 +84,16 @@ The following PowerShell script starts or stops a VM in a lab by using the [Invo
73
84
}
74
85
```
75
86
76
-
## Azure CLI script
87
+
# [Azure CLI](#tab/CLI)
77
88
78
-
The Azure CLI [az lab vm start](/cli/azure/lab/vm#az-lab-vm-start) and [az lab vm stop](/cli/azure/lab/vm#az-lab-vm-stop) commands start or stop a lab VM.
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.
79
90
80
91
>[!NOTE]
81
92
>This script assumes a Bash environment. The variables and command for a Windows environment, like a command prompt, have slight variations.
82
93
83
-
1. In Cloud Shell, make sure the **Bash** environment is selected, and sign in to your Azure account. If you have multiple Azure subscriptions, uncomment the `az account set` line to use the subscription ID you provide.
94
+
1. In Cloud Shell, make sure the **Bash** environment is selected.
95
+
96
+
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.
84
97
85
98
```azurecli
86
99
az login
@@ -102,7 +115,7 @@ The Azure CLI [az lab vm start](/cli/azure/lab/vm#az-lab-vm-start) and [az lab v
102
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.
103
116
104
117
```azurecli
105
-
az resource list --resource-type "Microsoft.DevTestLab/labs" --name "<LabName>" --query "[0].resourceGroup"
118
+
az resource list --resource-type "Microsoft.DevTestLab/labs" --name "<lab name>" --query "[0].resourceGroup"
106
119
```
107
120
108
121
1. Run the following Azure CLI command to start or stop the VM, based on the value passed to `ACTION`.
@@ -111,6 +124,8 @@ The Azure CLI [az lab vm start](/cli/azure/lab/vm#az-lab-vm-start) and [az lab v
111
124
az lab vm $ACTION --lab-name $DEVTESTLABNAME --name $VMNAME --resource-group $RESOURCEGROUP
0 commit comments