Jump to content
  • entries
    142
  • comments
    0
  • views
    87622

Auto Start/Stop an Azure VM (ARM)


proximagr

1133 views

 Share

Auto Start/Stop an Azure VM (ARM)
For Azure VMs that are not needed to be running 24/7, we can use Azure Automation to schedule automatic Stop (Deallocate) and Start. First ensure to reserve resources if needed, such as the Private and the Public IP.
Now lets see how we will Auto Start/Stop an Azure VM (ARM). First create an Automation Account, go to the Azure Portal, expand more services and search for automation. Then click the “Automation Accounts”
img_57f79674629bf.png
At the Automation Accounts press “Add”
img_57f7971d32e98.png
At the Automation Account creation blade provide a Name, the Subscription, the Resource Group, trhe location and if it is the first Automation Account select Yes to create automatically a Run As account
img_57f79753e5566.png
After the creation it will open the new Automation Account’s blade. Here click the “Runbooks”
img_57f798ebe9830.png
We don’t need to write any scripting since there are available Runbooks at the gallery, so select Browse gallery
img_57f79b2079371.png
At the Gallery search for the “Start Azure V2 VMs” and “Stop Azure V2 VMs” Graphical Runbooks.
img_58401f20bd75c.png
img_58401f009cb86.png
Click the Runbook and a the new blade press Import. Type a unique name and press OK
img_58401f7755119.pngimg_58402010139bf.png
After the import, we will be navigated to the Runbook and we need to Publish it in order to be able to use it. At the Runbook’s blade, press “Edit”
img_584020407898d.png
And then press Publish
img_584020edeec41.png
After the Publishing the Runbook is ready to Start and add Schedules. Now lets add Schedules to specify the VM and the schedule that will Start. Press “Schedule”
img_584020f9543f7.png
Press Link a schedule to your runbook and then Create a new schedule
img_5840220ecc774.png
Give a name to the schedule, and then select the Start date and time and the recurrency, at my example it will start the VM everyday at 7:00 am
img_5840244cc1e4b.png
then go to the Parameters and provide the Resourcegroup name and the VM name and press OK.
img_584024c921831.png
The Runbook is ready. Create more Schedules for all needed VMs. And then repeat the process for the “Stop Azure VM V2” runbook and you will have two Runbooks with many Schedules. To test a Runbook press “Start”.
img_584027f614947.png

 

email.pngprint.pngshare_save_171_16.png
The post Auto Start/Stop an Azure VM (ARM) appeared first on Proxima's IT Corner.



Source

 Share

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...