Forum Discussion
Recovering student's Lab machine
- Mar 14, 2022
There aren't any options for you to fix this as you don't have access to the underlying Azure resources (vms, etc). You could create a support ticket to see if the engineering team has any options to help you out.
Could you explain a little more about how the student is changing the RDP setting? Are they manually changing the IP from the OS using the network adapter?
As explained in https://docs.microsoft.com/azure/lab-services/classroom-labs-fundamentals, Azure Lab Services uses a load balancer to map {public-ip-for-lab}:{random-port} to {student-vm-private-ip}:3389. You could try logging into the rogue lab VM from template VM using the private ip of the rogue lab VM and reset the private ip back to what ALS expects it to be. You'll need to get the current private ip, username, password from the student. You can get the private ip that Azure Lab Services expects by looking at the 'Virtual machine pool' page for the lab.
As far as backing up student's computer, there are several possibilities for backing up the data, so resetting the VM isn't cause for losing all their data. https://docs.microsoft.com/en-us/azure/lab-services/how-to-prepare-windows-template talks about how to configure OneDrive for the student. https://docs.microsoft.com/en-us/azure/lab-services/how-to-attach-external-storage covers some options for external storage which is useful for classes that require large amounts of data.
Hope that helps,
Elizabeth
- Masih17Feb 14, 2022Copper Contributor
Hi Elizabeth,
Our lab exercises involve IP, DNS, and DHCP configuration. We use nested virtualization with Hyper-V.
However, sometimes, students don't release which machine they are working on and run the configurations on their Azure lab machine and that breaks things.Your solution suggested we "reset the private IP back to what ALS expects". That partially works. Sometimes students don't know the new Private IP that they have assigned, which makes the Remote Desktop connection using the Private IP impossible.
I'm using https://docs.microsoft.com/en-us/azure/lab-services/reference-powershell-module module to see the lab information. I'm wondering if any of the parameters below could be used to access the virtual machine?
Another question is, why Lab Services' virtual machines don't show with regular Get-AzVm command?
There is also no network information, why is that?
I assume these are by design and for security reasons, but could someone please confirm if there is no way around this?
Regards,
Masih
- planetmaherMar 09, 2022
Microsoft
My apologies for the delayed response.
After a student VM is reset, they should be able to connect using the 'connect' button. (The connect button uses the public IP address.) If this is not the case, then this is a product issue I should log with the team.
There are two ways to get the private IP address of a student VM if you want. The Azure Lab Services virtual machine pool page shows private IP addresses for student VMs. (Export list of VMs in Azure Lab Services | Microsoft Docs) The other option is to use the PowerShell module you referred to. The cmdlet that will show rdp info and private IP address is 'Get-AzLabStudentVM'.
Get-AzLabAccount -ResourceGroupName MyResourceGroup -LabAccountName MyLabAccount | Get-AzLab -LabName MyLab | Get-AzLabStudentVm
Does that help? Please let me know if you are still having issues.
Thanks,
Elizabeth
- Masih17Mar 09, 2022Copper Contributorplanetmaher
thank you for your reply.
The reset works fine. But my entire effort is to avoid using it because all the work on that machine will be lost. (details mentioned above)
The two ways that you recommend for checking the private IP works only if the private IP hasn't been changed. If the private IP changes, because of the reason I explained earlier, the labs front end and PowerShell both still show the initial IP, not the new one.