AzureAZ-104

Azure Virtual Machines Explained for AZ-104

A virtual machine in Azure gives you a full operating system running on Microsoft's infrastructure. You control the OS, the software stack, the configuration, and the runtime. That control is also the responsibility: you patch the OS, manage the software, size the machine correctly, and design for availability. The AZ-104 exam goes well beyond basic VM creation. It tests VM size families, disk types, extensions for automation, availability constructs like Availability Sets and Availability Zones, cost optimization with Azure Hybrid Benefit and Spot VMs, and the operational practices that keep VMs running reliably at scale.

9 min
3 sections · 8 exam key points

VM sizes, disk types, and managed disks

Azure organizes VM sizes into families based on the workload they are designed for. General Purpose VMs (B, D, Dsv series) balance CPU and memory for web servers, small databases, and development environments. Compute Optimized VMs (F series) have a high CPU-to-memory ratio for CPU-intensive workloads like batch processing. Memory Optimized VMs (E, M series) have a high memory-to-CPU ratio for large databases and in-memory analytics. Storage Optimized VMs (L series) have high local disk throughput for big data and NoSQL workloads. GPU VMs (N series) include graphics cards for machine learning training, simulation, and rendering.

Managed disks handle the storage layer for VM disks. Azure manages the storage account and redundancy behind the scenes, and you work with a disk resource directly. Standard HDD managed disks use magnetic storage for development, test, and non-critical workloads where cost matters more than latency. Standard SSD offers better consistency than HDD for lightly loaded production workloads. Premium SSD provides high IOPS and low latency for production databases and performance-sensitive applications. Ultra Disk delivers the highest IOPS and lowest latency of any disk type, configurable at the microsecond level, for workloads like SAP HANA or high-frequency trading databases.

Every VM has an OS disk for the operating system, optional data disks for application data, and a temporary disk for page files and swap space. The temporary disk is ephemeral: data on the temporary disk is lost if the VM is stopped or restarted. Never store data you want to keep on the temporary disk. Data disks persist across restarts and can be detached and reattached to other VMs.

Extensions, Hybrid Benefit, Spot VMs, and availability

VM extensions are small applications that run on Azure VMs to automate configuration and management tasks after deployment. The Custom Script Extension downloads and runs scripts on a VM, useful for configuring software after provisioning. The Azure Monitor Agent extension installs monitoring capabilities. The Desired State Configuration (DSC) extension applies and enforces a specific OS configuration. Extensions run after VM creation and integrate with Azure Resource Manager templates and Azure Policy for automated compliance.

Azure Hybrid Benefit lets you apply existing on-premises Windows Server or SQL Server licenses (with Software Assurance) to Azure VMs, reducing the cost of the Windows or SQL license component. For workloads migrating from on-premises environments with existing license agreements, Hybrid Benefit can reduce VM costs by up to 40%. Spot VMs use Azure's unused compute capacity at significant discounts (up to 90% off). The tradeoff is that Azure can evict Spot VMs with 30 seconds notice when it needs the capacity back. Spot VMs are appropriate for fault-tolerant, interruptible workloads: batch processing, rendering, machine learning training, and development environments.

Availability Sets and Availability Zones protect against different failure scenarios. An Availability Set distributes VMs across fault domains (separate physical racks with separate power and networking) and update domains (groups that Azure patches independently). With two VMs in an Availability Set, they are guaranteed to be on different fault domains: a rack failure does not take down both. Availability Zones place VMs in physically separate datacenters within a region, each with independent power, cooling, and networking. Zone failures are more severe than rack failures, so Availability Zones provide stronger protection at the cost of potential cross-zone latency.

How to choose the correct answer

VM size selection: General Purpose for balanced workloads, Compute Optimized for CPU-bound, Memory Optimized for large databases, GPU for ML/rendering.

Premium SSD: required for production database workloads with IOPS requirements. Not available on all VM sizes.

Temporary disk: ephemeral, lost on stop/deallocate. Only for swap and temp files. Never store persistent data.

Azure Hybrid Benefit: apply existing Windows or SQL Server licenses to save on Azure VM costs.

Spot VMs: discounted but evictable. For stateless, interruptible, fault-tolerant workloads.

Availability Set: fault domains protect against rack failures. Update domains protect during planned maintenance.

Availability Zones: physically separate datacenters, higher protection than Availability Sets, slight cross-zone latency.

Stop (deallocated) vs Stop (stopped): deallocated releases compute, you stop paying for the VM SKU. Stopped keeps the compute allocated.

Azure managed disk types

Disk typeStorageMax IOPS/diskBest for
Standard HDDMagnetic500Dev/test, non-critical backups, infrequent access
Standard SSDSSD6,000Light production, web servers, low-traffic databases
Premium SSDSSD20,000Production databases, business-critical applications
Premium SSD v2SSD80,000High-performance databases, configurable per-disk performance
Ultra DiskSSD160,000+SAP HANA, high-frequency trading, extreme IOPS workloads

Key exam facts — AZ-104

  • VM sizes: B/D series (general), F series (compute), E/M series (memory), N series (GPU), L series (storage).
  • Premium SSD: not available on all VM sizes, check compatibility. Required for most production databases.
  • Temporary disk: non-persistent, lost on VM deallocation. Use only for swap/temp files.
  • Availability Sets: fault domains (max 3, default 2) and update domains (max 20, default 5).
  • Availability Zones: 3 zones per supported region, each zone is one or more separate datacenters.
  • Azure Hybrid Benefit: applies BYOL for Windows Server and SQL Server, significant cost reduction.
  • Spot VMs: evictable with 30 seconds notice, up to 90% discount. Not for production critical workloads.
  • VM extensions: run automation post-deployment. Custom Script, Monitor Agent, DSC, antimalware.

Common exam traps

Stopping a VM in Azure means you stop paying for it.

There are two stop states. If you stop (deallocate) a VM, Azure releases the compute resources and you stop paying for the VM SKU, though you continue paying for attached disks and public IP addresses. If you stop a VM without deallocating (stopped but not deallocated), Azure still holds the compute reservation and you continue paying the full VM rate. Always deallocate VMs when you want to stop billing for compute.

An Availability Set with two VMs guarantees that both VMs are always running simultaneously.

An Availability Set guarantees that the VMs are on different fault domains and update domains, meaning they will not both be affected by the same hardware failure or the same planned maintenance window. It does not guarantee availability at the application level. One or both VMs can still fail due to OS issues, application errors, or other non-hardware causes.

Availability Sets and Availability Zones provide the same protection.

Availability Sets protect against rack-level hardware failures and planned maintenance within a single datacenter. Availability Zones protect against entire datacenter failures by placing VMs in physically separate buildings. Zone protection is much broader but may introduce cross-zone latency and requires careful load balancer configuration. Azure SLAs for zone-redundant deployments are higher than for Availability Sets.

Practice this topic

Test yourself on Azure Virtual Machines

JT Exams routes you to questions in your exact weak areas — automatically, after every session.

No credit card · Cancel anytime

Related certification topics