← Back to list

STEP BY STEP TO WRITE A BLOG ON DEPLOYING A LINUX VIRTUAL MACHINE USING AN ARM TEMPLATE.EXPORT

What is Azure Resource Manager?

Olufemi Ajayi · 2026-02-18 12:25 · 0 claps · 4.7 min read
#deploy-linux-vm #arm-templates
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud 🔓 · Open Source

STEP BY STEP TO WRITE A BLOG ON DEPLOYING A LINUX VIRTUAL MACHINE USING AN ARM TEMPLATE.EXPORT THE TEMPLATE AND REDEPLOY

What is Azure Resource Manager?

Microsoft Azure uses Azure Resource Manager (ARM) to deploy and manage resources.

An ARM template is a JSON file that defines:

Infrastructure

Configuration

Dependencies

Parameters

This allows repeatable and automated deployments.

PART 1: Deploy a Linux Virtual Machine (Portal Method) Step 1: Login to Azure Portal

Go to:

https://portal.azure.com

Login with your Azure account.

Azure Portal Home Page

Click on virtual machine as shown

Click on virtual machine as shown

Step 2: Create a Virtual Machine

Click Create a Resource

Select Virtual Machine

Click Create

Step 3: Configure Basic Settings

Fill in the following:

Setting Value Subscription Your subscription Resource Group Create new (e.g., RG-Linux-ARM) Virtual Machine Name linux-arm-vm

Region Choose nearest region Image Ubuntu Server 24.04 LTS Size Standard B1s Authentication using passward Username azureuser

comfirmed the password

comfirmed the password

Click Next until Review + Create.

Step 4: Review + Create

Click Review + Create

After validation passes → Click Create

Validation pass and click create to beggin Deployment

Here — Deployment in Progress

After deployment completes:

Click Go to Resource

CLICK GO TO RESOURCE GROUP

CLICK GO TO RESOURCE GROUP

Virtual machine created using Azure portal

Virtual machine created using Azure portal

PART 2: Using ARM Template to create Virtual Machine.

Now we will use quick ARM template.

Step 5: Go to Azure portal search for deploy a custom template

Click deploy a custom template

Click deploy a custom template

click buld your own template in the editor

click buld your own template in the editor

DELETE THE JSON FILETO UPLOAD OR PASTE NEW JSON FILE.

DELETE THE JSON FILETO UPLOAD OR PASTE NEW JSON FILE.

Delete all the existing JSON file on the edit template shown above

EXSTING JSON FILE DELETED

EXSTING JSON FILE DELETED

Replace the blank template with the following quick JSON template generated from Azure learn. It deploys a virtual network with a subnet.

NEW JSON File copy and paste on the portal AND CLICK SAVE.

NEW JSON File copy and paste on the portal AND CLICK SAVE.

After you save the JSON file this shown

After you save the JSON file this shown

Fill new resource group and click review & create

Fill new resource group and click review & create

Click create

Click create

Deployment complete and click go to resource as shown above.

Deployment complete and click go to resource as shown above.

Linux Virtual Machine created using JSON FILE

Linux Virtual Machine created using JSON FILE

On the resource group click deployment to show below page

SUCCESSFUL CREATE A RESOURCE GROUP WITH QUICK ARM TEMPLATE

SUCCESSFUL CREATE A RESOURCE GROUP WITH QUICK ARM TEMPLATE

This is Infrastructure as Code in action.

PART 3: Redeploy Using the ARM Template generated from the Virtual machine resource group

Using ARM Template to create Virtual Machine.

Now we will export the VM configuration as an ARM template.

Step 5: Go to Resource Group

Navigate to the Resource Group you created

On the left menu, click:

Export Template

Step 6: Deploy a Custom Template

The portal can create an ARM template based on the current state of your resource group.

  1. In your resource group( RG-ARM), from the left menu, stroll down click Automation, and then select Export template as shown below

CLICK EXPORT TEMPLATE

CLICK EXPORT TEMPLATE

CLICK DOWNLOAD

CLICK DOWNLOAD

Fill download will popup as shown below.

This shown the download file on your computer as indicated above

This shown the download file on your computer as indicated above

And open the Azure portal search for deploy a custom template

Then on Azure portal click deploy custom template

Then on Azure portal click deploy custom template

Click build your own template in the editor

Click build your own template in the editor

Edit template will shown as below

Delete the existing JSON file on the edit template .

Deploy Custom Template by click on load file to locate the JSON Template file downloaded.

Step 7: Upload Template by click on load file as shown above

Click Load file from download on your computer and click exact template1 to upload as shown

locate the exact file downloaded on your computer

locate the exact file downloaded on your computer

Upload the exported template.json on the download file and

Click Save

Upload JSON file and click save.

Upload JSON file and click save.

On the custom deployment page fill new resource group and other will be generated automatically

click review + create

click review + create

click create

click create

Click go to resource group

Click go to resource group

This shown the resource group of the virtual machine created with the exported template.

Virtual Machine recreated with the exported JSON FILE

Virtual Machine recreated with the exported JSON FILE

Azure will redeploy the infrastructure defined in the ARM template.

Below is the Redeployment Success Page

THIS SHOWN TWO SUCESSFUL DEPLOYMENT AND REDEPLOYMENT IN ONE RESOURCE GROUP

THIS SHOWN TWO SUCESSFUL DEPLOYMENT AND REDEPLOYMENT IN ONE RESOURCE GROUP

What Just Happened?

✔ Created infrastructure manually ✔ Exported its ARM template ✔ Redeployed it using Infrastructure as Code

This is the foundation of:

DevOps

Automation

CI/CD pipelines.


메타데이터
post_id
c0a8dfb9d43a
slug
step-by-step-to-write-a-blog-on-deploying-a-linux-virtual-machine-using-an-arm-template-export-c0a8dfb9d43a
url
https://medium.com/@olufemiba15b/step-by-step-to-write-a-blog-on-deploying-a-linux-virtual-machine-using-an-arm-template-export-c0a8dfb9d43a
canonical_url
https://medium.com/@olufemiba15b/step-by-step-to-write-a-blog-on-deploying-a-linux-virtual-machine-using-an-arm-template-export-c0a8dfb9d43a
author_url
https://medium.com/@olufemiba15b
status
ok
fetched_at
2026-07-08 11:35:31