Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this tutorial, you learn how to automatically shut down virtual machines (VMs) in Azure. The auto-shutdown feature for Azure VMs can help reduce costs by shutting down the VMs during off hours when they aren't needed and automatically restarting them when they're needed again.
Configure auto-shutdown for a virtual machine
Sign in to the Azure portal.
- In the Azure portal, navigate to the virtual machine you want to configure auto-shutdown for.
- In the virtual machine's detail page, select "Auto-shutdown" under the Operations section.
- In the "Auto-shutdown" configuration screen, toggle the switch to "On."
- Set the time you want the virtual machine to shut down.
- If you want to receive notification before shutdown, select "Yes" in the "Send notification before shutdown" option and provide details in "Email Address" or "Webhook URL" as per your choice.
- Select "Save" to save the auto-shutdown configuration.
Note
Remember to configure the time zone to match your requirements, as Coordinated Universal Time (UTC) is the default setting for the time zone.
Clean up resources
If you no longer need the virtual machine, delete it with the following steps:
- Navigate to the virtual machine's Overview page on the left
- Select on "Delete" from the top middle option.
- Follow the prompts to delete the virtual machine.
For more information on how to delete a virtual machine, see delete a VM.
Next steps
Learn about sizes and how to resize a VM:
- Types of virtual machine sizes.
- Change the size of a virtual machine.