Shutdown Azure VM, only when no one is using it.

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #45316
    Profile photo of prakash rajan
    prakash rajan
    Participant

    Hello Everyone,

    I have scheduled the Start/Shutdown of VM through Azure Automation.Everything works fine.But, When user logged in to the machine and doing some work in the scheduled shutdown time,still it force the VM to shutdown.Is there any way I can tell the script to Shutdown the VM only when no one is connected/using?I have searched for it, but I am unable to get it.

    When I run Get-AzureVM. It provides other information not the one I am looking for.

    Thanks.

    #45408
    Profile photo of Don Jones
    Don Jones
    Keymaster

    No, there isn't really a native way to do that. Azure kind of assumes that machines are "doing work" all the time, even if (as with a server) a user isn't logged in. The most you could probably do is hack together a logon/logoff script. The logon script disables the shutdown, the logoff script re-enables it. But that's going to be unreliable in some instances.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.