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
description: Learn how to attach or detach a data disk for a lab virtual machine in Azure DevTest Labs.
2
+
title: Attach or detach data disks for lab VMs
3
+
description: Learn how to use the Azure portal to attach or detach a data disk for an Azure DevTest Labs virtual machine (VM).
4
4
ms.topic: how-to
5
5
ms.author: rosemalcolm
6
6
author: RoseHJM
7
-
ms.date: 09/30/2023
7
+
ms.date: 03/20/2025
8
8
ms.custom: UpdateFrequency2
9
+
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.
9
11
---
10
12
11
-
# Attach or detach a data disk for a lab virtual machine in Azure DevTest Labs
13
+
# Attach or detach a data disk for a lab VM in Azure DevTest Labs
12
14
13
-
This article explains how to attach and detach a lab virtual machine (VM) data disk in Azure DevTest Labs. You can create, attach, detach, and reattach multiple [data disks](/azure/virtual-machines/managed-disks-overview) for lab VMs that you own. This functionality is useful for managing 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 the 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.
14
16
15
17
## Prerequisites
16
18
17
-
To attach or detach a data disk, you need to own the lab VM, and the VM must be running. The VM size determines how many data disks you can attach. For more information, see [Sizes for virtual machines](/azure/virtual-machines/sizes).
19
+
To attach or detach a data disk, you must have ownership permissions on the lab VM, and the VM must be running. The VM size determines how many data disks you can attach. For more information, see [Sizes for virtual machines](/azure/virtual-machines/sizes).
18
20
19
21
## Create and attach a new data disk
20
22
21
23
Follow these steps to create and attach a new managed data disk for a DevTest Labs VM.
22
24
23
-
1. Select your VM from the **My virtual machines** list on the lab **Overview** page.
24
-
25
+
1. In the Azure portal, select your VM from the **My virtual machines** list on your lab **Overview** page.
25
26
1. On the VM **Overview** page, select **Disks** under **Settings** in the left navigation.
26
-
27
27
1. On the **Disks** page, select **Attach new**.
28
28
29
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.":::
30
30
31
-
1.Fill out the **Attach new disk**form as follows:
31
+
1.On the **Attach new disk**page:
32
32
33
33
- For **Name**, enter a unique name.
34
-
- For **Disk type**, select a [disk type](/azure/virtual-machines/disks-types) from the drop-down list.
35
-
- For **Size (GiB)**, enter a size in gigabytes.
34
+
- For **Disk type**, select a [disk type](/azure/virtual-machines/disks-types) from the dropdown list.
35
+
- For **Size (GiB)**, enter the disk size in gigabytes.
36
36
37
37
1. Select **OK**.
38
38
@@ -46,13 +46,11 @@ Follow these steps to create and attach a new managed data disk for a DevTest La
46
46
47
47
Follow these steps to attach an existing available data disk to a running VM.
48
48
49
-
1. Select your VM from the **My virtual machines** list on the lab **Overview** page.
50
-
49
+
1. In the Azure portal, select your VM from the **My virtual machines** list on the lab **Overview** page.
51
50
1. On the VM **Overview** page, select **Disks** under **Settings** in the left navigation.
52
-
53
51
1. On the **Disks** page, select **Attach existing**.
54
52
55
-
:::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 V M's Disk page.":::
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.":::
56
54
57
55
1. On the **Attach existing disk** page, select a disk, and then select **OK**.
58
56
@@ -74,30 +72,28 @@ Follow these steps to detach an attached data disk from a running VM.
74
72
75
73
:::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.":::
76
74
77
-
1. On the data disk's page, select **Detach**, and then select**OK**.
75
+
1. On the data disk's page, select **Detach**, then respond**OK** to **Are you sure you want to detach it**.
78
76
79
77
:::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.":::
80
78
81
-
The disk is detached, and is available to reattach to this or another VM.
79
+
The disk detaches, and is available to reattach to this or another VM.
82
80
83
-
### Detach or delete a data disk on the lab management page
81
+
### Detach or delete a data disk from the lab page
84
82
85
-
You can also detach or delete a data disk without navigating to the VM's page.
83
+
You can also detach or delete a data disk by using the lab's **Overview** page.
86
84
87
-
1.In the left navigation for your lab's**Overview** page, select **My data disks** under **My Lab**.
85
+
1.On the lab **Overview** page in the Azure portal, select **My data disks** under **My Lab** in the left navigation.
88
86
89
87
1. On the **My data disks** page, either:
90
88
91
-
- Select the disk you want to detach, and then on the data disk's page, select **Detach** and then select **OK**.
92
-
93
-
or
94
-
95
89
- Select the ellipsis (**...**) next to the disk you want to detach, select **Detach** from the context menu, and then select **Yes**.
96
90
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.":::
91
+
- Or, select the disk name, and on the disk's page, select **Detach** and then select **OK**.
92
+
93
+
:::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
94
99
-
You can also delete a detached data disk, by selecting **Delete** from the context menu or from the data disk page. When you delete a data disk, it is removed from storage and can't be reattached anymore.
95
+
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. If you want to attach the disk again, you must add it as a new disk.
100
96
101
-
## Next steps
97
+
## Related content
102
98
103
99
For information about transferring data disks for claimable lab VMs, see [Transfer the data disk](devtest-lab-add-claimable-vm.md#transfer-the-data-disk).
0 commit comments