Azure Labs Services VMs appear in the web UI as still running even if they were shut down

%3CLINGO-SUB%20id%3D%22lingo-sub-2825065%22%20slang%3D%22en-US%22%3EAzure%20Labs%20Services%20VMs%20appear%20in%20the%20web%20UI%20as%20still%20running%20even%20if%20they%20were%20shut%20down%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2825065%22%20slang%3D%22en-US%22%3E%3CP%3EI%20shut%20down%20an%20Azure%20Labs%20Services%20VM%20running%20Ubuntu%20using%20the%20Linux%20'shutdown'%20command%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3Eshutdown%20-h%20now%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EAfter%20a%20suitable%20passage%20of%20time%2C%20the%20VM%20appears%20to%20be%20gone%20and%20it%20no%20longer%20responds%20to%20SSH%20login%20attempts%3B%20however%2C%20the%20Azure%20Labs%20Services%20UI%20still%20shows%20it%20as%20running%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jkuch_uw_0-1633656889144.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316109i3241F35E4533EC01%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jkuch_uw_0-1633656889144.png%22%20alt%3D%22jkuch_uw_0-1633656889144.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20also%20suspect%20that%2C%20though%20this%20VM%20has%20shut%20down%2C%20and%20its%20guest%20OS%20not%20running%2C%20that%20it%20is%20continuing%20to%20eat%20up%20quota%20hours%20despite%20being%20off.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20suspicion%20is%20based%20on%20the%20fact%20that%20I%20shut%20the%20VM%20down%20in%20this%20fashion%20a%20few%20days%20ago%2C%20and%20came%20back%20today%20to%20find%20all%20of%20my%20quota%20hours%20depleted%2C%20when%20I'm%20certain%20I%20wasn't%20logged%20in%20and%20using%20it%20for%20nearly%20that%20many%20hours.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2835818%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Labs%20Services%20VMs%20appear%20in%20the%20web%20UI%20as%20still%20running%20even%20if%20they%20were%20shut%20down%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2835818%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1179237%22%20target%3D%22_blank%22%3E%40jkuch_uw%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20Lab%20Portal%20UI%20is%20the%20place%20to%20look%20to%20see%20if%20you%20are%20using%20(and%20being%20charged%20for)%20time%20or%20not.%26nbsp%3B%20If%20it%20still%20shows%20the%20VM%20as%20running%2C%20then%20you%20are%20using%20time.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20are%20some%20configurations%20where%20Azure%20Lab%20Services%20will%20detect%20that%20your%20VM%20has%20been%20disconnected%20when%20%22automatically%20shutdown%20when%20users%20disconnect%22%20is%20enabled.%26nbsp%3B%20See%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flab-services%2Fhow-to-configure-lab-accounts%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EConfigure%20automatic%20shutdown%20of%20VMs%20in%20Azure%20Lab%20Services%20-%20Azure%20Lab%20Services%20%7C%20Microsoft%20Docs%3C%2FA%3E%26nbsp%3Band%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flab-services%2Fhow-to-enable-shutdown-disconnect%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EConfigure%20automatic%20shutdown%20of%20VMs%20for%20a%20lab%20in%20Azure%20Lab%20Services%20-%20Azure%20Lab%20Services%20%7C%20Microsoft%20Docs%3C%2FA%3E.%26nbsp%3B%20As%20you%20can%20see%20in%20the%20second%20doc%2C%20shutting%20down%20the%20OS%20will%20adversely%20affect%20the%20automatic%20shutdown%20on%20disconnect%20setting.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHowever%2C%20the%20'auto%20shutdown%20on%20disconnect'%20setting%20is%20not%20available%20for%20all%20OSes%20and%2C%20unfortunately%2C%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flab-services%2Fcost-management-guide%23%3A~%3Atext%3DOnly%2520specific%2520distributions%2520and%2520versions%2520of%2520Linux%2520are%2520supported.%2520Shutdown%2520settings%2520are%2520not%2520supported%2520by%2520the%2520Data%2520Science%2520Virtual%2520Machine%2520-%2520Ubuntu%252018.04%2520image.%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EDSVM%20is%20one%20of%20the%20unsupported%20Oses%3C%2FA%3E.%26nbsp%3B%20If%20this%20case%2C%20you%20always%20want%20to%20shutdown%20from%20the%20Azure%20Lab%20Services%20portal.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHope%20that%20helps%2C%3C%2FP%3E%0A%3CP%3EElizabeth%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

I shut down an Azure Labs Services VM running Ubuntu using the Linux 'shutdown' command:

shutdown -h now

After a suitable passage of time, the VM appears to be gone and it no longer responds to SSH login attempts; however, the Azure Labs Services UI still shows it as running:

jkuch_uw_0-1633656889144.png

I also suspect that, though this VM has shut down, and its guest OS not running, that it is continuing to eat up quota hours despite being off.

 

My suspicion is based on the fact that I shut the VM down in this fashion a few days ago, and came back today to find all of my quota hours depleted, when I'm certain I wasn't logged in and using it for nearly that many hours.

 

1 Reply

@jkuch_uw,

 

The Lab Portal UI is the place to look to see if you are using (and being charged for) time or not.  If it still shows the VM as running, then you are using time. 

 

There are some configurations where Azure Lab Services will detect that your VM has been disconnected when "automatically shutdown when users disconnect" is enabled.  See Configure automatic shutdown of VMs in Azure Lab Services - Azure Lab Services | Microsoft Docs and Configure automatic shutdown of VMs for a lab in Azure Lab Services - Azure Lab Services | Microsoft....  As you can see in the second doc, shutting down the OS will adversely affect the automatic shutdown on disconnect setting.

 

However, the 'auto shutdown on disconnect' setting is not available for all OSes and, unfortunately, the DSVM is one of the unsupported Oses.  If this case, you always want to shutdown from the Azure Lab Services portal.

 

Hope that helps,

Elizabeth