How do I set a automation to stop a VM on weekends & evenings

Bronze Contributor

Hi All,

I want to stop a VM during non working hours which are evenings and weekends, can this been done?

11 Replies

@AB21805 yes you can use the auto-shutdown from the virtual machine blade 

 

eliekarkafy_0-1686216693127.png

 

or you can create a runbook to stop and start VMs based on a schedule 

 

Creating custom runbooks from start/stop VM solution for specific sets of VMs using tags for sequenc...

 

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily.

 

@eliekarkafy 

Hi Thanks for the reply

Start/Stop VMs during off hours - V2 is the only option now which has different options

Any ideas on what to put for them

 

Screenshot 2023-06-08 at 10.37.16.png

The StartStop V2 will create its own resources so you need to define the name of your resources in each

Azure function App Name:
The name of the Azure Function App that will perform the action on the VM(s)

Application Insight Name: The name of the Application Insights instance that will hold the analytics for Start/Stop.
Is the

Azure function app name / insight name just something unique I want to give it not something I have to create prior to the Start/Stop v2?

Does Start/Stop v2 cost?
Correct, the Start/Stop v2 will create their own resources and for sure it cost. if you have a cost concern than you need to use the auto-shutdown from each virtual machine blade or runbooks from the azure automation account which cheaper for sure
Any useful videos to help me schedule a run book to start / stop a VM?
With the azure automation account if It has a public ip is that an security issue?
you mean the VM has a public IP? no security issue running a runbook on your VMs its within your Azure resources
no it asks when created automated accounts if you want it public or private

Also I have done some research and come across azure automation tasks wont this be easier to use? And cheaper?
Its more secure if you choose to link your azure automation account to your VMs privately instead of public. For azure tasks automation its the same concept as it will create an logic app for the task