Lesson 4 of 5 Azure Virtual Machines

Encrypting VMs End to End with Encryption at Host

This lesson explains what server-side encryption leaves unencrypted, how encryption at host closes the gap, and the retirement of Azure Disk Encryption.

Learning outcomes

After completing this lesson, you will be able to:

  • Explain what server-side encryption does and does not cover.
  • Describe how encryption at host works and its prerequisites.
  • Distinguish between encryption at host and Azure Disk Encryption.

What is and is not encrypted by default

Server-side encryption (SSE) encrypts managed disks at rest in Azure Storage with 256-bit AES, using platform-managed keys by default or customer-managed keys in Key Vault through a disk encryption set. SSE does not cover data held on the physical host that runs the VM: the temporary disk, and the OS and data disk caches. It also does not encrypt the data flowing from the host to Storage at the encryption layer.

How encryption at host works

With encryption at host, the VM's host encrypts the temporary disk, the caches and ephemeral OS disks, and data flows encrypted to the Storage service, where it is stored encrypted. Encryption is therefore end to end, uses the same platform-managed or customer-managed keys as the disks, consumes no VM CPU and needs no agent or software in the guest operating system. The steps to use it are summarized below.

  1. Register the feature

    Run az feature register --namespace Microsoft.Compute --name EncryptionAtHost once per subscription, then re-register the Microsoft.Compute provider.

  2. Check the size

    Confirm that the VM size supports encryption at host (most current sizes do).

  3. Enable on the VM

    Select Encryption at host on the Disks tab when creating the VM, or deallocate an existing VM and enable it with az vm update --set securityProfile.encryptionAtHost=true.

  4. Optional: customer-managed keys

    Create a disk encryption set referencing a Key Vault key and select it for the disks.

Azure Policy can audit or require encryption at host on VMs and scale sets. Encryption at host can also be enabled on Virtual Machine Scale Sets.

Put in order

Enabling encryption at host

Exam skills 3.2.2

Arrange the steps to enable encryption at host on an existing VM with customer-managed keys.

Log in to try this activity Interactive activities are free with an account.

Encryption at host and Azure Disk Encryption

Azure Disk Encryption (ADE) encrypts disks inside the guest with BitLocker (Windows) or DM-Crypt (Linux), using keys in Key Vault and a VM extension. ADE is scheduled to retire on 15 September 2028. Microsoft recommends encryption at host for new VMs and migrating ADE VMs before that date; there is no in-place conversion, so migration involves creating new disks and VMs. Encryption at host cannot be enabled on a VM that has, or ever had, ADE enabled. Confidential VMs offer confidential OS disk encryption for workloads that need hardware-based isolation.

Server-side encryption
Encrypts disks at restYes
Temporary disk and cachesNo
Guest agent or CPU costNo
StatusAlways on
Choose when Default for every managed disk
Encryption at host
Encrypts disks at restYes (with SSE)
Temporary disk and cachesYes
Guest agent or CPU costNo
StatusRecommended
Choose when New VMs needing end-to-end encryption
Azure Disk Encryption
Encrypts disks at restYes, in the guest
Temporary disk and cachesTemporary disk on some OSs
Guest agent or CPU costYes
StatusRetires 15 September 2028
Choose when Existing deployments, migrate before retirement

The following diagram compares what each option encrypts.

What each encryption option covers. Server-side encryption protects managed OS and data disks, but leaves the temporary disk and disk caches out. Encryption at host, with a disk encryption set holding a customer-managed key, covers them too, and needs no software in the guest. The EncryptionAtHost feature is registered first.
DES stands for disk encryption set.
Sort into groups

Which encryption option?

Exam skills 3.2.2

Decide which disk encryption option each statement describes.

Log in to try this activity Interactive activities are free with an account.
Worked example

Meeting an encryption requirement

A compliance rule requires that all data related to a set of VMs, including temporary disks and disk caches, is encrypted, with keys controlled by the company, and that no software is installed in the guest operating systems for encryption. The VMs are being created now. What should you configure?

Register the EncryptionAtHost feature, create a disk encryption set with a customer-managed key in Key Vault, and create the VMs with encryption at host enabled and the disk encryption set selected. Server-side encryption alone would leave temporary disks and caches unencrypted, and Azure Disk Encryption installs an extension in the guest and is being retired.

Check yourself

Which VM data does server-side encryption not encrypt, but encryption at host does?

Show answer

The temporary disk and the OS and data disk caches on the host.

Exam Tips

Remember for the exam

  • Encryption at host covers temporary disks and caches end to end, with no guest agent.
  • Register the EncryptionAtHost feature before enabling it.
  • Enable it at creation or while the VM is deallocated.
  • Azure Disk Encryption retires on 15 September 2028.