Microsoft Azure – Setup Auto Startup and Shutdown of an Azure VM
In this article, we will be seeing about how we can set up an auto stop and start of Azure VM/ Azure VMs on schedule time during business off-hours, The main objective of the task is to save the cost of resources that are being used on non-business hours.
Prerequisites:
- Azure VM/Azure VMs
- Log Analytics Workspace
Automation Account to hold the Automation runbooks & configuration used for automating operations and management tasks around Azure and non-Azure resources.
Implementation:
Follow the below steps to setup Auto start-up and auto shutdown of an Azure VM:
Step 1: Login to Azure Portal
Step 2: Search/Go to Automation Accounts and Click on + Create
Select >> Subscription >> Resource Group >> Automation Account Name >> Region and Leave the rest as default values >> Click on Review + Create
Step 3: then Click on resources.
- Navigate to Related Resource >> Start/Stop VM
- Click on Manage the Solution
Step 4: Click on + Create solution
Step 5: In Search the Marketplace >> search for “Start/Stop VMs during off-hours” and Select “Start/Stop VMs during off-hours”
- Click on Create
Step 6: For Add Solution >> Click on *Workspace
- Select OMS Workspace (Log Analytics Workspace) of your Choice
- For Configuration:
- Add the Parameters >> Add Target Resource Group : * (if you want resource group you can select resource group)
Note: * represents every resource group in the subscription.
- In Azure VM Exclude List: none
- Select your preferred Schedule Start Time and Stop Time.
- Email Functionality >> Receive Email Functionality : “Yes” and Add Email Address : “abc@domain.com”
- Click on “OK”
Step 7: Final Step. Click on Create to Provision and apply the configuration changes.
Now, the Selected VM or VMs will start and stop at the scheduled time.
That’s it you are done.
Please Login to comment...