Cloud  /  Azure

Microsoft Azure 26 guides · updated 2026

Practical guides to Azure compute, networking, storage, and data services — built for engineers running production workloads on Microsoft's cloud.

Azure Virtual Machines: IaaS Compute With Fine-Grained Control and Global Reach

Infrastructure-as-a-Service (IaaS) gives teams ownership of the operating system, runtime, and software stack without buying or racking physical hardware. Azure Virtual Machines is Microsoft’s IaaS compute offering. You pick a machine type, an OS image, a region, and a disk configuration, and within minutes you have a running server that behaves exactly like an on-premises box — except Microsoft owns and maintains the physical host.

This model matters when you need control that Platform-as-a-Service (PaaS) services do not offer: custom kernel modules, specific OS versions, third-party agents, or licensing arrangements tied to a particular OS.


Real-World Scenario

A manufacturing company runs an ERP system from an ISV that requires Windows Server 2019, a specific version of .NET Framework, and a custom ODBC driver. The ISV’s support contract prohibits running on a managed PaaS service. The team provisions a D-series VM in Azure, installs the ERP stack exactly as specified, and maps the shared storage to Azure Files via SMB — replicating the on-premises setup with no ISV support risk.


VM Series and When to Use Each

Azure groups VM sizes into series optimized for different workload profiles:

VM Series Decision Tree
-----------------------
Is the workload CPU-bound (batch, encoding)?
Yes -> F-series (Compute Optimized)
Is it memory-heavy (in-memory DB, SAP HANA)?
Yes -> M-series or E-series (Memory Optimized)
Does it need local NVMe for temp scratch space?
Yes -> L-series (Storage Optimized)
Is it GPU-dependent (ML training, rendering)?
Yes -> NC / ND / NV series (GPU)
Is it a general web/app server or dev box?
Yes -> D-series or B-series (General Purpose)
Is it HPC with RDMA / InfiniBand?
Yes -> H-series (HPC)

The B-series is worth special mention for dev/test: it uses CPU credits, so a burstable B2s is cheap during idle hours but can absorb short CPU spikes for CI jobs or batch scripts.


Availability: Sets vs. Zones vs. Scale Sets

Failure Domain Comparison
--------------------------
Availability Set
VM-1 ── Fault Domain 0 ── Rack A
VM-2 ── Fault Domain 1 ── Rack B
VM-3 ── Fault Domain 2 ── Rack C
(protects against single-rack failures within one data centre)
Availability Zone
VM-1 ── Zone 1 ── Data Centre A
VM-2 ── Zone 2 ── Data Centre B
VM-3 ── Zone 3 ── Data Centre C
(protects against data-centre-level outages; 99.99% SLA)
Virtual Machine Scale Set (VMSS)
Auto-scales instances across zones
Integrates with Load Balancer for traffic distribution

For production workloads, Availability Zones provide the strongest uptime guarantee. Sets are useful in regions that do not yet support Zones, or for lift-and-shift where changing architecture is impractical.


Managed Disks

Azure managed disks abstract the underlying storage account. You choose a tier (Standard HDD, Standard SSD, Premium SSD v2, or Ultra Disk) and Azure handles placement, replication, and IOPS guarantees.

Key points:


VM Extensions

Extensions are small agents or scripts that run inside the VM after provisioning. Common uses:

Extension Examples
------------------
CustomScriptExtension -- Run a PowerShell or bash script on first boot
MicrosoftMonitoringAgent -- Connect VM to Azure Monitor / Log Analytics
AADSSHLoginForLinux -- Allow Azure AD users to SSH without local accounts
DependencyAgentLinux -- Collect service-map data for VM Insights
AzureDiskEncryption -- Enable BitLocker / dm-crypt with Key Vault keys

Extensions are idempotent and re-run on reboot if set to autoUpgradeMinorVersion: true. Use them to avoid baking agent installations into every custom image.


Cost Optimisation: Reserved Instances and Spot VMs

Azure VMs have three pricing modes:

  1. Pay-as-you-go (PAYG) — billed per second, no commitment. Highest unit price.
  2. Reserved Instances (RI) — 1-year or 3-year commitment for a specific VM family and region. Saves up to 72% over PAYG.
  3. Spot VMs — use spare Azure capacity at up to 90% discount. Microsoft can evict with 30 seconds notice. Suitable for stateless batch jobs, rendering, or Kubernetes worker nodes that support graceful drain.

A common pattern is to baseline capacity with RIs for predictable workloads and add Spot VMs in scale sets for burst capacity.


Deploying a VM via Azure CLI

Terminal window
az group create --name prod-rg --location eastus2
az vm create \
--resource-group prod-rg \
--name app-vm-01 \
--image Win2022AzureEdition \
--size Standard_D4s_v5 \
--admin-username azadmin \
--generate-ssh-keys \
--zone 1 \
--os-disk-sku Premium_LRS \
--nsg-rule RDP

Attaching a data disk after creation:

Terminal window
az vm disk attach \
--resource-group prod-rg \
--vm-name app-vm-01 \
--name data-disk-01 \
--size-gb 512 \
--sku Premium_LRS \
--new

Architecture: Multi-Tier Web Application

Internet
|
[Public Load Balancer] (Standard SKU, Zone-redundant)
| |
[Web VM 1] [Web VM 2] <- Availability Zone 1 and 2
| |
[Internal Load Balancer]
| |
[App VM 1] [App VM 2] <- Availability Zone 1 and 2
| |
[Azure SQL Database] <- Zone-redundant managed service
|
[Azure Blob Storage] <- Shared static assets

Each tier sits in its own subnet with a Network Security Group (NSG) that only allows traffic from the tier above it on the specific port required.


Key Interview Points


Best Practices