|
1 | 1 | ---
|
2 | 2 | title: Troubleshoot a VM in Azure Lab Services
|
3 |
| -description: Learn how to 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. |
| 4 | +services: lab-services |
| 5 | +ms.service: lab-services |
4 | 6 | ms.topic: how-to
|
5 | 7 | ms.author: rosemalcolm
|
6 | 8 | author: RoseHJM
|
7 |
| -ms.date: 01/21/2022 |
| 9 | +ms.date: 12/06/2022 |
8 | 10 | ---
|
9 | 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 -->
|
10 | 12 |
|
11 |
| -# How to troubleshoot a VM |
12 |
| -On rare occasions, you may have problems connecting with a VM in one of your labs. There are some troubleshooting steps you can take as a student to resolve connectivity issues and get back up and running quickly. You can avoid having to escalate the issue to your educator and wait for a solution. |
| 13 | +# Troubleshoot a lab by redeploying or resetting the VM |
| 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. |
| 16 | + |
| 17 | +Learn more about [strategies for troubleshooting lab VMs](./troubleshoot-access-lab-vm.md). |
13 | 18 |
|
14 | 19 | ## Reset VMs
|
15 | 20 |
|
16 |
| -To reset one or more VMs, select them in the list, and then select **Reset** on the toolbar. |
| 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. |
| 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. |
| 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). |
| 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). |
| 29 | +
|
| 30 | +To reset a lab VM in the Azure Lab Services website that's assigned to you: |
| 31 | + |
| 32 | +1. Go to the [Azure Lab Services website](https://labs.azure.com/virtualmachines) to view your virtual machines. |
| 33 | + |
| 34 | +1. For a specific lab VM, select **...** > **Reset**. |
| 35 | + |
| 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 | + |
| 38 | +1. On the **Reset virtual machine** dialog box, select **Reset**. |
| 39 | + |
| 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 | + |
| 42 | +Alternatively, if you have permissions across multiple labs, you can reset multiple VMs for a lab: |
| 43 | + |
| 44 | +1. Go to the [Azure Lab Services website](https://labs.azure.com). |
| 45 | + |
| 46 | +1. Select a lab, and then go to the **Virtual machine pool** tab. |
| 47 | + |
| 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."::: |
| 51 | + |
| 52 | +1. On the **Reset virtual machine** dialog box, select **Reset**. |
| 53 | + |
| 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."::: |
| 55 | + |
| 56 | +## Redeploy VMs |
| 57 | + |
| 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. |
| 59 | + |
| 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. |
| 61 | + |
| 62 | +You can only redeploy a lab VM in the Azure Lab Services website that is assigned to you. |
| 63 | + |
| 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). |
17 | 65 |
|
18 |
| -:::image type="content" source="./media/how-to-reset-and-redeploy-vm/reset-vm-button.png" alt-text="Screenshot of virtual machine pool. Reset button is highlighted."::: |
| 66 | +> [!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. |
19 | 68 |
|
20 |
| -On the **Reset virtual machine(s)** dialog box, select **Reset**. |
| 69 | +To redeploy a lab VM in the Azure Lab Services website: |
21 | 70 |
|
22 |
| -:::image type="content" source="./media/how-to-reset-and-redeploy-vm/reset-vms-dialog.png" alt-text="Screenshot of reset virtual machine confirmation dialog."::: |
| 71 | +1. Go to the [Azure Lab Services website](https://labs.azure.com/virtualmachines) to view your virtual machines. |
23 | 72 |
|
24 |
| -### Redeploy VMs |
| 73 | +1. For a specific lab VM, select **...** > **Troubleshoot**. |
25 | 74 |
|
26 |
| -In the [April 2022 Update](lab-services-whats-new.md), redeploying VMs replaces the previous reset VM behavior. In the Lab Services web portal: [https://labs.azure.com](https://labs.azure.com), the command is named **Troubleshoot** and is available in the student's view of their VMs. |
| 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."::: |
27 | 76 |
|
28 |
| -If you're facing difficulties accessing their VM, redeploying the VM may provide a resolution for the issue. Redeploying, unlike resetting, doesn't cause the data on the OS to be lost. When you [redeploy a VM](/troubleshoot/azure/virtual-machines/redeploy-to-new-node-windows), Azure Lab Services will shut down the VM, move it to a new host, and restart it. You can think of it as a refresh of the underlying VM for your machine. You don’t need to re-register to the lab or perform any other action. Any data you saved in the OS disk (usually C: drive) of the VM will still be available after the redeploy operation. Anything saved on the temporary disk (usually D: drive) will be lost. |
| 77 | +1. On the **Troubleshoot virtual machine** dialog box, select **Redeploy**. |
29 | 78 |
|
30 |
| -:::image type="content" source="./media/how-to-reset-and-redeploy-vm/redeploy-vms.png" alt-text="Screenshot of redeploy virtual machine menu option."::: |
| 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."::: |
31 | 80 |
|
32 | 81 | ## Next steps
|
33 | 82 |
|
|
0 commit comments