How to automate shutdown and auto start for VMs in Azure ?

Remon Girgis 40 Reputation points
2023-11-25T21:06:56.46+00:00

I have a number of VMs that need to be shutdown at 5:00 PM and started automatically at 8:00 AM.

These virtual machines perform a certain tasks during the day but not required after hours.

Thanks

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,148 questions
{count} votes

Accepted answer
  1. AdamZachary 2,866 Reputation points
    2023-11-25T21:16:51.7366667+00:00

    Hi Ramon,

    To automate the shutdown and auto-start of VMs in Azure at specific times (e.g., shutdown at 5:00 PM and start at 8:00 AM), you can use Azure Automation's Start/Stop VMs during off-hours feature. Here are the steps to achieve this:

    1. Access Azure Automation:
      • Go to the Azure portal and open Azure Automation.
    2. Create Automation Account:
      • If you don't already have one, create a new Azure Automation account.
    3. Deploy Start/Stop VMs Solution:
      • Deploy the "Start/Stop VMs during off-hours" solution. This can be found under the Automation Account.
    4. Configure Schedules:
      • Configure the schedules for starting and stopping the VMs. Specify the times (e.g., stop at 5:00 PM, start at 8:00 AM).
    5. Assign VMs to the Schedules:
      • Assign the VMs to these schedules. You can target specific VMs or resource groups.
    6. Configure Runbooks:
      • The solution includes preconfigured runbooks. You may customize them if needed for more specific control over the VMs.

    Hope this helps!

    Kindly if you find the provided information helpful and it resolves your query, please consider accepting the answer. Your feedback is valuable and helps ensure the quality and relevance of the responses.

    2 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful