SOLVED

Recovering student's Lab machine

%3CLINGO-SUB%20id%3D%22%5C%26quot%3Blingo-sub-3161977%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3ERecovering%20student's%20Lab%20machine%26lt%3B%5C%2Flingo-sub%26gt%3B%3CLINGO-BODY%20id%3D%22%5C%26quot%3Blingo-body-3161977%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CP%3E%3CSPAN%3EHi%20All%2C%26nbsp%3B%26lt%3B%5C%2FSPAN%26gt%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%26lt%3B%5C%2FSPAN%26gt%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOur%20organization%20is%20using%20Azure%20Lab%20Services%20and%2C%20we%20are%20seeking%20advice%20on%20a%20problem%20we%20are%20facing.%26nbsp%3B%26lt%3B%5C%2FSPAN%26gt%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20problem%20happens%20when%20students%20mistakenly%20modify%20the%20connection%20of%20their%20Lab%20machine.%20Understandably%2C%20changing%20the%20IP%20setting%20makes%20the%20RDP%20string%20obsolete.%20After%20that%2C%20the%20VM%20takes%20like%2045%20minutes%20to%20start%20(sometimes%20it%20fails%20and%20stops%20immediately)%20and%2C%20if%20it%20starts%2C%20the%20remote%20desktop%20is%20not%20possible.%26lt%3B%5C%2FSPAN%26gt%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EOf%20course%2C%20we%20can%20reset%20the%20bad%20VM%20but%2C%20that%20is%20not%20convenient%20because%20they%20will%20lose%20all%20their%20work.%26lt%3B%5C%2FSPAN%26gt%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EMy%20questions%20are%3A%26nbsp%3B%26lt%3B%5C%2FSPAN%26gt%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3CUL%3E%3CLI%3E%3CSPAN%3EIs%20there%20absolutely%20no%20other%20way%20to%20access%20a%20machine%20that%20its%20initial%20IP%20address%20has%20changed%3F%26nbsp%3B%26lt%3B%5C%2FSPAN%26gt%3B%26lt%3B%5C%2FLI%26gt%3B%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EIs%20there%20any%20way%20to%20backup%20students'%20lab%20computers%3F%26nbsp%3B%26lt%3B%5C%2FSPAN%26gt%3B%26lt%3B%5C%2FLI%26gt%3B%26lt%3B%5C%2FUL%26gt%3B%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ERegards%2C%26lt%3B%5C%2FSPAN%26gt%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EMasih%26lt%3B%5C%2FSPAN%26gt%3B%26lt%3B%5C%2FP%26gt%3B%26lt%3B%5C%2Flingo-body%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-SUB%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3161977%22%20slang%3D%22en-US%22%3ERecovering%20student's%20Lab%20machine%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3161977%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EHi%20All%2C%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOur%20organization%20is%20using%20Azure%20Lab%20Services%20and%2C%20we%20are%20seeking%20advice%20on%20a%20problem%20we%20are%20facing.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20problem%20happens%20when%20students%20mistakenly%20modify%20the%20connection%20of%20their%20Lab%20machine.%20Understandably%2C%20changing%20the%20IP%20setting%20makes%20the%20RDP%20string%20obsolete.%20After%20that%2C%20the%20VM%20takes%20like%2045%20minutes%20to%20start%20(sometimes%20it%20fails%20and%20stops%20immediately)%20and%2C%20if%20it%20starts%2C%20the%20remote%20desktop%20is%20not%20possible.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EOf%20course%2C%20we%20can%20reset%20the%20bad%20VM%20but%2C%20that%20is%20not%20convenient%20because%20they%20will%20lose%20all%20their%20work.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EMy%20questions%20are%3A%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%3EIs%20there%20absolutely%20no%20other%20way%20to%20access%20a%20machine%20that%20its%20initial%20IP%20address%20has%20changed%3F%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EIs%20there%20any%20way%20to%20backup%20students'%20lab%20computers%3F%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ERegards%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EMasih%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi All, 

 

Our organization is using Azure Lab Services and, we are seeking advice on a problem we are facing. 

 

The problem happens when students mistakenly modify the connection of their Lab machine. Understandably, changing the IP setting makes the RDP string obsolete. After that, the VM takes like 45 minutes to start (sometimes it fails and stops immediately) and, if it starts, the remote desktop is not possible.

 

Of course, we can reset the bad VM but, that is not convenient because they will lose all their work.

 

My questions are: 

 

  • Is there absolutely no other way to access a machine that its initial IP address has changed? 
  • Is there any way to backup students' lab computers? 

 

Regards,

Masih

5 Replies
@Masih,
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

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 this module to see the lab information. I'm wondering if any of the parameters below could be used to access the virtual machine? 

Screenshot 2022-03-09 at 10.13.07.jpg

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

 

@Masih17

 

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

 

@planetmaher

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.
best response confirmed by Masih17 (Occasional Contributor)
Solution

@Masih17 

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.