Azure virtual machine auto shutdown

This Azure tutorial will discuss the Azure virtual machine auto-shutdown option.

We can set the Azure virtual machine auto shutdown option in the Azure portal.

Azure virtual machine auto-shutdown

Follow the below steps to enable the Azure VM auto-shutdown option.

1. Login to https://portal.azure.com/.

2. Search for Virtual machines.

az vm auto-shutdown

3. You will see the list of VMs created in your Azure subscription. It will show the VM name, Type, Status, ResourceGroup, Location, etc.

azure vm auto shutdown powershell

4. Now click on the VM name. “MyNewVM” in my case. You can see the details of your virtual machine like Public IP address, status, Computer name, Operating system, Size, etc.

azure virtual machine auto shutdown

5. Now, from the left menu, select the “Auto-shutdown” option under the Operations section.

azure vm auto shutdown

6. Now fill in the options below

  • Enabled option as On
  • Scheduled shutdown: Mention the time when you want your VM to shut down in the Scheduled shutdown option automatically,
  • Time zone: Specify your time zone based on the country you belong to.
  • Send notification before auto-shutdown?: Make the option Yes so you will be notified in your email that your virtual machine will be shut down at the specified time.
  • Webhook URL: If you want something to happen in sync with the machine being shut down, you can provide the URL.
  • Email address: You can specify the email id where you will get the notification regarding the shutdown of your virtual machine.
auto shutdown azure vm

7. Before 30 minutes, you will get an email saying your virtual machine will shut down.

azure vm auto shutdown

You can Postpone the Azure VM shutdown schedule for 1 hour or 2 hours from the email itself by clicking on the two links below as shown above

  • Postpone: 1 hour
  • Postpone: 2 hours

After you click on Postpone: 1 hour or Postpone: 2 hours link, a new notification will be sent 30 minutes before the new shutdown time.

You can also click on Skip it by clicking on Skip this instance link.

Suppose you want to disable the notification before auto-shutdown From the below window. In that case, you can select No for the “Send notification before auto-shutdown? ” option and then click the Save button.

azure start stop v2

This is how you can enable the