%3CLINGO-SUB%20id%3D%22lingo-sub-1286288%22%20slang%3D%22en-US%22%3EGuide%20to%20controlling%20Windows%20Shutdown%20behavior%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1286288%22%20slang%3D%22en-US%22%3E%3CP%3EAzure%20Lab%20Services%20provides%20several%20cost%20control%20mechanisms%20to%20ensure%20that%20Windows%20virtual%20machines%20(VMs)%20are%20not%20running%20unexpectedly%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Flab-services%2Fclassroom-labs%2Ftutorial-setup-classroom-lab%23set-a-schedule-for-the-lab%22%20target%3D%22_self%22%20data-linktype%3D%22external%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ESet%20a%20schedule%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Flab-services%2Fclassroom-labs%2Fhow-to-configure-student-usage%23set-quotas-for-users%22%20data-linktype%3D%22external%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ESet%20quotas%20for%20users%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Flab-services%2Fclassroom-labs%2Fhow-to-enable-shutdown-disconnect%22%20data-linktype%3D%22external%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EEnable%20automatic%20shutdown%20on%20disconnect%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EEven%20with%20these%20cost%20controls%2C%20there%20are%20situations%20where%20a%20Windows%20virtual%20machine%20(VM)%20may%20unexpectedly%20continue%20to%20run%3B%20and%20as%20a%20result%2C%20deduct%20from%20the%20student's%20quota%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CP%3E%3CSTRONG%3E(Remote%20Desktop%20Protocol)%20RDP%20window%20is%20left%20open%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EWhen%20a%20student%20connects%20to%20their%20machine%20using%20RDP%2C%20they%20may%20inadvertently%20leave%20the%20RDP%20window%20open.%20As%20long%20as%20the%20RDP%20window%20remains%20open%2C%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Eautomatic%20shutdown%20on%20disconnect%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esetting%20will%20never%20take%20effect%20since%20it%20is%20only%20triggered%20after%20the%20RDP%20session%20is%20disconnected.%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3E%3CSTRONG%3EWindows%20shutdown%20command%20is%20used%20to%20turn%20off%20the%20VM%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EA%20student%20may%20use%20Windows%20shutdown%20command%2C%20or%20other%20shutdown%20mechanisms%20provided%20within%20Windows%2C%20to%20turn%20off%20their%20virtual%20machine%20instead%20of%20using%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Flab-services%2Fclassroom-labs%2Fhow-to-use-classroom-lab%23start-or-stop-the-vm%22%20data-linktype%3D%22external%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Lab%20Services'%20stop%20button%3C%2FA%3E.%20When%20this%20happens%2C%20from%20the%20perspective%20of%20Azure%20Lab%20Services%2C%20the%20VM%20is%20still%20being%20used.%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ETo%20help%20you%20prevent%20these%20situations%20from%20happening%2C%20we%20put%20together%20a%20guide%20that%20provides%20steps%20to%20automatically%20shutdown%20an%20idle%20Windows%20virtual%20machine%20and%20remove%20the%20Windows%20shutdown%20command%20from%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EStart%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Emenu.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20title%3D%22Guide%20to%20controlling%20Windows%20Shutdown%20behavior%20in%20Azure%20Lab%20Services.%26nbsp%3B%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flab-services%2Fclassroom-labs%2Fhow-to-windows-shutdown%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EGuide%20to%20controlling%20Windows%20Shutdown%20behavior%20in%20Azure%20Lab%20Services.%26nbsp%3B%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ENote%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EA%20virtual%20machine%20may%20also%20unexpectedly%20deduct%20from%20the%20quota%20when%20the%20student%20starts%20their%20machine%2C%20but%20never%20actually%20connects%20to%20it%20using%20RDP.%20The%20guide%20does%26nbsp%3B%3C%2FSPAN%3E%3CEM%3Enot%3C%2FEM%3E%3CSPAN%3E%26nbsp%3Bcurrently%20address%20this%20scenario.%20Instead%2C%20students%20should%20be%20reminded%20to%20immediately%20connect%20to%20their%20machine%20using%20RDP%20after%20they%20start%20it%3B%20or%2C%20they%20should%20stop%20the%20machine.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EPlease%20give%20it%20a%20read%20and%20let%20us%20know%20if%20you%20have%20any%20feedback%20or%20questions.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E-%20Lab%20Services%20Team%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1286288%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELab%20Services%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Azure Lab Services provides several cost control mechanisms to ensure that Windows virtual machines (VMs) are not running unexpectedly:

Even with these cost controls, there are situations where a Windows virtual machine (VM) may unexpectedly continue to run; and as a result, deduct from the student's quota:

  • (Remote Desktop Protocol) RDP window is left open

    When a student connects to their machine using RDP, they may inadvertently leave the RDP window open. As long as the RDP window remains open, the automatic shutdown on disconnect setting will never take effect since it is only triggered after the RDP session is disconnected.

  • Windows shutdown command is used to turn off the VM

    A student may use Windows shutdown command, or other shutdown mechanisms provided within Windows, to turn off their virtual machine instead of using Azure Lab Services' stop button. When this happens, from the perspective of Azure Lab Services, the VM is still being used.

To help you prevent these situations from happening, we put together a guide that provides steps to automatically shutdown an idle Windows virtual machine and remove the Windows shutdown command from the Start menu.

 

Guide to controlling Windows Shutdown behavior in Azure Lab Services. 

 

Note:

A virtual machine may also unexpectedly deduct from the quota when the student starts their machine, but never actually connects to it using RDP. The guide does not currently address this scenario. Instead, students should be reminded to immediately connect to their machine using RDP after they start it; or, they should stop the machine. 

 

Please give it a read and let us know if you have any feedback or questions.

 

- Lab Services Team