Skip to content

Commit 127c1fa

Browse files
authored
Merge pull request #220555 from ntrogh/als-reset-vm
[Azure Lab Services] Added concept article for troubleshooting a lab VM
2 parents bfefe76 + c3aab28 commit 127c1fa

File tree

7 files changed

+154
-13
lines changed

7 files changed

+154
-13
lines changed

articles/lab-services/TOC.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
href: connect-virtual-machine-chromebook-remote-desktop.md
232232
- name: Connect to Linux VM using X2Go
233233
href: connect-virtual-machine-linux-x2go.md
234-
- name: How to troubleshoot a VM
234+
- name: Troubleshoot a lab VM
235235
href: how-to-reset-and-redeploy-vm.md
236236
- name: Set or reset passwords for VMs
237237
href: how-to-set-virtual-machine-passwords-student.md
@@ -289,6 +289,10 @@
289289
href: how-to-setup-lab-gpu-1.md
290290
- name: Az.LabServices PowerShell module for lab accounts
291291
href: reference-powershell-module.md
292+
- name: Troubleshoot & debug
293+
items:
294+
- name: Troubleshoot lab VM Access
295+
href: troubleshoot-access-lab-vm.md
292296
- name: Reference
293297
items:
294298
- name: .NET

articles/lab-services/how-to-reset-and-redeploy-vm.md

Lines changed: 61 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,82 @@
11
---
22
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
46
ms.topic: how-to
57
ms.author: rosemalcolm
68
author: RoseHJM
7-
ms.date: 01/21/2022
9+
ms.date: 12/06/2022
810
---
911
<!-- 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 -->
1012

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).
1318

1419
## Reset VMs
1520

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).
1765

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.
1968
20-
On the **Reset virtual machine(s)** dialog box, select **Reset**.
69+
To redeploy a lab VM in the Azure Lab Services website:
2170

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.
2372

24-
### Redeploy VMs
73+
1. For a specific lab VM, select **...** > **Troubleshoot**.
2574

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.":::
2776

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**.
2978

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.":::
3180

3281
## Next steps
3382

61.5 KB
Loading
70.1 KB
Loading
58.2 KB
Loading
50.5 KB
Loading
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Troubleshoot lab VM access
3+
titleSuffix: Azure Lab Services
4+
description: Learn the different approaches for troubleshooting lab VMs in Azure Lab Services. Understand how each approach affects user data.
5+
services: lab-services
6+
ms.service: lab-services
7+
author: ntrogh
8+
ms.author: nicktrog
9+
ms.topic: troubleshooting
10+
ms.date: 12/05/2022
11+
---
12+
13+
# Troubleshoot accessing lab VMs in Azure Lab Services
14+
15+
In this article, you learn about the different approaches for troubleshooting lab VMs. Understand how each approach affects your lab environment and user data on the lab VM. There can be different reasons why you're unable to connect to a lab VM in Azure Lab Services, or why you're stuck to complete a course. For example, the underlying VM is experiencing issues, your organization's firewall settings have changed, or a software change in the lab VM operating system.
16+
17+
## Symptoms
18+
19+
To use and access a lab VM, you connect to it by using Remote Desktop (RDP) or Secure Shell (SSH). You may experience difficulties to access your lab VM:
20+
21+
- You're unable to connect to the lab VM from your computer by using RDP or SSH. There might be a problem with the underlying VM, or a network or firewall configuration might prevent you from connecting.
22+
- After connecting to the lab VM, the VM is not working correctly.
23+
24+
## Troubleshooting steps
25+
26+
1. If you're not able to connect to the lab VM with Remote Desktop (RDP) or Secure Shell (SSH):
27+
28+
1. [Redeploy your lab VM](./how-to-reset-and-redeploy-vm.md#redeploy-vms) to another infrastructure node, while maintaining the user data.
29+
30+
This approach might help resolve issues with the underlying virtual machine. Learn more about [redeploying versus resetting a lab VM](#redeploy-versus-reset-a-lab-vm) and how they affect your user data.
31+
32+
1. [Verify your organization's firewall settings for your lab](./how-to-configure-firewall-settings.md) with the educator and IT admin.
33+
34+
A change in the organization's firewall or network settings might prevent your computer to connect to the lab VM.
35+
36+
1. If you still can't connect to the lab VM, [reset the lab VM](./how-to-reset-and-redeploy-vm.md#reset-vms).
37+
38+
> [!IMPORTANT]
39+
> Resetting a lab VM deletes the user data in the VM. Make sure to [store the user data outside the lab VM](#store-user-data-outside-the-lab-vm).
40+
41+
1. After you connect to the lab VM, it's not working correctly.
42+
43+
The lab VM might be malfunctioning as a result of installing a software component, or making a change to the operating system configuration.
44+
45+
1. If the lab VM uses Windows, you might use the Windows System Restore built-in functionality to undo a previous change to the operating system. Verify with an educator or IT admin how to use [System Restore](https://support.microsoft.com/windows/use-system-restore-a5ae3ed9-07c4-fd56-45ee-096777ecd14e).
46+
47+
1. If the lab VM is still in an incorrect state, [reset the lab VM](./how-to-reset-and-redeploy-vm.md#reset-vms).
48+
49+
> [!IMPORTANT]
50+
> Resetting a lab VM deletes the user data in the VM. Make sure to [store the user data outside the lab VM](#store-user-data-outside-the-lab-vm).
51+
52+
## Redeploy versus reset a lab VM
53+
54+
Azure Lab Services lets you redeploy, labeled *troubleshooting* in the Azure portal, or reset a lab VM. Both operations are similar, and result in the creation of a new virtual machine instance. However, there are fundamental differences that affect the user data on the lab VM.
55+
56+
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 and after a VM shutdown.
57+
58+
Learn more about how to [redeploy a lab VM in the Azure Lab Services website](./how-to-reset-and-redeploy-vm.md#redeploy-vms).
59+
60+
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. 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. To avoid losing data on the VM, [store the user data outside the lab VM](#store-user-data-outside-the-lab-vm).
61+
62+
Learn more about how to [reset a lab VM in the Azure Lab Services website](./how-to-reset-and-redeploy-vm.md#reset-vms).
63+
64+
> [!NOTE]
65+
> Redeploying a VM is only available for lab VMs that you created in a lab plan. VMs that are connected to a lab account only support the reset operation.
66+
67+
## Store user data outside the lab VM
68+
69+
When you reset a lab VM, all user data on the VM is lost. To avoid losing this data, you have to store the user data outside of the lab VM. You have different options to configure the template VM:
70+
71+
- [Use OneDrive to store user data](./how-to-prepare-windows-template.md#install-and-configure-onedrive).
72+
- [Attach external file storage](./how-to-attach-external-storage.md), such as Azure Files or Azure NetApp Files.
73+
74+
## Create multiple labs for a course
75+
76+
As students use a lab VM to advance through a course, they might get stuck at specific steps. For example, they're unable to install and configure a software component on the lab VM. To unblock students, you can create multiple labs, based off different template VMs, for each of the key stages in the course.
77+
78+
Learn how to [set up a new lab](./tutorial-setup-lab.md#create-a-lab) and how to [create and manage templates](./how-to-create-manage-template.md).
79+
80+
## Contact us for help
81+
82+
If you have questions or need help, [create a support request](https://ms.portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/overview?DMC=troubleshoot), or ask [Azure community support](/answers/topics/azure-labservices.html).
83+
84+
## Next steps
85+
86+
- As a student, learn how to [reset or deploy lab VMs](./how-to-reset-and-redeploy-vm.md).
87+
- As an admin or educator, [attach external file storage to a lab](./how-to-attach-external-storage.md).
88+
- As an educator, [use OneDrive to store user data](./how-to-prepare-windows-template.md#install-and-configure-onedrive).

0 commit comments

Comments
 (0)