How to create automated tasks in Azure for Virtual Machines
Welcome to a new blog post for Aleson ITC. Today we will be discussing the creation of Automated Tasks in Azure.
The Automated Tasks preview has recently been available on our Azure virtual machines.
With them, we can execute simple tasks, as we will see below, with a reduced cost plan (consult costs) and with a support of Azure logical applications.
Prerequisites to consider:
1. Have an subscription of Azure
2. Have an Azure Machine
Once we have these two essential requirements, we can start working on the creation of the tasks following the steps that I propose below
1. Automated Tasks Creation
This tool is located within the characteristics of our MV, in the left side menu, in the automation part.
When adding a new task, we will have several options to choose from:
In the second step (Authenticate) we must always connect the resources that ask us with a mail connection. For example:
When selecting our desired task, we will configure the following, depending on the choice:
• Send monthly cost per resource: Where you will select an email to which you want to send the monthly cost of it.
• Unassign virtual machine: A VM is unassigned in a certain time.
• Shut down virtual machine: Shut down a VM in an hour/day on a scheduled basis.
• Start virtual machine: Start a VM at one hour/day on a scheduled basis.
This last one is the most interesting, since until now it was quite complicated and expensive to run the automatic start of a virtual machine. Or you should do it manually.
If you want to have an automated start, at the time and date you want, this is a great option. Comfortable and simple.
From the visualization of the task already performed, it redirects us to the execution history:
These Automated Tasks are supported by the logical applications (Logic Apps) from which we can visualize their architecture and if there has been any error… or otherwise, it has been an existing task.
In addition, we have access to the code that launches the task, templates, parameters, connectors…
And here ends today’s post, I hope it helps you work with Microsoft Azure.
If you work with the Microsoft cloud, I recommend this post:
If you are thinking of migrating to the cloud or need help with the digital transformation of your company, contact us.