CREATING A VIRTUAL MACHINE USING AZURE QUICKSTART TEMPLATE
Tags: beginners, tutorial, azure, virtualmachine
Published: 2024-06-24 19:28:56

Azure QuickStart templates serve as a foundation for installing particular solutions or applications on Azure. They are pre-configured Azure Resource Manager (ARM) templates. These templates offer a pre-defined configuration that can be quickly customised to match unique needs, saving time and making the deployment process simpler.

QuickStart templates can be used for web applications, databases, virtual machines, networking configurations, IoT and more solutions in Microsoft Azure.
For today, we will be using a QuickStart template to create a Windows VM.

## **PREREQUISITE**
- Working computer
- Internet connection
- Microsoft Azure account + active subscription

## **PROCEDURE**
### **LOCATE THE CUSTOM DEPLOYMENT SERVICE**
Open the Azure portal and type “QuickStart template” in the search bar at the top. Click on “Deploy a custom template” as seen in the image below.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vjttg4jemwgcdwrnlzud.png)

### **SPECIFYING VM BASIC DETAILS**
On the Custom deployment webpage that loads, select a template as shown in the image below.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4el3h82d1chsar5xdsk4.png)

Enter basic VM details like resource group, region, admin username and password in the “Basic” section. Leave all other parameters as default. Move to the “Review + create” section by clicking on the button that says “Review + create”.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/csm12zslcz37basedenn.png)

Wait for final validation. After successful validation, scroll downwards and click on the “Create” button. There will be a pop-up at the top right showing the status of the deployment.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xpllbpwgrat20xyah2w0.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o1at71nd39t6sdws08bn.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w2g0aupzcuwwhqdqoace.png)

You will be directed to a “Microsoft.Template” page which goes through several phases that you might need to be patient for.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/01z50lk12tqkr5yo1p8w.png)

Click on “Go to resource group”.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ngnx7f9d3jnrsivt4j6.png)


### **CONNECT TO THE VM RESOURCE**
On the resource group page, you can view the list of deployed resources in your resource group.
Search for the virtual machine resource in the list and click on it to view.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vxf8sewq06uiavampxbw.png)

On the VM resource page, click on “Connect”.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u2y8wmlx63nm9fgvn3pc.png)

After the Connect page loads, click on “Select”. You should notice a pop-up on the right hand side of the screen. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eb6k82sxev7omibq2ubi.png)

Wait for the box beneath “Public IP address XXX.XX.XXX.XXX” to transition from “Validating” to “Configured”. Then download the RDP file-this will be used to load the Windows VM.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4v7nxpcd4umr8ramkfel.png)

Load the downloaded file and click on “Connect” on the window that pops up.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/at7raaf99ekre1a0i3b6.png)

Input your password in the next window and affirm on the next couple of windows.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ty6fgarac630mbf2t7w2.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8u9mztisc7o2v8i88lwe.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e5rucvbwol8c77irnxaa.png)

At this point, a VM should be running on your computer.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/85mvwvlz5il2d0zaosrz.png)

We will be going further by installing a Web server role on this VM using PowerShell.
In the VM, click on the Start Menu icon and search for “Windows PowerShell”.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2m9xnudzd9zf1iepjys3.png)

Input this command `Install-WindowsFeature -Name Web-Server -IncludeManagementTools` in the PowerShell environment. You should get results as shown in the image below.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1plkv2yetei04c67iil4.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fmwwgif3r2y414kxvfyn.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j04sj8fjc6z5drh987uz.png)

To test this, head back to the “Connect” page of the VM on Azure portal and copy the “Public IP address” as it will come in handy soon.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hq8pnoqwgybo3023e4nd.png)

Navigate to the network settings of the VM as shown.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l1a1z9bvwphtzbuoheor.png)

On the loaded page, create an inbound port rule using a destination port range of “80” (as we will be trying to connect to a HTTP protocol). Click on “Add”.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hprjg2sblvb9zf6w8k8t.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b8fs3asxbwjjc2rauz5w.png)

Open a blank browser window and input the “Public IP address” that was copied earlier. Then, search.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/01nh2iumsguoatgvloo6.png)

You should have a Windows Server IIS page loaded as shown below.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hyl8z99cps7rc7h90rfa.png)

_Quick and easy, isn't it??_