Last updated: May 2026
Azure Virtual Machines Beginner AZ-104 ⏱ 13 min read

Azure VM Disks Explained

Every Azure VM has at least one disk — and most production VMs have several. Choosing the wrong disk type can leave you with a slow, unresponsive application or an unnecessarily expensive bill. This page covers every type of disk Azure offers, how to measure disk performance, and exactly which disk to use for each scenario.

What you'll learn OS disks vs data disks vs temp disks · All four disk types (Ultra, Premium SSD, Standard SSD, Standard HDD) · IOPS and throughput explained · How many disks can a VM have · Adding and detaching disks · Disk caching · Disk encryption · Choosing the right disk

Disk Types by Role

Every Azure VM can have three categories of disks:

OS Disk

Every VM has exactly one OS disk. This is where the operating system is installed — Windows or Linux. It's created from the image you selected when creating the VM.

  • Registered as drive C: on Windows, /dev/sda on Linux
  • Default size: 127 GB (Windows) or 30 GB (Linux)
  • Billed even when the VM is deallocated
  • Can be resized, but requires deallocating the VM first

Data Disks

Optional additional disks for storing application data, databases, logs, etc. Best practice is to keep application data separate from the OS disk.

  • Registered as drive D:, E: etc on Windows, /dev/sdc, /dev/sdd etc on Linux
  • Can have multiple data disks per VM (limit depends on VM size)
  • Can be detached and reattached to different VMs
  • Can be up to 32 TB per disk
💡
Why Separate Data from OS? Keeping your application data on a separate data disk means you can: resize or replace the OS disk without touching your data; snapshot just the data disk for backups; detach the data disk and move it to another VM; use a higher-performance disk tier for data without upgrading the OS disk.

Temporary Disk

A local disk that comes with most VM sizes — it's physically on the host machine, not network-attached. This makes it much faster than managed disks, but it's ephemeral — data is lost when the VM is deallocated, restarted, or resized.

  • Drive D: on Windows, /dev/sdb on Linux (mounted at /mnt)
  • Used for temporary data, swap files, scratch space
  • Never store persistent data here — it will be lost
  • Not all VM sizes include a temp disk (look for "d" in the VM name, e.g., D4ds_v5)
⚠️
Common Mistake Many beginners accidentally use the temp disk (D: on Windows) for important data, then lose everything when the VM is restarted. The temp disk is for temporary data only. Persistent data must go on OS disk or data disks.

Disk Storage Types

Azure offers four disk storage tiers, from highest performance to lowest cost:

Disk TypeMax IOPSMax ThroughputUse CaseCost
Ultra DiskUp to 160,000Up to 4,000 MB/sHighest-performance databases, SAP HANAHighest
Premium SSD v2Up to 80,000Up to 1,200 MB/sProduction databases, I/O intensive appsHigh
Premium SSDUp to 20,000Up to 900 MB/sProduction workloads, required for 99.9% SLAMedium-High
Standard SSDUp to 6,000Up to 750 MB/sDev/test, light production, web serversMedium
Standard HDDUp to 2,000Up to 500 MB/sBackups, archives, infrequent accessLowest
ℹ️
SLA Requirement A single VM gets Microsoft's 99.9% uptime SLA only if ALL disks (OS and data) use Premium SSD or better. Standard SSD or HDD = no SLA on single VMs.

IOPS and Throughput Explained

Disk performance is measured by two metrics — understanding them helps you choose the right disk:

IOPS (Input/Output Operations Per Second)

How many read/write operations the disk can handle per second. Matters most for workloads with many small, random reads and writes — like databases (SQL Server, PostgreSQL, MySQL).

Example: A database doing many small transaction reads/writes needs high IOPS. An application reading one large file sequentially needs high throughput, not necessarily high IOPS.

Throughput (MB/s)

How much data the disk can transfer per second. Matters most for workloads moving large sequential data — like video processing, backups, data warehousing, or big file copies.

💡
Simple Rule Database workload → prioritise IOPS → Premium SSD or Ultra Disk
Video / bulk data workload → prioritise throughput → Premium SSD v2 or Ultra Disk
Dev/test or web server → Standard SSD is usually sufficient

Disk Limits per VM

The number of data disks you can attach to a VM depends on the VM size. Here are examples:

VM SizeMax Data Disks
Standard_B2s4
Standard_D4s_v58
Standard_D8s_v516
Standard_D16s_v532
Standard_D32s_v532
Standard_E32s_v532

Disk Caching

Azure allows you to configure caching on managed disks to improve performance. The cache stores frequently accessed data in the VM host's local memory:

Cache SettingBehaviourBest For
Read/WriteCaches both reads and writesOS disk (default for OS disk)
Read-onlyCaches reads, writes go directly to diskData disks with lots of read operations
NoneNo cachingWrite-heavy workloads, databases with their own caching
⚠️
Database Disks For database data files, use None or Read-only caching. For database log files (sequential writes), use None. Databases have their own caching — double-caching can cause inconsistencies.

Disk Encryption

Azure provides multiple levels of disk encryption:

  • Azure Storage Service Encryption (SSE) — All managed disks are encrypted at rest by default using AES-256. This happens automatically with no configuration needed.
  • Azure Disk Encryption (ADE) — Encrypts the OS and data disks inside the VM using BitLocker (Windows) or DM-Crypt (Linux). Keys stored in Azure Key Vault.
  • Customer-Managed Keys (CMK) — Use your own encryption keys stored in Azure Key Vault instead of Microsoft-managed keys.

Adding and Detaching Disks

Azure CLI Add a data disk to a VM
# Add a new 128 GB Premium SSD data disk
az vm disk attach \
  --resource-group myResourceGroup \
  --vm-name myVM \
  --name myDataDisk \
  --new \
  --size-gb 128 \
  --sku Premium_LRS
Azure CLI Detach a data disk from a VM
az vm disk detach \
  --resource-group myResourceGroup \
  --vm-name myVM \
  --name myDataDisk

Choosing the Right Disk

ScenarioRecommended DiskWhy
Production SQL Server databasePremium SSDHigh IOPS, low latency, required for SLA
OS disk for production VMPremium SSDRequired for 99.9% SLA
Dev/test environmentStandard SSDGood balance of cost and performance
Backup/archive storageStandard HDDLowest cost, performance not critical
SAP HANA or highest-perf DBUltra DiskExtreme IOPS and throughput
Log files (sequential writes)Premium SSDConsistent performance for write-heavy logs
💡
AZ-104 Exam Tip Key facts: Premium SSD is required for single-VM 99.9% SLA · Temp disk data is lost on deallocation · Data disks can be detached and moved between VMs · All managed disks are encrypted at rest by default.
📝 Practice Questions
Click an option to check your answer. AZ-104 style questions.
Q1. A developer stores important application data on the temporary disk (D: drive) of a Windows VM. The VM is then deallocated overnight. What happens to the data?
A The data is automatically backed up to Azure Storage
B The data is preserved and available when the VM starts again
C The data is permanently lost — temporary disk data is ephemeral
D The data is moved to the OS disk automatically
Q2. Which disk type is required for a single VM to qualify for Microsoft's 99.9% uptime SLA?
A Standard HDD
B Standard SSD
C Premium SSD
D Ultra Disk only
Q3. What metric matters most when choosing a disk for a high-transaction database workload?
A IOPS (Input/Output Operations Per Second)
B Throughput (MB/s)
C Disk size (GB)
D Number of disks attached
Q4. Are Azure managed disks encrypted at rest by default?
A Yes — all managed disks are encrypted at rest by default using AES-256
B No — encryption must be manually enabled for each disk
C Only Premium SSD disks are encrypted by default
D Only in production environments, not dev/test
Q5. What happens to a data disk when it is detached from a VM?
A The disk and all its data are permanently deleted
B The disk data is archived and a snapshot is created
C The disk becomes unattached but all data is preserved — it can be reattached to another VM
D The disk is automatically moved to cold storage to reduce cost
Comments
Disclaimer: RedKite Cloud is an independent educational resource and is not affiliated with, endorsed by, or officially connected to Microsoft Corporation. All product names, logos, and trademarks are property of their respective owners. Content is written independently for educational purposes only.