Skip to content

Commit 0c20a22

Browse files
Merge pull request #264855 from modularity/troubleshoot-connect-lab-vm
Troubleshoot connect lab vm
2 parents c127b4e + e83d014 commit 0c20a22

File tree

3 files changed

+200
-1
lines changed

3 files changed

+200
-1
lines changed

articles/lab-services/TOC.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,10 @@
292292
items:
293293
- name: Troubleshoot lab creation
294294
href: troubleshoot-lab-creation.md
295-
- name: Troubleshoot lab VM Access
295+
- name: Troubleshoot lab VM access
296296
href: troubleshoot-access-lab-vm.md
297+
- name: Troubleshoot lab VM connection
298+
href: troubleshoot-connect-lab-vm.md
297299
- name: Reference
298300
items:
299301
- name: .NET
23.1 KB
Loading
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
---
2+
title: Troubleshoot connectivity issues with Azure Lab Services
3+
titleSuffix: Azure Lab Services
4+
description: Learn how to troubleshoot common connectivity issues with Azure Lab Services.
5+
services: lab-services
6+
ms.service: lab-services
7+
author: modularity
8+
ms.author: ladunlap
9+
ms.topic: troubleshooting
10+
ms.date: 02/07/2024
11+
#customer intent: As an Azure Lab Services user, I want to troubleshoot connectivity issues so that I can access my virtual machines.
12+
---
13+
14+
# Troubleshoot connectivity issues with Azure Lab Services
15+
16+
This article provides guidance on how to troubleshoot common connectivity issues with Azure Lab Services.
17+
18+
> [!IMPORTANT]
19+
> Azure Lab Services is a managed offering where some of the backing resources for a Lab are not directly accessible. This impacts the ability to utilize other Azure VM troubleshooting guides like [Troubleshoot RDP connections on an Azure Virtual Machine](/troubleshoot/azure/virtual-machines/troubleshoot-rdp-connection).
20+
21+
## Slow connection speed
22+
23+
#### Symptoms
24+
25+
- Slow Remote Desktop Protocol (RDP) connection
26+
27+
#### Causes
28+
29+
- Specific lab VM
30+
- Use of VPN
31+
- Firewall on the network
32+
- Specific Internet Service Provider (ISP)
33+
34+
#### Resolution
35+
36+
- Quantify the RDP connection speed
37+
38+
The utility PsPing can be used to measure the response time to the machine. Steps are included in the blog [How to ensure the best RDP experience for lab users](https://techcommunity.microsoft.com/t5/azure-lab-services-blog/how-to-ensure-the-best-rdp-experience-for-lab-users/ba-p/2813369)
39+
40+
- Determine the scope of the problem:
41+
42+
- Is it a specific machine
43+
- Is there a VPN being used
44+
- Is it slow on a specific network
45+
- Is there a firewall on the network
46+
- Is it slow with a specific ISP
47+
48+
##### Specific machine
49+
Adjust the [settings in the client experience](/windows-server/administration/performance-tuning/role/remote-desktop/session-hosts#client-experience-settings) to reduce the volume of data being transmitted.
50+
51+
##### Use of VPN
52+
A good troubleshooting step is to turn off the VPN to see if that improves the connection speed. If it's the VPN and it's required, then review the VPN settings and configuration to possibly allow RDP or SSH connections to be 'passed through' connections aren’t routed to distant regions or routed incorrectly.
53+
54+
##### Specific network or firewall
55+
A network can affect the connectivity to Azure Lab Services, from an enterprise level network to a student's home router/Wi-Fi combination. For example, a students’ home router might have built-in firewalls that block or limit the RDP/SSH connections. Check if there's a firewall enabled on the network and if it's configured to limit the RDP/SSH connections.
56+
57+
##### Specific internet service provider (ISP)
58+
It isn't common to have multiple ISPs to connect to. If the slowdown is on a specific network and other options were explored, then you might want to contact your ISP to see if they have any limiters on RDP/SSH connections.
59+
60+
## Can't connect to the remote computer
61+
62+
#### Symptoms
63+
64+
- Students receive the message, "Remote Desktop can't connect to the remote computer … Make sure the remote computer is turned on and connected to the network, and that remote access is enabled"
65+
66+
:::image type="content" source="./media/troubleshoot-connect-lab-vm/rdp-error-cannot-connect-remote.png" alt-text="Modal for Remote Desktop Connection that shows an error stating that 'Remote Desktop can't connect to the remote computer … Make sure the remote computer is turned on and connected to the network, and that remote access is enabled'":::
67+
68+
#### Causes
69+
70+
- The virtual machine that the students are trying to connect to isn't running
71+
- The lab VM might still be starting
72+
- Idle settings can affect lab VM connections
73+
74+
#### Resolution
75+
76+
Open the [Lab portal](https://labs.azure.com) and check that the virtual machine shows as running. If it's not running, the student can start the virtual machine from their lab portal. It might take between 2 to 5 minutes to get the machine fully running.
77+
78+
Adjusting the [lab automatic shutdown settings](/azure/lab-services/how-to-enable-shutdown-disconnect) might improve the student connection experience. Since turning on and off the virtual machine takes time, adjusting the settings can decrease the chances of the student trying to connect while the machine is changing state. The automatic shutdown settings are part of a cost savings strategy, though they might need to be adjusted to improve the student experience.
79+
80+
- Shut down idle virtual machines: If the duration is too short, there might not be enough time from when the student starts the machine and then connects, or if the student isn't active (in-classroom learning for example), the virtual machine might be shut down.
81+
- Shut down virtual machines when users disconnect: If there's too small a time delay, you can run into issues where an accidental disconnect starts a shutdown. Students would need to start the virtual machine again to connect.
82+
- Shutdown virtual machines when users don't connect: If students don't connect to the virtual machine after some time and if the duration is too short, the virtual machine will be shutdown. The timing can affect students starting the virtual machine themselves, or if schedules are used in the lab. Changing the idle setting to a longer duration is an option but has potential cost implications. If schedules are being used, the virtual machines can be started closer to when the class time starts.
83+
84+
85+
## Outbound connection is restricted
86+
87+
#### Symptoms
88+
89+
- The network can be a point of interference when firewalls, switches, routers, or other network appliances block or limit RDP/SSH (3389/22) ports
90+
91+
#### Causes
92+
93+
- Local firewall from a school, university, enterprise, or home network restricting outbound RDP/SSH connections
94+
- Modern routers, especially WiFi 6, have default behavior to block or restrict the RDP/SSH connections
95+
- Operating system restricting outbound RDP/SSH connectivity
96+
97+
#### Resolution
98+
99+
Consider removing the RDP/SSH restriction or add an exemption for the [lab public IP address](/azure/lab-services/how-to-configure-firewall-settings#find-public-ip-for-a-lab), which can be added to the allowlist for the firewall or router.
100+
101+
## Lab connection issue after admin changes
102+
103+
#### Symptoms
104+
105+
- Students are administrators on their lab VM, where they can make system changes including the network configuration
106+
107+
#### Causes
108+
109+
- Updating the IP Address to a static IP instead of specified as a dynamic IP
110+
- Disabling DCHP (preventing automatically getting an IP address)
111+
- Specifying DNS servers
112+
- Updating local user groups and permissions
113+
114+
#### Resolution
115+
116+
A lab template can be set up with a [script to autoreset the networking](https://techcommunity.microsoft.com/t5/azure-lab-services-blog/running-a-powershell-shutdown-script-on-windows-lab-services/ba-p/3273163) on machine shutdown. Otherwise, students or teachers would need to [reimage the lab VM](/azure/lab-services/how-to-reset-and-redeploy-vm#reimage-a-lab-vm), which get them back to a good state.
117+
118+
If custom DNS is needed, use [Advanced Networking](/azure/lab-services/how-to-connect-vnet-injection) and specify custom DNS servers on the virtual network.
119+
120+
## Lab VM unable to connect via outgoing VPN
121+
122+
#### Symptoms
123+
124+
- Students try to use a VPN connection from a student VM and the VPN fails to connect
125+
126+
#### Causes
127+
128+
- The VPN having issues with the Azure Lab Services network configuration
129+
130+
#### Resolution
131+
132+
[!INCLUDE [contact Azure support](includes/lab-services-contact-azure-support.md)]
133+
134+
## Unable to connect to lab VM after deployment
135+
136+
#### Symptoms
137+
138+
- If the lab has a failure the machine connections might not work properly
139+
140+
#### Causes
141+
142+
- The Azure activity log is the most comprehensive list of events and results
143+
144+
#### Resolution
145+
146+
The [activity log](/azure/azure-monitor/essentials/activity-log?tabs=powershell) can be filtered on the resource group that the lab is located in. The events can take a few minutes to be available in the log. These event logs contain more detailed information that can be used for troubleshooting and should be included if a support ticket needs to be created.
147+
148+
## Unable to login with username and password
149+
150+
#### Symptoms
151+
152+
- Unable to connect to lab VM with username and password
153+
- Receive error message 'Your credentials did not work"
154+
155+
#### Causes
156+
157+
- Student using wrong credentials
158+
- Student forgot their password
159+
- Password associated with Azure Compute Gallery image
160+
- Machine was compromised
161+
162+
#### Resolution
163+
164+
##### Student using wrong credentials
165+
Confirm the student is using the correct username and password for their lab VM. If the lab was created with "Use same password for all virtual machines" enabled, then the username and password should be the same for each student.
166+
##### Student forgot their password
167+
If they have a custom password and forgot it, then the student can [reset the password on the machine from the lab](/azure/lab-services/how-to-set-virtual-machine-passwords). Additionally, the student can [reimage the machine](/azure/lab-services/how-to-reset-and-redeploy-vm#reimage-a-lab-vm), but any user data are deleted and not be retrievable.
168+
##### Password associated with Azure Compute Gallery image
169+
If other students can’t login using the common lab username and password and the lab was created using an existing custom image this can be caused by a known [limitation](/azure/lab-services/troubleshoot-access-lab-vm#unable-to-login-with-the-credentials-you-used-for-creating-the-lab). The workaround is to use the username and password when the image was created or reset the password.
170+
##### Machine was compromised
171+
There are situations where a student password is fraudulently changed by a bad actor. The student can reset their password to regain access to the machine, but here are some suggestions to reduce the likelihood of this happening:
172+
- Don't use common passwords and uncheck the use same password option when creating the lab. Having individual specific passwords reduces the scope if the password is compromised
173+
- [Use strong passwords](https://support.microsoft.com/windows/create-and-use-strong-passwords-c5cebb49-8c53-4f5e-2bc4-fe357ca048eb) and secure them
174+
- [Restrict access to the lab](/azure/lab-services/how-to-manage-lab-users?tabs=manual), so that only those students that are in the class can access the machines. By default, the lab is restricted
175+
##### Remote Desktop Gateway
176+
While uncommon, the remote desktop client the students are using can have a Remote Desktop Gateway configured. If so, they would need to enter their gateway credentials first (to authenticate to the gateway) before connecting to their student VM.
177+
178+
## Troubleshooting with Advanced Networking
179+
Some troubleshooting scenarios only apply to labs with [advanced networking](/azure/lab-services/concept-lab-services-supported-networking-scenarios).
180+
181+
#### Missing a Network Security Group
182+
For a lab plan configured with advanced networking, one of the first checks is to confirm that the lab services network subnet has a network security group connected to it. This lets the RDP/SSH connections be allowed through. Without a network security group, all connections are blocked to the virtual machines (template VM and student VMs).
183+
184+
#### Using Azure Virtual Machine RDP Troubleshooting
185+
There are unique troubleshooting techniques with labs that are configured with advanced networking. Advanced networking enables more troubleshooting by creating an Azure Virtual Machine connected directly to the virtual network that the lab plan is connected to. Using this Azure VM (outside of Azure Lab Services), you can use the Azure Virtual Machine RDP Troubleshooting guide, including the in-Azure connection troubleshooter, to determine if the network is configured correctly.
186+
187+
#### NSG Rules are blocking RDP/SSH connections
188+
Using the Azure VM that is connected directly to the virtual network (from the previous section), you can diagnose virtual machine network connectivity directly in the Azure portal. The blocking or limiting of the RDP/SSH connections via security rules can be done at the subnet with a Network Security Group or by using Azure Virtual Network Manager. The easiest way to see the full list of rules is via the Azure Virtual Machine network effective security rules.
189+
190+
#### Default User Defined Route (Route table problem)
191+
Advanced networking allows the network to be customized as needed, including modifying the route table. A user-defined route table directs traffic to the appropriate destinations. There's a special route, the “internet route” (0.0.0.0/0) which directs traffic not bound for another local address to the Internet. Azure Lab Services advanced networking doesn't support updating the ‘next hop’ for the 0.0.0.0/0 route to anything except the internet. Changing this to a specific IP address (for example, directing outbound internet traffic to a firewall or other network appliance) breaks connectivity to the lab by introducing an asymmetric routing issue. When debugging issues, check for a custom route table and make sure that the default route is set to have 0.0.0.0/0 to the Internet.
192+
193+
## Further troubleshooting
194+
195+
If you're still experiencing issues after following the above steps, you might need to collect more data for further troubleshooting. This could include logs from your virtual machine, network trace data, or other relevant information.
196+
197+
[!INCLUDE [contact Azure support](includes/lab-services-contact-azure-support.md)]

0 commit comments

Comments
 (0)