|
1 | 1 | ---
|
2 |
| -title: Troubleshoot a VM in Azure Lab Services |
3 |
| -description: Learn how to troubleshoot a VM in Azure Lab Services by redeploying or resetting the VM. |
| 2 | +title: Troubleshoot a lab VM |
| 3 | +description: Learn how you can troubleshoot your lab VM in Azure Lab Services by redeploying the VM to another hardware node, or by reimaging the lab VM to its initial state. |
4 | 4 | services: lab-services
|
5 | 5 | ms.service: lab-services
|
6 | 6 | ms.topic: how-to
|
7 | 7 | author: ntrogh
|
8 | 8 | ms.author: nicktrog
|
9 |
| -ms.date: 12/06/2022 |
| 9 | +ms.date: 09/28/2023 |
10 | 10 | ---
|
11 | 11 | <!-- As a student, I want to be able to troubleshoot connectivity problems with my VM so that I can get back up and running quickly, without having to escalate an issue -->
|
12 | 12 |
|
13 |
| -# Troubleshoot a lab by redeploying or resetting the VM |
| 13 | +# Troubleshoot a lab VM by redeploying or reimaging the lab VM |
14 | 14 |
|
15 |
| -On rare occasions, you may have problems connecting to a VM in one of your labs. In this article, you learn how to redeploy or reset a lab VM in Azure Lab Services. You can use these troubleshooting steps to resolve connectivity issues for your assigned labs, without support from an educator or admin. |
| 15 | +In this article, you learn how to troubleshoot problems with connecting to your lab virtual machine (VM) in Azure Lab Services. As a lab user, you can perform troubleshooting operations on the lab VM, without support from the lab creator or an administrator. |
16 | 16 |
|
17 |
| -Learn more about [strategies for troubleshooting lab VMs](./troubleshoot-access-lab-vm.md). |
| 17 | +You can perform the following troubleshooting operations on the lab VM: |
18 | 18 |
|
19 |
| -## Reset VMs |
| 19 | +- **Redeploy a lab VM**: Azure Lab Services moves the VM to a new node in the Azure infrastructure, and then powers it back on. All data on the OS disk is still available after a redeploy operation. |
20 | 20 |
|
21 |
| -When you reset a lab VM, Azure Lab Services will shut down the VM, delete it, and recreate a new lab VM from the original template VM. You can think of a reset as a refresh of the entire VM. |
| 21 | +- **Reimage a lab VM**: Azure Lab Services recreates a new lab VM from the original template. All data in the lab VM is lost. |
22 | 22 |
|
23 |
| -You can reset a lab VM that is assigned to you. If you have the Lab Assistant, Lab Contributor, or Lab Operator role, you can reset any lab VM for which you have permissions. |
| 23 | +## Redeploy a lab VM |
24 | 24 |
|
25 |
| -You can also reset a lab VM by using the [REST api](/rest/api/labservices/virtual-machines/reimage), [PowerShell](/powershell/module/az.labservices/update-azlabservicesvmreimage), or the [.NET SDK](/dotnet/api/azure.resourcemanager.labservices.labvirtualmachineresource.reimage). |
| 25 | +When you redeploy a lab VM, Azure Lab Services shuts down the lab VM, moves the lab VM to a new node in the Azure infrastructure, and then powers it back on. You can think of a redeploy operation as a refresh of the underlying VM for your lab. |
26 | 26 |
|
27 |
| -> [!WARNING] |
28 |
| -> After you reset a lab VM, all the data that you saved on the OS disk (usually the C: drive on Windows), and the temporary disk (usually the D: drive on Windows), is lost. Learn how you can [store the user data outside the lab VM](./troubleshoot-access-lab-vm.md#store-user-data-outside-the-lab-vm). |
| 27 | +All data that you saved in the [OS disk](/azure/virtual-machines/managed-disks-overview#os-disk) (usually the C: drive on Windows) of the VM is still available after the redeploy operation. Any data on the [temporary disk](/azure/virtual-machines/managed-disks-overview#temporary-disk) (usually the D: drive on Windows) is lost after a redeploy operation. |
| 28 | + |
| 29 | +You can redeploy a lab VM that is assigned to you. If you have the Lab Assistant, or Lab Contributor role, you can redeploy any lab VM for which you have permissions. |
29 | 30 |
|
30 |
| -To reset a lab VM in the Azure Lab Services website that's assigned to you: |
| 31 | +To redeploy a lab VM that's assigned to you: |
31 | 32 |
|
32 | 33 | 1. Go to the [Azure Lab Services website](https://labs.azure.com/virtualmachines) to view your virtual machines.
|
33 | 34 |
|
34 |
| -1. For a specific lab VM, select **...** > **Reset**. |
| 35 | +1. For a specific lab VM, select **...** > **Redeploy**. |
35 | 36 |
|
36 |
| - :::image type="content" source="./media/how-to-reset-and-redeploy-vm/reset-single-vm.png" alt-text="Screenshot that shows how to reset a lab VM in the Lab Services web portal, highlighting the Reset button."::: |
| 37 | + :::image type="content" source="./media/how-to-reset-and-redeploy-vm/redeploy-single-vm.png" alt-text="Screenshot that shows the Redeploy virtual machine menu option in the Lab Services web portal."::: |
37 | 38 |
|
38 |
| -1. On the **Reset virtual machine** dialog box, select **Reset**. |
| 39 | +1. On the **Redeploy virtual machine** dialog box, select **Redeploy** to start the redeployment. |
39 | 40 |
|
40 |
| - :::image type="content" source="./media/how-to-reset-and-redeploy-vm/reset-single-vm-confirmation.png" alt-text="Screenshot that shows the confirmation dialog for resetting a single VM in the Lab Services web portal."::: |
| 41 | + :::image type="content" source="./media/how-to-reset-and-redeploy-vm/redeploy-single-vm-confirmation.png" alt-text="Screenshot that shows the confirmation dialog for redeploying a single VM in the Lab Services web portal."::: |
41 | 42 |
|
42 |
| -Alternatively, if you have permissions across multiple labs, you can reset multiple VMs for a lab: |
| 43 | +Alternatively, if you have permissions across multiple labs, you can redeploy multiple VMs for a lab: |
43 | 44 |
|
44 | 45 | 1. Go to the [Azure Lab Services website](https://labs.azure.com).
|
45 | 46 |
|
46 | 47 | 1. Select a lab, and then go to the **Virtual machine pool** tab.
|
47 | 48 |
|
48 |
| -1. Select one or multiple VMs from the list, and then select **Reset** in the toolbar. |
49 |
| - |
50 |
| - :::image type="content" source="./media/how-to-reset-and-redeploy-vm/reset-vm-button.png" alt-text="Screenshot that shows the virtual machine pool in the Lab Services web portal, highlighting the Reset button."::: |
| 49 | +1. Select one or multiple VMs from the list, and then select **Redeploy** in the toolbar. |
51 | 50 |
|
52 |
| -1. On the **Reset virtual machine** dialog box, select **Reset**. |
| 51 | + :::image type="content" source="./media/how-to-reset-and-redeploy-vm/redeploy-vm-button.png" alt-text="Screenshot that shows the virtual machine pool in the Lab Services web portal, highlighting the Redeploy button."::: |
53 | 52 |
|
54 |
| - :::image type="content" source="./media/how-to-reset-and-redeploy-vm/reset-vms-dialog.png" alt-text="Screenshot that shows the reset virtual machine confirmation dialog in the Lab Services web portal."::: |
| 53 | +1. On the **Redeploy virtual machine** dialog box, select **Redeploy** to start the redeployment. |
55 | 54 |
|
56 |
| -## Redeploy VMs |
57 | 55 |
|
58 |
| -When you use lab plans, introduced in the [April 2022 Update](lab-services-whats-new.md), you can now also redeploy a lab VM. This operation is labeled **Troubleshoot** in the Azure Lab Services website and is available in the student's view of their VMs. |
| 56 | +You can also redeploy a lab VM by using the [REST api](/rest/api/labservices/virtual-machines/redeploy), [PowerShell](/powershell/module/az.labservices/start-azlabservicesvmredeployment), or the [.NET SDK](/dotnet/api/azure.resourcemanager.labservices.labvirtualmachineresource.redeploy). |
59 | 57 |
|
60 |
| -When you redeploy a lab VM, Azure Lab Services will shut down the VM, move the VM to a new node in within the Azure infrastructure, and then power it back on. You can think of a redeploy operation as a refresh of the underlying VM for your lab. All data that you saved in the [OS disk](/azure/virtual-machines/managed-disks-overview#os-disk) (usually the C: drive on Windows) of the VM will still be available after the redeploy operation. Any data on the [temporary disk](/azure/virtual-machines/managed-disks-overview#temporary-disk) (usually the D: drive on Windows) is lost after a redeploy operation. |
| 58 | +## Reimage a lab VM |
61 | 59 |
|
62 |
| -You can only redeploy a lab VM in the Azure Lab Services website that is assigned to you. |
| 60 | +When you reimage a lab VM, Azure Lab Services shuts down the lab VM, deletes it, and recreates a new lab VM from the original lab template. You can think of a reimage operation as a refresh of the entire VM. |
63 | 61 |
|
64 |
| -You can also redeploy a lab VM by using the [REST api](/rest/api/labservices/virtual-machines/redeploy), [PowerShell](/powershell/module/az.labservices/start-azlabservicesvmredeployment), or the [.NET SDK](/dotnet/api/azure.resourcemanager.labservices.labvirtualmachineresource.redeploy). |
| 62 | +You can reimage a lab VM that is assigned to you. If you have the Lab Assistant, or Lab Contributor role, you can reimage any lab VM for which you have permissions. |
65 | 63 |
|
66 | 64 | > [!WARNING]
|
67 |
| -> After you redeploy a VM, all the data that you saved on the [temporary disk](/azure/virtual-machines/managed-disks-overview#temporary-disk) (D: drive by default on Windows) is lost. |
| 65 | +> After you reimage a lab VM, all the data that you saved on the OS disk (usually the C: drive on Windows), and the temporary disk (usually the D: drive on Windows), is lost. Learn how you can [store the user data outside the lab VM](./troubleshoot-access-lab-vm.md#store-user-data-outside-the-lab-vm). |
68 | 66 |
|
69 |
| -To redeploy a lab VM in the Azure Lab Services website: |
| 67 | +To reimage a lab VM that's assigned to you: |
70 | 68 |
|
71 | 69 | 1. Go to the [Azure Lab Services website](https://labs.azure.com/virtualmachines) to view your virtual machines.
|
72 | 70 |
|
73 |
| -1. For a specific lab VM, select **...** > **Troubleshoot**. |
| 71 | +1. For a specific lab VM, select **...** > **Reimage**. |
74 | 72 |
|
75 |
| - :::image type="content" source="./media/how-to-reset-and-redeploy-vm/redeploy-vms.png" alt-text="Screenshot that shows the Redeploy virtual machine menu option in the Lab Services web portal."::: |
| 73 | + :::image type="content" source="./media/how-to-reset-and-redeploy-vm/reset-single-vm.png" alt-text="Screenshot that shows how to reimage a lab VM in the Lab Services web portal, highlighting the Reimage button."::: |
76 | 74 |
|
77 |
| -1. On the **Troubleshoot virtual machine** dialog box, select **Redeploy**. |
| 75 | +1. On the **Reimage virtual machine** dialog box, select **Reimage**. |
78 | 76 |
|
79 |
| - :::image type="content" source="./media/how-to-reset-and-redeploy-vm/redeploy-single-vm-confirmation.png" alt-text="Screenshot that shows the confirmation dialog for redeploying a single VM in the Lab Services web portal."::: |
| 77 | + :::image type="content" source="./media/how-to-reset-and-redeploy-vm/reset-single-vm-confirmation.png" alt-text="Screenshot that shows the confirmation dialog for reimaging a single VM in the Lab Services web portal."::: |
| 78 | + |
| 79 | +Alternatively, if you have permissions across multiple labs, you can reimage multiple VMs for a lab: |
| 80 | + |
| 81 | +1. Go to the [Azure Lab Services website](https://labs.azure.com). |
| 82 | + |
| 83 | +1. Select a lab, and then go to the **Virtual machine pool** tab. |
| 84 | + |
| 85 | +1. Select one or multiple VMs from the list, and then select **Reimage** in the toolbar. |
| 86 | + |
| 87 | + :::image type="content" source="./media/how-to-reset-and-redeploy-vm/reset-vm-button.png" alt-text="Screenshot that shows the virtual machine pool in the Lab Services web portal, highlighting the Reimage button."::: |
| 88 | + |
| 89 | +1. On the **Reimage virtual machine** dialog box, and then select **Reimage**. |
| 90 | + |
| 91 | +You can also reimage a lab VM by using the [REST api](/rest/api/labservices/virtual-machines/reimage), [PowerShell](/powershell/module/az.labservices/update-azlabservicesvmreimage), or the [.NET SDK](/dotnet/api/azure.resourcemanager.labservices.labvirtualmachineresource.reimage). |
80 | 92 |
|
81 | 93 | ## Next steps
|
82 | 94 |
|
| 95 | +- Learn more about [strategies for troubleshooting lab VMs](./troubleshoot-access-lab-vm.md). |
83 | 96 | - As a student, learn to [access labs](how-to-use-lab.md).
|
84 | 97 | - As a student, [connect to a VM](connect-virtual-machine.md).
|
0 commit comments