What Are Azure Virtual Machines?
An Azure Virtual Machine is an on-demand, scalable computing resource that runs in Microsoft's data centres. It provides the illusion of a dedicated physical computer — with its own CPU cores, RAM, disk storage, and network interface — but it's actually software running on shared physical hardware using a technology called virtualisation.
Azure VMs are an IaaS (Infrastructure as a Service) offering. This means Microsoft manages the physical hardware, the data centre, and the virtualisation layer — but you are responsible for everything inside the VM: the operating system, patches, applications, and configuration.
What You Can Do With Azure VMs
- Run Windows Server or Linux (Ubuntu, Red Hat, CentOS, Debian, and more)
- Install any software — web servers, databases, custom applications
- Configure networking — open/close ports, assign public IPs, join virtual networks
- Scale up (add more CPU/RAM) or scale out (add more VMs)
- Connect via SSH (Linux) or RDP (Windows)
- Attach additional disks for more storage
- Take snapshots and create backups
Key VM Components
When you create an Azure VM, several components are created alongside it. Understanding these is essential for managing VMs effectively.
| Component | What It Is | Notes |
|---|---|---|
| Virtual Machine | The VM itself — CPU and RAM | Billed per second when running |
| OS Disk | The disk containing the operating system | Managed disk, billed even when VM is stopped |
| Network Interface (NIC) | The VM's network connection | Can have multiple NICs |
| Virtual Network (VNet) | The private network the VM lives in | Required — every VM must be in a VNet |
| Public IP Address | Internet-facing IP (optional) | Billed separately, even when not attached |
| Network Security Group | Firewall rules for the VM | Controls inbound and outbound traffic |
| Resource Group | Logical container for all the above | All components should be in the same RG |
VM Families & Use Cases
Azure has dozens of VM sizes organised into families. Each family is optimised for a different workload type. Here are the most important ones:
| Family | Optimised For | Examples | Use Cases |
|---|---|---|---|
| B-series | Burstable, cost-effective | B1s, B2s, B4ms | Dev/test, low-traffic web apps, small databases |
| D-series | General purpose | D2s_v5, D4s_v5 | Web servers, application servers, small databases |
| E-series | Memory optimised | E4s_v5, E8s_v5 | In-memory databases, SAP HANA, large caches |
| F-series | Compute optimised | F4s_v2, F8s_v2 | Batch processing, game servers, analytics |
| N-series | GPU | NC6, NV6 | Machine learning, rendering, video encoding |
| L-series | Storage optimised | L8s_v3, L16s_v3 | High-throughput databases, big data |
| M-series | Memory & compute heavy | M128s | Massive in-memory workloads, SAP HANA |
VMs vs Other Azure Compute Services
Azure offers several compute services. Choosing the right one depends on how much control you need vs how much management overhead you're willing to take on.
| Service | Type | You Manage | Best For |
|---|---|---|---|
| Azure VMs | IaaS | OS, apps, patches, scaling | Full control, lift-and-shift, legacy apps |
| Azure App Service | PaaS | Code and config only | Web apps, APIs, no infrastructure management |
| Azure Functions | Serverless | Just your code | Event-driven, short-lived functions |
| Azure Container Instances | PaaS | Container image | Simple containerised workloads |
| Azure Kubernetes Service | PaaS | App deployments, config | Complex containerised microservices |
VM Pricing Models
Pay-As-You-Go
Billed per second of runtime. Most expensive per hour but no commitment. Best for dev/test, variable workloads, or short-lived VMs.
Reserved Instances (1 or 3 year)
Commit to a VM size and region for 1 or 3 years. Get up to 72% discount vs pay-as-you-go. Best for production VMs that run 24/7 with predictable load.
Spot Pricing
Use Azure's unused capacity at up to 90% discount. Azure can evict your VM with 30 seconds notice. Best for fault-tolerant batch jobs, rendering, or CI/CD agents.
Azure Hybrid Benefit
If you have existing Windows Server or SQL Server licences with Software Assurance, you can use them on Azure VMs — saving up to 49% on Windows VMs.
| Pricing Model | Discount vs PAYG | Commitment | Best For |
|---|---|---|---|
| Pay-As-You-Go | — | None | Dev/test, variable workloads |
| 1-year Reserved | Up to 40% | 1 year | Stable production workloads |
| 3-year Reserved | Up to 72% | 3 years | Long-running, stable workloads |
| Spot | Up to 90% | None (interruptible) | Fault-tolerant batch jobs |
| Hybrid Benefit | Up to 49% | Existing licence | Existing Windows/SQL licences |
VM SLAs
Azure guarantees different levels of uptime depending on how you deploy your VM:
| Deployment | SLA | Annual Downtime |
|---|---|---|
| Single VM (Premium SSD) | 99.9% | ~8.7 hours |
| VMs in Availability Set | 99.95% | ~4.4 hours |
| VMs across 2+ Availability Zones | 99.99% | ~52 minutes |
When to Use Azure VMs
| Scenario | Use VM? | Why |
|---|---|---|
| Lift-and-shift on-prem app to cloud | ✅ Yes | Minimal changes needed, full OS control |
| Legacy app that needs a specific OS version | ✅ Yes | Only VMs give you full OS control |
| Custom software that needs kernel access | ✅ Yes | PaaS abstracts the OS |
| New web app or REST API | ❌ Consider PaaS | App Service is simpler and cheaper |
| Event-driven function that runs occasionally | ❌ Consider Functions | Functions are serverless — no idle billing |
| Custom database with specific config | ✅ Yes | Need OS and DB engine control |