Devtestlab Auto Shut down of VMs not working

11215 6 Reputation points
2022-03-09T10:13:32.163+00:00

Auto shutdown settings are not taking effect. I set specific time, but VMs are not shutting down at the specified time

Azure DevTest Labs
Azure DevTest Labs
An Azure service that is used for provisioning development and test environments.
259 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. kobulloc-MSFT 24,326 Reputation points Microsoft Employee
    2022-03-10T08:48:50.907+00:00

    Hello, @11215 !

    When troubleshooting auto-shutdown in Azure DevTest Labs, you'll want to look at the configuration of the lab. Here, I've created a lab with auto-shutdown enabled:

    1. Go to your DevTest Labs resource
    2. Select Configuration and policies
    3. Under Schedules, select Auto-shutdown
    4. Set Enabled to On
    5. Enter a Scheduled shutdown time and confirm the Time zone
    6. Click Save

    181788-image.png

    If the virtual machine is running during the scheduled shutdown time, it will now automatically shutdown. You can see from the screenshot above that I've set the auto-shutdown for 12:00am.

    Here is a VM at 11:59pm. You can see that it's running:

    181756-image.png

    Here is the same VM at 12:01am. You can see that it's in the process of shutting down:

    181851-image.png

    Here is the same VM at 12:02am. You can see that the VM has shutdown and is no longer allocated:

    181748-image.png

    What might interrupt this process?

    • Users are able to opt out or set schedules: Go to your DevTest Labs resource > Configuration and policies > Schedules / Auto shutdown policy, and make sure that the user control matches what you intended.
    • Check your lab configuration: Go to your DevTest Labs resource > Configuration and policies > Schedules / Auto-shutdown, and make sure that Enabled is set to On, the time is correct, and the time zone is correct.
    • Check your VM configuration: Go to your DevTest Labs resource > My Lab / All resources > Click on the VM > Operations / Auto-shutdown, and make sure that Enabled is set to On, the time is correct, and the time zone is correct.
    • Toggle auto-shutdown off and on: If there have been changes, this may help restore a broken relationship with the configuration.
    • Check the state of the VM: Check the VM to see if there is anything that might be preventing it from turning off.

    If you have tried everything above and are still running into issues getting auto-shutdown to work, let us know so we can troubleshoot this further.

    181853-image.png

    0 comments No comments

  2. 11215 6 Reputation points
    2022-03-22T08:41:40.687+00:00

    Thanks for the response and I will follow the steps to see if it could work in my side. If the issue fixed. I will accept the answer. Thanks again!