Azure Virtual Machines is Microsoft's infrastructure-as-a-service compute offering. It runs Windows or Linux servers on demand, and you control the operating system, disks, networking and installed software. VMs are the right choice when you need full control of the server or are moving existing workloads to the cloud without rewriting them.

Most posts here are hands-on. Several Terraform labs provision Azure VMs: with the terraform-azurerm-compute and virtual-machine modules, with file, remote-exec and local-exec provisioners on a Windows VM, and with count to create multiple Linux VMs behind a load balancer. Other guides build custom VM images with HashiCorp Packer, walk through adding data disks in the portal, and introduce related services such as Azure Automanage and Azure Lab Services.

For design decisions, two tutorials compare Azure compute options so you can tell when a VM fits better than other services. The AZ-104 exam guide is useful for administrators preparing for certification, and the material as a whole helps cloud engineers who build and manage VM infrastructure.

Start here

Latest Azure Virtual Machines articles

Terraform: Azure VM using terraform-azurerm-compute Module

The example above uses the community Azure/compute/azurerm and Azure/network/azurerm Terraform modules to build one Linux VM and one Windows VM in Azure. Both share a virtual network…

Read More

Terraform: Azure VM using virtual-machine Module

This tutorial uses the community kumarvna/virtual-machine/azurerm module from the Terraform Registry to deploy two Windows Server 2019 VMs into an existing Azure resource group, virtual network and…

Read More

Terraform: Create Azure Windows VM with file, remote-exec & local-exec provisioner

This page shows how to create an Azure Windows Server VM with Terraform and run all three provisioner types on it: file copies a script to the…

Read More

Terraform: Example Code for Create Multiple Azure Linux Vms

This page shows how to create several Azure Linux virtual machines from one Terraform configuration by using the count meta-argument. The VMs sit behind a load balancer…

Read More

Microsoft Certified: Azure Administrator Associate – Exam AZ-104: Microsoft Azure Administrator

The Exam AZ-104: Microsoft Azure Administrator is part of the Microsoft Certified: Azure Administrator Associate certification. This exam assesses your capability in several technical tasks including managing…

Read More

Azure: How to add extra storage Disk to Azure VM?

Prerequisites: Step 1: Sign in to the Azure portal Step 2: Locate your Virtual Machine Step 3: Add a Data Disk Step 4: Attach the Data Disk…

Read More

Azure Storage: FAQ

Can u attach azure vm or you can’t attach disks to a running VM? No, you cannot attach a data disk to an Azure virtual machine that…

Read More

Terrafrom Tutorials – remote-exec provisioner using AWS & Azure providers

the remote-exec provisioner in Terraform is used to execute commands remotely on a target resource after it’s been created. This is often used for post-deployment configuration or…

Read More

Hashicorp Packer Tutorial: Creating Azure Vm Image

Create Azure resource group Build Packer image Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences,…

Read More

System Design Tutorials: Choose Azure Compute Services

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Azure Tutorials: Choose an Azure compute service that best fits what you need?

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

What is Microsoft Azure Virtual Machine?

Friends, Today, In this blog, I’m going to let you know about Microsoft Azure Virtual Machine. First of let’s know what is Azure? Azure offers a large…

Read More

What is Azure Automanage?

Hi guys, today we will discuss about Azure Automanage.  What are the roles and responsibilities of an Azure Automanager? But before moving to the topic, we should…

Read More

What is Azure Lab Services?

Microsoft released in February 2019 a new service called Azure Lab service. Azure Labs is a cloud based computer lab Created by Microsoft that allows schools and…

Read More

Terraform: Create Azure Linux/Windows VM with file, remote-exec & local-exec provisioner

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Terraform Example Program to Create Azure Linux VM

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Terraform Assignment: Azure Creating Linux VM with a Image using Data Sources

Output all the UBUNTU VM Image from Azure from one region but Use one of these image in Creating VM. Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE,…

Read More

Terraform Project – Assignment – Exercise – Lab#2: Modules

How to submit Assignment? Please submit assignment @https://www.debug.school/ and POST url share in the comments of this post. Project 1 – Create a terraform Module in which…

Read More

Azure Virtual Machines: frequently asked questions

When should I use an Azure VM instead of App Service or containers?

Use a VM when you need full control of the operating system, custom software or a lift-and-shift migration. Managed options like App Service or containers cut down maintenance work when your application can run on them.

How do I add a data disk to an Azure VM?

In the Azure portal, open the VM, go to Disks, and create or attach a data disk. You can also use az vm disk attach. Then initialize, format and mount the disk inside the guest operating system.

Can Terraform create Azure virtual machines?

Yes. The azurerm provider includes resources such as azurerm_linux_virtual_machine and azurerm_windows_virtual_machine, and community modules wrap them along with the networking resources they need.

What is Packer used for with Azure VMs?

HashiCorp Packer builds custom VM images with your software and configuration already installed, so new VMs start from a consistent, prepared image.