DEV Community

Cover image for HOW TO USE AN AZURE CUSTOM TEMPLATE TO DEPLOY A VIRTUAL MACHINE.
ANDREW ARIGU AYUBA
ANDREW ARIGU AYUBA

Posted on

HOW TO USE AN AZURE CUSTOM TEMPLATE TO DEPLOY A VIRTUAL MACHINE.

Deploying a custom template in Azure refers to the process of using an Azure Resource Manager (ARM) template to provision and configure resources in your Azure environment programmatically. An ARM template is a JSON (JavaScript Object Notation) file that defines the infrastructure and configuration you want to deploy, such as virtual machines, storage accounts, networks, or other Azure services.
Deploying a custom template in Azure means using a JSON file to define and automate the creation of resources like storage accounts or virtual machines. Practically, it’s like handing Azure a detailed instruction manual and letting it build your setup. You start with a template, deploy it via the portal (or tools like Azure CLI/PowerShell), and end up with live resources—all repeatable and customizable.
"Deploying" means taking this template and instructing Azure to create or update the resources as specified in the file. The term "custom" indicates that the template is tailored to your specific needs, either by writing it from scratch or modifying an existing one (e.g., from Azure Quickstart Templates).
There are different ways or options of creating a virtual machine. While Azure portal is most widely used, other options include Azure PowerShell, Azure Mobile app, Command Line Interface(CLI), Azure REST API, Azure Cloud Shell and Azure Resource Manager Templates. An example of Azure Resource Manager Templates is Quickstart Template.
This article will show how to use an azure custom template to deploy a virtual machine.
Let's get started.

STEP 1
On Azure search bar, search and click deploy Custom Template then click on it on the dropdown menu.

Image description

STEP 2
Click on create a window virtual machine under Common templates.

Image description

STEP 3
Create a resource group, enter username and create password. Leave other parameters at default.

Image description

STEP 4
Scroll down and Click on review and create.

Image description

STEP 5
After validation has been passed, click on "Create" and wait for it to be fully deployed.

Image description

STEP 6
Click on go to resource group.

Image description

*STEP 7 *
Go to the Resource group where you have everything that is needed for a virtual machine to be created and click on the virtual machine.

Image description

Finally, you will see the VM status indicating RUNNING.

Image description

## THE END

Top comments (0)