Disk Encryption
SSE · Azure Disk Encryption · encryption at host · Key Vault · disk encryption sets · ADE retirement
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
The four options for managed disks
| SSE | Encryption at host | Azure Disk Encryption (ADE) | Confidential disk encryption | |
|---|---|---|---|---|
| Where it happens | Azure Storage, always on | On the VM host | Inside the guest: BitLocker (Windows), DM-Crypt (Linux) | Binds disk keys to the VM TPM |
| Temp disk encrypted | No | Yes (platform-managed keys only) | Yes | Yes (opt-in) |
| Caches encrypted | No | Yes | Yes | Yes |
| Uses VM CPU | No | No | Yes | Yes |
| Custom images | Yes | Yes | Not for custom Linux images | Yes |
| Customer key control | Disk encryption set (DES) | Disk encryption set (DES) | Key Vault, optional KEK | Disk encryption set (DES) |
| HSM keys | Key Vault Premium and Managed HSM | Key Vault Premium and Managed HSM | Key Vault Premium only | Key Vault Premium and Managed HSM |
- SSE is always on, automatic, covers OS and data disks, uses platform-managed keys by default, costs nothing extra and has no performance impact. It uses 256-bit AES and is FIPS 140-2 compliant. It does not encrypt temp disks or disk caches.
- Temp disks are not managed disks. They are not encrypted by SSE unless encryption at host is enabled. VMs of version 5 and above (Dsv5, Dsv6) encrypt temp disks and ephemeral OS disks at rest automatically.
- Defender for Cloud status: SSE alone is Unhealthy. Encryption at host and ADE are Healthy.
- ADE retires on Sep 15, 2028. Until then it works. After that date, ADE-enabled workloads keep running but encrypted disks fail to unlock after VM reboots. Microsoft recommends encryption at host for new VMs. All ADE VMs, including backups, must migrate before the date.
Azure Disk Encryption
- Supported on Gen1 and Gen2 VMs and on premium storage VMs. Not available on Basic and A-series VMs, v6 series, v7 series or newer, or VMs with less than 2 GB memory.
- Linux: only a subset of Azure-endorsed distros (for example Ubuntu, RHEL, CentOS, Oracle Linux, CBL-Mariner; some SKUs are data disk only, such as SLES 12-SP4). Requires the dm-crypt and vfat modules.
- Linux memory: 2 GB when encrypting data volumes only. 8 GB when encrypting OS and data and root (/) usage is 4 GB or less. Root usage x 2 when root usage is above 4 GB. After OS disk encryption completes, the VM can run with less memory.
- Linux prerequisites: list data disks in /etc/fstab with
nofailand persistent names (UUID), and stop services writing to the data disks. - Windows: do not push group policy that enforces TPM protectors (ADE uses the BitLocker external key protector). Windows Server 2022 and Windows 11 do not support an RSA 2048-bit KEK. Never use BitLocker directly to decrypt an ADE-encrypted disk (data loss risk).
- The VM needs outbound access to an Azure storage endpoint that hosts the extension repository, to the storage account that hosts the VHDs, and to Key Vault.
- A VM encrypted with the earlier Microsoft Entra ID (AAD) app-based ADE must keep using that method.
Key Vault for ADE
- The key vault and the VMs must be in the same Azure region.
- The vault must have disk encryption enabled (access policy Azure Disk Encryption for volume encryption). "Enabled for deployment" and "enabled for template deployment" are different flags; only disk encryption is required for ADE.
- If the vault firewall is on, allow Microsoft Trusted Services under Networking.
- New vaults have soft delete on by default. A pre-existing vault must have soft delete enabled for ADE.
- KEK (optional): must be an RSA key. Elliptic Curve is not supported. The KEK URL must be versioned. The account enabling encryption needs at least reader permissions on the vault. With a KEK, ADE wraps the encryption secrets with it before writing them to Key Vault.
- Key Vault auto-rotation is not compatible with ADE: ADE keeps using the original key. Rotating does not break ADE, but disabling the old key (still used by ADE) does.
ADE order of operations
- 1. Create the resource group and the VM (supported size and OS).
- 2. Create a key vault in the same region with disk encryption enabled (
--enabled-for-disk-encryption). For an existing vault, useaz keyvault update --enabled-for-disk-encryption true. - 3. Optional: create an RSA KEK.
- 4. Enable encryption on the VM. The CLI returns "The encryption request was accepted." Verify with
az vm encryption showorGet-AzVmDiskEncryptionStatus.
Encryption at host
- Encrypts on the VM host: temp disks, ephemeral OS disks and OS/data disk caches are encrypted at rest, and data flows encrypted to Storage. It does not use VM CPU.
- Register the feature once per subscription:
EncryptionAtHostinMicrosoft.Compute. Wait until the state is Registered (can take minutes). - New VM: pick a supported size › Disks pane › tick Encryption at host. For a customer-managed key, choose it under Key management (needs a DES).
- Existing VM: it must be deallocated and reallocated to be encrypted. Disabling it also needs the VM deallocated (VM › Disks › Additional settings › Encryption at host = No).
- Existing scale set: it can be enabled, but only VMs created afterwards are encrypted.
- Supported VM sizes vary and older sizes are unsupported. List them programmatically.
- Cannot be combined with ADE: encryption at host cannot be enabled on a VM or scale set that currently or ever had ADE, and ADE cannot be enabled on disks with encryption at host. Disks currently or previously encrypted with ADE cannot use customer-managed keys.
- Migrating from ADE: no in-place conversion. Create new disks and VMs (downtime). Linux OS disks cannot have ADE disabled, so create a new VM.
Customer-managed keys with a disk encryption set
- A disk encryption set (DES) holds a Key Vault ID and key URL. Creating it makes a system-assigned managed identity, which must be granted access to the vault.
- Envelope encryption: a DEK (AES 256) is wrapped by your RSA key. Rotation re-wraps the DEKs without re-encrypting data.
- Vault requirements: soft delete and purge protection are both mandatory. Managed disks and the key store must be in the same region (the vault may be in a different subscription; cross-tenant needs extra setup). RSA keys of 2048, 3072 or 4096 bits. HSM keys need a Premium vault.
- Portal order: 1. Create the Key Vault (soft delete and purge protection; 90-day default retention). 2. Generate or import an RSA key (portal default RSA 2048). 3. Grant roles on the vault. 4. Create the DES in the same region as the vault, with type Encryption at-rest with a customer-managed key. 5. Open the DES and select the alert to grant its identity permission on the vault. 6. Associate disks or VMs with the DES.
- The DES encryption type cannot be changed afterwards. Create a new DES instead.
- If the customer-managed key is disabled, deleted or expired, VMs using it shut down and will not boot until the key is enabled or replaced. Disk I/O generally starts failing about one hour after.
- Auto key rotation on a DES updates the referencing disks, snapshots and images to the new key version within one hour. VMs are not rebooted.
- Limit: 5,000 disk encryption sets per region per subscription.
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Create a vault for ADE | az keyvault create --name <kv> -g <rg> --location eastus --enabled-for-disk-encryption | New-AzKeyVault -Name <kv> -ResourceGroupName <rg> -Location EastUS -EnabledForDiskEncryption |
| Enable disk encryption on an existing vault | az keyvault update --name <kv> -g <rg> --enabled-for-disk-encryption true | Set-AzKeyVaultAccessPolicy -VaultName <kv> -ResourceGroupName <rg> -EnabledForDiskEncryption |
| Create a KEK | az keyvault key create --name myKEK --vault-name <kv> --kty RSA --size 4096 | Add-AzKeyVaultKey -Name myKEK -VaultName <kv> -Destination HSM -Size 4096 |
| Enable ADE | az vm encryption enable -g <rg> --name <vm> --disk-encryption-keyvault <kv> (add --key-encryption-key myKEK for a KEK) | Set-AzVMDiskEncryptionExtension -ResourceGroupName <rg> -VMName <vm> -DiskEncryptionKeyVaultUrl $KeyVault.VaultUri -DiskEncryptionKeyVaultId $KeyVault.ResourceId (KEK: -KeyEncryptionKeyVaultId -KeyEncryptionKeyUrl) |
| Check ADE status | az vm encryption show --name <vm> -g <rg> | Get-AzVmDiskEncryptionStatus -VMName <vm> -ResourceGroupName <rg> |
| Disable ADE | az vm encryption disable --resource-group <rg> --name <vm> --volume-type all | Disable-AzVMDiskEncryption -ResourceGroupName <rg> -VMName <vm> -VolumeType all |
| Register encryption at host | az feature register --name EncryptionAtHost --namespace Microsoft.Compute, then az feature show | Register-AzProviderFeature -FeatureName EncryptionAtHost -ProviderNamespace Microsoft.Compute, then Get-AzProviderFeature |
| VM with encryption at host | az vm create … --encryption-at-host true; existing VM: az vm update … --encryption-at-host true | Set-AzVMSecurityProfile -VM $vmConfig -EncryptionAtHost $true, then New-AzVM |
| Verify encryption at host | az vm show -g <rg> -n <vm> --query "securityProfile.encryptionAtHost" | (Get-AzVM …).SecurityProfile.EncryptionAtHost |
Exam Tips
Tick each tip once you can answer it without looking.
“Encrypt OS and data disks of a Windows VM with a key you control in Key Vault” → Azure Disk Encryption (BitLocker). Trap: SSE with platform keys is already on and gives no in-guest or Key Vault control.
“ADE on a Linux VM” → DM-Crypt (Windows uses BitLocker). Trap: BitLocker on Linux.
“Where must the Key Vault for ADE be” → In the same region as the VM. Trap: any region, as long as it is reachable.
“az vm encryption enable fails; the vault was created with default options” → Enable the vault for disk encryption (--enabled-for-disk-encryption). Trap: enabling only “for deployment” or “for template deployment”.
“Existing Key Vault for ADE has soft delete off” → Enable soft delete: it is required for ADE. Trap: assuming the new-vault default applies to old vaults.
“Key Vault firewall is on and ADE fails” → Allow Microsoft Trusted Services. Trap: opening the vault to all networks.
“Add an extra key to wrap the ADE secrets” → Create an RSA key encryption key (KEK) and pass --key-encryption-key. Trap: an Elliptic Curve key (unsupported) or an unversioned key URL.
“Basic or A-series VM; enable ADE” → Not supported (also under 2 GB RAM, and v6, v7 or newer).
“Linux VM with 4 GB RAM and root usage of 3 GB; encrypt OS and data disks” → Not enough: 8 GB is needed when root usage is 4 GB or less. Trap: the 2 GB minimum applies only to data-only encryption.
“Encrypt the temp disk and caches without using VM CPU” → Encryption at host. Trap: ADE covers the temp disk but uses VM CPU; SSE does not cover the temp disk.
“Enabling encryption at host fails with a feature error” → Register EncryptionAtHost in Microsoft.Compute and wait for Registered. Trap: enabling it in Key Vault or through a VM extension.
“Enable or disable encryption at host on an existing VM” → Deallocate the VM first. Trap: flipping the setting while the VM runs.
“VM that had ADE before; now you want encryption at host” → Not possible on that VM or its disks: migrate to new disks and a new VM. Trap: disabling ADE and then enabling encryption at host on the same VM.
“Customer-managed keys for managed disks (SSE)” → Key Vault (soft delete and purge protection), RSA key, disk encryption set, grant the DES identity access, associate the disk. Trap: using ADE or a KEK.
“Created a DES with the wrong encryption type” → Create a new DES: the type cannot be changed. Trap: editing the DES.
“Customer-managed key is disabled or expired” → VMs using it shut down and will not boot until the key is enabled or replaced. Trap: Azure switching to a platform-managed key.
“Key Vault key auto-rotation on an ADE VM” → ADE keeps using the original key: do not disable the old key. Trap: assuming ADE follows rotation the way a DES with auto rotation does.
“Recommended option for new VMs (as of Nov 13, 2026)” → Encryption at host: ADE retires on Sep 15, 2028. Trap: ADE as the preferred option.
Sources
- Overview of managed disk encryption options
- Server-side encryption of Azure managed disks
- Azure Disk Encryption for Windows VMs
- Azure Disk Encryption for Linux VMs
- Create and configure a key vault for Azure Disk Encryption
- Create and encrypt a Linux VM with Azure CLI
- Create and encrypt a Windows VM with Azure PowerShell
- Enable end-to-end encryption using encryption at host
- Migrate from Azure Disk Encryption to encryption at host
Checked against Microsoft Learn on November 13, 2026.