MS Azure: VM auto start/shutdown

15,044

Solution 1

I would recomment to you, to read this:

http://azurecorner.com/start-stop-windows-azure-vms-according-time-schedule/

Solution 2

Given that you need more precise control over scheduling than is possible in the Azure VM Auto-Shutdown blade or Azure Dev-Test Labs, you can accomplish startup / shutdown on specific days via RunBooks in an Azure Automation Resource.

  1. Create (or choose an existing) Azure Automation Account resource
  2. In the new Automation resource, go to the Runbooks blade
  3. Click "Browse Gallery"
  4. Search for and import "Stop Azure V2 VMs" and "Start Azure V2 VMs" runbooks
  5. Schedule the new runbooks to run as needed

This walkthrough shows how to setup your runbooks with a specific schedule and parameters to target your virtual machine(s).

Share:
15,044
user9118621
Author by

user9118621

Updated on June 15, 2022

Comments

  • user9118621
    user9118621 almost 2 years

    Is there any way in which I can automate stopping my VM on a Friday and starting this back up again on the Sunday evening at specified times?

    I’m aware this is possible via the VM blade and DevTest labs but their only option is daily, whereas I want this only shut down in the weekends.

    Any input will be greatly appreciated. Thanks