Start and Stop Azure Virtual Machine

-> Requirement is to start and stop Azure Virtual Machine as per given schedule. I will be using “Tasks (preview)” within Azure Virtual machine to perform this. This feature utilizes Logic Apps behind the scene to accomplish the tasks.

Stop Virtual Machine using option “Tasks (preview)” – Option 1

-> From Azure portal, open the required virtual machine.

-> Select “Tasks (preview)” under “Automation” and click “Add”,

-> Select “Power off Virtual Machine” and click on “Next : Authentication”,

-> Click on Create and Sign in with the required credentials,

-> You will see below screen once signed in,

-> I have provided a schedule in such a way that the Virtual Machine will be stopped every day at 9:00 PM.

-> Click Create.

Stop Virtual Machine using option “Auto-shutdown” – Option 2

-> From Azure portal, open the required virtual machine.

-> Select “Auto-shutdown” under “Operations”. Click on Save once appropriate details are provided as in below screenshot,

-> You can use either Option 1 or 2 as defined above to automatically stop your Azure Virtual Machine.

Start Virtual Machine using option “Tasks (preview)”

-> From Azure portal, open the required virtual machine.

This image has an empty alt attribute; its file name is image-17-1024x250.png

-> Select “Tasks (preview)” under “Automation” and click “Add”,

-> Select “Start Virtual Machine” and click on “Next : Authentication”.

-> Connections are all connected already, you may have to create it if this is done for the first time,

-> I have created a schedule in such a way that the virtual machine will be started on every weekday from Monday to Friday at 8:45 AM.

-> Lets try opening “Jbswiki-Startup” in Logic Apps and check,

Thank You,
Vivek Janakiraman

Disclaimer:
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.