Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Azure Virtual Machine auto-shutdown

Azure Portal Virtual Machine auto-shutdown

This is available to all the ARM-based Azure VMs.

With this feature, setting auto-shutdown can’t be easier simply select the auto-shutdown time and Time Zone in http://portal.azure.com 

  • Go to your VM blade in Azure portal.
  • Click Auto-shutdown in the resource menu on the left-side.
  • You will see an auto-shutdown settings page expanded, where you can specify the auto-shutdown time and time zone. You can also configure to send notification to your webhook URL 15 minutes before auto-shutdown. This post illustrates how you can set up an Azure logic app to send auto-shutdown notification.

Azure Automation with Power Shell

Azure automation by creating a Powershell script which reads from the Azure metrics API. For more details see https://docs.microsoft.com/en-us/azure/automation/automation-scenario-start-stop-vm-wjson-tags At some point you would call the  Virtual Machines API at the right time (and optionally send a notification)  https://codehollow.com/2016/07/automatically-shutdown-virtual-machines-azure/

VMPower

Using 3rd party software such as VMPower. It allows you to set Azure VMs to shutdown based on CPU, Disk, and Network utilization average or maximum values. It also handles sending your team notifications via email and Slack see https://blogs.msdn.microsoft.com/stevenedouard/2017/01/25/how-to-schedule-azure-vm-shutdown-based-on-cpu-disk-network-usage/

Stop Azure Virtual Machine using Azure Automation Runbook

Demonstrates stopping all Microsoft Azure Virtual Machine in a specific Azure subscription. The script could be associated with the new Azure Automation Scheduler to stop Virtual Machines at specific time. Great for developers for saving on Azure Compute, if they forget to shut.

Please refer to the following articles for using JSON based templates for managing machines.

Azure Automation – Using JSON formatted tags to create a week schedule for virtual machine startup and shutdown with Azure Automation Runbooks

Azure Automation scenario: Using JSON-formatted tags to create a schedule for Azure VM startup and shutdown

Example from technet script gallery https://gallery.technet.microsoft.com/scriptcenter/Stop-Azure-Virtual-Machine-0b1fea97/view/Discussions

Azure Automation for Scheduled Startup and Shutdown of ARM Virtual Machines template on Github

https://github.com/ratchetnclank/Invoke-Autoshutdown

https://github.com/blndev/azure-vm-costsaver

Share the post

Azure Virtual Machine auto-shutdown

×

Subscribe to Msdn Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The Msdn Blogs.

Get updates delivered right to your inbox!

Thank you for your subscription

×