|
1 | 1 | ---
|
2 |
| -title: Delete a lab or VM in a lab |
3 |
| -description: This article shows you how to delete a lab or delete a VM in a lab using the Azure portal(Azure DevTest Labs). |
| 2 | +title: Delete a lab virtual machine or a lab |
| 3 | +description: Learn how to delete a virtual machine from a lab or delete a lab in Azure DevTest Labs. |
4 | 4 | ms.topic: how-to
|
5 |
| -ms.date: 01/24/2020 |
| 5 | +ms.date: 03/11/2022 |
6 | 6 | ---
|
7 | 7 |
|
8 |
| -# Delete a lab or VM in a lab in Azure DevTest Labs |
9 |
| -This article shows you how to delete a lab or VM in a lab. |
| 8 | +# Delete a lab VM or lab in Azure DevTest Labs |
10 | 9 |
|
11 |
| -## Delete a lab |
12 |
| -When you delete a DevTest Labs instance from a resource group, the DevTest Labs service performs the following actions: |
| 10 | +This article shows you how to delete a virtual machine (VM) from a lab or delete a lab in Azure DevTest Labs. |
| 11 | + |
| 12 | +## Delete a lab VM |
| 13 | + |
| 14 | +When you create a lab VM, DevTest Labs automatically creates resources for the VM, like a disk, network interface, and public IP address, in a separate resource group. Deleting the VM deletes most of the resources created at VM creation, including the VM, network interface, and disk. However, deleting the VM doesn't delete: |
| 15 | + |
| 16 | +- Any resources you manually created in the VM's resource group. |
| 17 | +- The VM's key vault in the lab's resource group. |
| 18 | +- The availability set, load balancer, or public IP address in the VM's resource group. These resources are shared by multiple VMs in a resource group. |
| 19 | + |
| 20 | +To delete a VM from a lab: |
13 | 21 |
|
14 |
| -- All the resources that were automatically created at the time of lab creation are automatically deleted. The resource group itself is not deleted. If you had manually created any resources this resource group, the service doesn't delete them. |
15 |
| -- All VMs in the lab and resource groups associated with these VMs are automatically deleted. When you create a VM in a lab, the service creates resources (disk, network interface, public IP address, etc.) for the VM in a separate resource group. However, if you manually create any additional resources in these resource groups, the DevTest Labs service does not delete those resources and the resource group. |
| 22 | +1. On the lab's **Overview** page in the Azure portal, find the VM you want to delete in the list under **My virtual machines**. |
16 | 23 |
|
17 |
| -To delete a lab, do the following actions: |
| 24 | +1. Either: |
18 | 25 |
|
19 |
| -1. Sign in to the [Azure portal](https://portal.azure.com). |
20 |
| -2. Select **All resource** from menu on the left, select **DevTest Labs** for the type of service, and select the lab. |
| 26 | + - Select the **More options** ellipse **...** next to the VM, and select **Delete** from the context menu. |
| 27 | +  |
21 | 28 |
|
22 |
| -  |
23 |
| -3. On the **DevTest Lab** page, click **Delete** on the toolbar. |
| 29 | + or |
24 | 30 |
|
25 |
| -  |
26 |
| -4. On the **Confirmation** page, enter the **name** of your lab, and select **Delete**. |
| 31 | + - Select the VM name, and on the VM's **Overview** page, select **Delete** from the top menu. |
| 32 | +  |
27 | 33 |
|
28 |
| -  |
29 |
| -5. To see the status of the operation, select **Notifications** icon (Bell). |
| 34 | +1. On the **Are you sure you want to delete it?** page, select **Delete**. |
30 | 35 |
|
31 |
| -  |
| 36 | +  |
32 | 37 |
|
33 |
| - |
34 |
| -## Delete a VM in a lab |
35 |
| -If I delete a VM in a lab, some of the resources (not all) that were created at the time of lab creation are deleted. The following resources are not deleted: |
| 38 | +1. To check deletion status, select the **Notifications** icon on the Azure menu bar. |
36 | 39 |
|
37 |
| -- Key vault in the main resource group |
38 |
| -- Availability set, load balancer, public IP address in the VM resource group. These resources are shared by multiple VMs in a resource group. |
| 40 | +## Delete a lab |
| 41 | + |
| 42 | +When you delete a lab from a resource group, DevTest Labs automatically deletes: |
| 43 | + |
| 44 | +- All VMs in the lab. |
| 45 | +- All resource groups associated with those VMs. |
| 46 | +- All resources that DevTest Labs automatically created during lab creation. |
39 | 47 |
|
40 |
| -Virtual machine, network interface, and disk associated with the VM are deleted. |
| 48 | +DevTest Labs doesn't delete the lab's resource group itself, and doesn't delete any resources you manually created in the lab's resource group. |
41 | 49 |
|
42 |
| -To delete a VM in a lab, do the following actions: |
| 50 | +> [!NOTE] |
| 51 | +> If you want to manually delete the lab's resource group, you must delete the lab first. You can't delete a resource group that has a lab in it. |
43 | 52 |
|
44 |
| -1. Sign in to the [Azure portal](https://portal.azure.com). |
45 |
| -2. Select **All resource** from menu on the left, select **DevTest Labs** for the type of service, and select the lab. |
| 53 | +To delete a lab: |
46 | 54 |
|
47 |
| -  |
48 |
| -3. Select **... (ellipsis)** for the VM in the list of VMs, and select **Delete**. |
| 55 | +1. On the lab's **Overview** page in the Azure portal, select **Delete** from the top toolbar. |
49 | 56 |
|
50 |
| -  |
51 |
| -4. On the **confirmation** dialog box, select **Ok**. |
52 |
| -5. To see the status of the operation, select **Notifications** icon (Bell). |
| 57 | +  |
53 | 58 |
|
54 |
| -To delete a VM from the **Virtual Machine page**, select **Delete** from the toolbar as shown in the following image: |
| 59 | +1. On the **Are you sure you want to delete it?** page, under **Type the lab name**, type the lab name, and then select **Delete**. |
55 | 60 |
|
56 |
| - |
| 61 | +  |
57 | 62 |
|
| 63 | +1. To check deletion status, select the **Notifications** icon on the Azure menu bar. |
| 64 | + |
| 65 | +  |
58 | 66 |
|
59 | 67 | ## Next steps
|
60 |
| -If you want to create a lab, see the following articles: |
61 | 68 |
|
62 |
| -- [Create a lab](devtest-lab-create-lab.md) |
63 |
| -- [Add a VM to the lab](devtest-lab-add-vm.md) |
| 69 | +- [Attach and detach data disks for lab VMs](devtest-lab-attach-detach-data-disk.md) |
| 70 | +- [Export or delete personal data](personal-data-delete-export.md) |
| 71 | +- [Move a lab to another region](how-to-move-labs.md) |
| 72 | + |
0 commit comments