DEV Community

Cover image for Steps To Deploy a Linux Virtual Machine using an ARM Template
Chidera Enyelu
Chidera Enyelu

Posted on

1

Steps To Deploy a Linux Virtual Machine using an ARM Template

Deploying a virtual machine (VM) using an Azure Resource Manager (ARM) template involves defining the VM configuration in a JSON template and then deploying that template to Azure.
Here’s a step-by-step guide to help you deploy a linux VM using an ARM template.

Using Azure Portal

  • Go to the Azure Portal. Azure portal
  • On the searchbar, search for "Deploy a custom ARM template"

Image description

  • Click on "select a template",there are several default templates.
  • Select the already made template "Linux VM template" or choose to build your own template in the editor.

Image description

  • Edit the JSON default template you selected or Paste the JSON template you chose to build into the editor and click Save.

Image description

Image description

On the basics tab, select the region, create a resource group, add an admin name and i used SSH Key instead of password and downloaded the key file.

Image description

  • Click Review + Create, review the settings, and click Create.

Image description

Image description

After Deployment of VM

The resources created are displayed in the resource group, choose the virtual machine to check if its running.

Image description

Image description

To connect to the linux VM using SSH key on commandpromt/powershell

  • On the file explorer, find the path to the shh key and copy path

Image description

  • Open your terminals(commandpromt/powershell).
  • Run this commands on your command prompt terminal

code
ssh -i path\to\your\key\your-key.pem username@ip-address

Image description

  • Once connected, you can install either Nginx or jenkins.

NOTE: you can download the template and use the same template to create another virtual machine.
By following these steps, you should be able to deploy a virtual machine using an ARM template in Azure.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay