Learn how to deploy virtual machines using Quickstart templates, efficiently monitor workloads, and optimize costs on Azure.
Tags: devops, azure, virtualmachine, cloud
Published: 2024-05-23 17:46:57

Quickstart templates are pre-defined configurations and built-in services used to rapidly deploy resources on the cloud. They are valuable for ensuring consistent deployment, enabling you to repeatedly achieve the same resource type in the same state. Additionally, they allow you to deploy quickly using just one command.
This article will show you how to deploy a virtual machine using a quickstart template on Azure, monitor your resources remotely using the Azure mobile app, and deallocate your unused resources to save costs on Azure.

**Here are the steps for deploying a virtual machine using a quickstart template on Azure.**
Step 1: In the Azure portal search bar, enter "custom template" and select "Deploy custom template", as shown in the image below.
![Step 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3y9pu33gqem16nx1mhuq.png)

Step 2: On the next page, we will be setting up a Windows virtual machine, so select "Create a Windows virtual machine." 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z1r3vp75cuo746o39e9l.png)

Step 3: You will be directed to a page where you can edit the project details. Allocate a resource group name, which is similar to a folder used for organizing and managing your resources. Also, create a username and password for your virtual machine.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ektenm9yh71kbxyr2m99.png)

Step 4: After correctly inputting all the details, click "Review and Create."
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c0vdzcgfm3c50mrc2dno.png)

Step 5: The next page will allow you to review all the attributes of the virtual machine you are about to deploy. Once you have reviewed and are satisfied with them, click on "create."
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qaz1lh5t51z0eyuzycrb.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uu3x42w07xn6zu48jwn6.png)

Step 6: On the following page, you will see a message indicating that the deployment is in progress. You just need to wait until your virtual machine is successfully deployed.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2tmidu6yo5puwk1mdhtj.png)

**How to remotely monitor your resources using the Azure mobile application**

Now that you have learned how to quickly deploy a virtual machine using quickstart templates found on Azure, the next step is to learn how to monitor your workload using the Azure mobile app. This is useful for giving adequate attention to your resources on Azure in case anything unexpected happens.

Step 7: Once the deployment is complete, click on "Go to the resource group," which is where all your resources are stored and managed.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k6p8ln3yp85zpek2u2xj.png)

Step 8: In the list of resources available in the resource group, scroll down to the virtual machine you recently deployed and click on it.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/trr5cqu5u0ptlu4r9ehi.png)

Step 9: On the new page, you'll find information about the virtual machine you just deployed. Navigate to the upper-right section and click "Open in mobile tab." Then, choose to download from Google Play or the App Store, depending on your mobile phone type.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/61umciph7j04kiofa5b6.png)

Step 10: The image below shows how the download page appears on the Google Play Store. Proceed to install.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x3t39hlrdyzi7n3249sh.png)

**How to optimize cost management by deallocating unused virtual machines**  
Cloud computing offers scalability, allowing for quick adjustments to computing resource demands to meet user or business needs. In modern business, there is a shift from capital expenditure to operational expenditure; therefore, all unnecessary costs are removed.
Here in this section, you will be shown how to remove the virtual machine that was deployed if it is no longer in use. This is to prevent it from incurring per hour charges over time.

Step 11: On the Azure dashboard, search for "virtual machines" and click on it. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cgs3cvnu6r9ztskch2sx.png)

Step 12: The next page shows the list of virtual machines that have been created and are running. Here, I can see the virtual machine I recently deployed. Please make sure to click on the virtual machine you are interested in.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r3u6tbgs3ewiaebzq02z.png)

Step 13: You will be directed to a page where you can view the details of the virtual machine. Ensure to click on "Stop" and confirm the action by clicking "Yes" in the pop-up window.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dwydnf07f6vhsju951de.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l5t2owataiwnju8ucfex.png)

Step 14: The next important step is to disassociate the public IP address from the virtual machine. This is to ensure that there are no ongoing costs associated with its use. To begin this process, search for "public IP address" to list all current public addresses still in use on the account.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3s8cix9ny9istj7gnz3m.png)

Step 15: Click on the current public IP address associated with the recently deployed virtual machine. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u1em0a1c470y2dnmmdg5.png)

Step 16: On the next page, which shows information about the public IP address, click on "Disassociate" at the top and confirm by clicking "Yes" on the pop-up window.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ivdu5qpvf60jjisbrjl5.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1vbedal8ommvt2ed819i.png)

You have now successfully stopped your unused virtual machine or resources, preventing any further costs from being incurred.

This article shows how to quickly deploy virtual machines using quickstart templates, monitor resources with your mobile phone from anywhere, and stop unused virtual machines to avoid incurring extra costs. As modern technology continues to evolve, businesses, individuals, and government agencies need to adopt efficient practices for managing compute resources, both in the cloud and on-premises, in order to maximize the value of their cloud spending, regardless of the use case scenario.