2.3 Azure Virtual Machines
Key Takeaways
- Azure Virtual Machines (VMs) are IaaS resources that provide full control over the operating system, software, and configuration.
- VMs are organized into series/families optimized for different workloads: general-purpose (D-series), compute-optimized (F-series), memory-optimized (E-series), storage-optimized (L-series), and GPU (N-series).
- VM Scale Sets automatically create and manage a group of identical, load-balanced VMs that scale based on demand.
- Azure Dedicated Hosts provide physical servers dedicated to your organization for compliance requirements.
- VMs support both Windows and Linux operating systems with per-second billing.
Azure Virtual Machines
Quick Answer: Azure Virtual Machines are IaaS compute resources that let you run Windows or Linux workloads in the cloud with full control over the OS. VMs are billed per second and come in families optimized for different workloads (general-purpose, compute-optimized, memory-optimized, etc.).
What Are Azure Virtual Machines?
Azure Virtual Machines (VMs) provide on-demand, scalable computing resources in the cloud. A VM is essentially a software-based computer that runs on physical hardware in an Azure data center. You choose the operating system, install your applications, and manage the VM just like a physical server — but without buying hardware.
VMs are classified as IaaS because you manage the OS, middleware, runtime, and applications. Azure manages the physical hardware, networking, and data center.
VM Families and Series
Azure organizes VMs into families based on workload type. For the AZ-900, you should know the high-level purpose of each family:
| Family | Series | Optimized For | Use Cases |
|---|---|---|---|
| General Purpose | B, D, Ds, Dv5 | Balanced CPU-to-memory ratio | Web servers, dev/test, small databases, light application servers |
| Compute Optimized | F, Fs, Fx | High CPU-to-memory ratio | Batch processing, gaming servers, analytics, CPU-intensive tasks |
| Memory Optimized | E, Es, Ev5, M | High memory-to-CPU ratio | Large databases, in-memory caching (Redis), SAP HANA |
| Storage Optimized | L, Ls | High disk throughput and IOPS | Big data, SQL/NoSQL databases, data warehousing |
| GPU | N, NC, ND, NV | GPU-accelerated computing | Machine learning training, graphics rendering, video encoding |
| High Performance | H, HB, HC | Fastest CPUs with optional RDMA | Scientific simulations, molecular modeling, weather forecasting |
On the Exam: You do not need to memorize specific VM sizes or pricing. Know the PURPOSE of each VM family and which workloads they are designed for.
VM Scale Sets
Azure Virtual Machine Scale Sets (VMSS) let you create and manage a group of identical, load-balanced VMs. The number of VM instances can automatically increase or decrease based on demand or a defined schedule.
Key features:
- Automatic scaling — Add or remove VMs based on CPU, memory, or custom metrics
- Load balancing — Built-in integration with Azure Load Balancer or Application Gateway
- High availability — VMs are automatically distributed across fault domains and update domains
- Identical VMs — All instances run the same OS image and configuration
- Up to 1,000 VMs per scale set (or 600 with custom images)
When to use Scale Sets:
- Web applications with variable traffic
- Batch processing that scales with job queue depth
- Microservices that need to scale independently
Availability Sets
Availability Sets are a logical grouping of VMs that Azure uses to ensure your application remains available during planned and unplanned maintenance events.
| Concept | Description |
|---|---|
| Fault Domain (FD) | A group of VMs that share a common power source and network switch. Azure spreads VMs across fault domains to survive hardware failures. Up to 3 FDs. |
| Update Domain (UD) | A group of VMs that can be rebooted at the same time during maintenance. Azure spreads VMs across update domains so updates don't take down all VMs simultaneously. Up to 20 UDs. |
On the Exam: Availability Sets protect against HARDWARE failures and PLANNED maintenance within a SINGLE data center. Availability ZONES protect against entire DATA CENTER failures.
Azure Dedicated Hosts
Azure Dedicated Host provides a physical server that is dedicated entirely to your organization. No other Azure customers share the physical hardware.
Use cases:
- Compliance — Regulatory requirements demanding dedicated hardware
- Licensing — Bring your own Windows Server or SQL Server licenses (BYOL)
- Control — Control the maintenance schedule of the physical server
Azure Spot VMs
Spot VMs take advantage of unused Azure capacity at deep discounts (up to 90% off). Azure can evict Spot VMs at any time when capacity is needed.
Best for: Batch processing, CI/CD pipelines, dev/test, fault-tolerant workloads
When to Use VMs vs. Other Options
| Scenario | Recommended Service | Why |
|---|---|---|
| Full OS control needed | Azure VMs | IaaS — you manage everything |
| Web app deployment (no OS management) | Azure App Service | PaaS — managed platform |
| Short-lived event-driven code | Azure Functions | Serverless — pay per execution |
| Containerized microservices | Azure Kubernetes Service | Managed container orchestration |
| Desktop virtualization | Azure Virtual Desktop | Managed VDI solution |
Which VM family should you choose for a workload that requires a large amount of RAM, such as an in-memory database?
What do Azure Virtual Machine Scale Sets provide?
What is the difference between Availability Sets and Availability Zones?