Automatic VM shutdown after x minutes

Contributor

Hi

 

I know there is functionality that can do "Scheduled VM shutdown", at a given time.

But I need to automatically set a VM in "Stopped (Deallocated)" after the VM have been running for x minutes (Eg. shutdown after 120 minutes in running state).

 

Is it possible to achieve this? How can i implement this?

 

Br. Rune

1 Reply

Hi Rune,

 

Use Automation Script under resource management and Use Start and Stop runbook for deallocate VM 

 

See this details 

https://docs.microsoft.com/en-us/azure/automation/automation-solution-vm-management

 

 

Best

Sunit Patil