Enable Azure Disk Encryption for Linux VMs - Azure Virtual Machines (2024)

  • Article

Caution

This article references CentOS, a Linux distribution that is End Of Life (EOL) status. Please consider your use and plan accordingly. For more information, see the CentOS End Of Life guidance.

Applies to: ✔️ Linux VMs ✔️ Flexible scale sets

Azure Disk Encryption helps protect and safeguard your data to meet your organizational security and compliance commitments. It uses the DM-Crypt feature of Linux to provide volume encryption for the OS and data disks of Azure virtual machines (VMs), and is integrated with Azure Key Vault to help you control and manage the disk encryption keys and secrets.

Azure Disk Encryption is zone resilient, the same way as Virtual Machines. For details, see Azure Services that support Availability Zones.

If you use Microsoft Defender for Cloud, you're alerted if you have VMs that aren't encrypted. The alerts show as High Severity and the recommendation is to encrypt these VMs.

Enable Azure Disk Encryption for Linux VMs - Azure Virtual Machines (1)

Warning

  • If you have previously used Azure Disk Encryption with Microsoft Entra ID to encrypt a VM, you must continue to use this option to encrypt your VM. See Azure Disk Encryption with Microsoft Entra ID (previous release) for details.
  • Certain recommendations might increase data, network, or compute resource usage, resulting in additional license or subscription costs. You must have a valid active Azure subscription to create resources in Azure in the supported regions.

You can learn the fundamentals of Azure Disk Encryption for Linux in just a few minutes with the Create and encrypt a Linux VM with Azure CLI quickstart or the Create and encrypt a Linux VM with Azure PowerShell quickstart.

Supported VMs and operating systems

Supported VMs

Linux VMs are available in a range of sizes. Azure Disk Encryption is supported on Generation 1 and Generation 2 VMs. Azure Disk Encryption is also available for VMs with premium storage.

See Azure VM sizes with no local temporary disk.

Azure Disk Encryption is also not available on Basic, A-series VMs, or on virtual machines that do not meet these minimum memory requirements:

Memory requirements

Virtual machineMinimum memory requirement
Linux VMs when only encrypting data volumes2 GB
Linux VMs when encrypting both data and OS volumes, and where the root (/) file system usage is 4 GB or less8 GB
Linux VMs when encrypting both data and OS volumes, and where the root (/) file system usage is greater than 4 GBThe root file system usage * 2. For instance, a 16 GB of root file system usage requires at least 32 GB of RAM

Once the OS disk encryption process is complete on Linux virtual machines, the VM can be configured to run with less memory.

For more exceptions, see Azure Disk Encryption: Restrictions.

Supported operating systems

Azure Disk Encryption is supported on a subset of the Azure-endorsed Linux distributions, which is itself a subset of all Linux server possible distributions.

Enable Azure Disk Encryption for Linux VMs - Azure Virtual Machines (2)

Linux server distributions that are not endorsed by Azure do not support Azure Disk Encryption; of those that are endorsed, only the following distributions and versions support Azure Disk Encryption:

PublisherOfferSKUURNVolume type supported for encryption
CanonicalUbuntu22.04-LTSCanonical:0001-com-ubuntu-server-jammy:22_04-lts:latestOS and data disk
CanonicalUbuntu22.04-LTS Gen2Canonical:0001-com-ubuntu-server-jammy:22_04-lts-gen2:latestOS and data disk
CanonicalUbuntu20.04-LTSCanonical:0001-com-ubuntu-server-focal:20_04-lts:latestOS and data disk
CanonicalUbuntu20.04-DAILY-LTSCanonical:0001-com-ubuntu-server-focal-daily:20_04-daily-lts:latestOS and data disk
CanonicalUbuntu20.04-LTS Gen2Canonical:0001-com-ubuntu-server-focal:20_04-lts-gen2:latestOS and data disk
CanonicalUbuntu20.04-DAILY-LTS Gen2Canonical:0001-com-ubuntu-server-focal-daily:20_04-daily-lts-gen2:latestOS and data disk
CanonicalUbuntu18.04-LTSCanonical:UbuntuServer:18.04-LTS:latestOS and data disk
CanonicalUbuntu 18.0418.04-DAILY-LTSCanonical:UbuntuServer:18.04-DAILY-LTS:latestOS and data disk
MicrosoftCBLMarinercbl-marinercbl-mariner-2MicrosoftCBLMariner:cbl-mariner:cbl-mariner-2:latest*OS and data disk
MicrosoftCBLMarinercbl-marinercbl-mariner-2-gen2MicrosoftCBLMariner:cbl-mariner:cbl-mariner-2-gen2:latest*OS and data disk
OpenLogicCentOS 8-LVM8-LVMOpenLogic:CentOS-LVM:8-LVM:latestOS and data disk
OpenLogicCentOS 8.48_4OpenLogic:CentOS:8_4:latestOS and data disk
OpenLogicCentOS 8.38_3OpenLogic:CentOS:8_3:latestOS and data disk
OpenLogicCentOS 8.28_2OpenLogic:CentOS:8_2:latestOS and data disk
OpenLogicCentOS 7-LVM7-LVMOpenLogic:CentOS-LVM:7-LVM:7.9.2021020400OS and data disk
OpenLogicCentOS 7.97_9OpenLogic:CentOS:7_9:latestOS and data disk
OpenLogicCentOS 7.87_8OpenLogic:CentOS:7_8:latestOS and data disk
OpenLogicCentOS 7.77.7OpenLogic:CentOS:7.7:latestOS and data disk
OpenLogicCentOS 7.67.6OpenLogic:CentOS:7.6:latestOS and data disk
OpenLogicCentOS 7.57.5OpenLogic:CentOS:7.5:latestOS and data disk
OpenLogicCentOS 7.47.4OpenLogic:CentOS:7.4:latestOS and data disk
OpenLogicCentOS 6.86.8OpenLogic:CentOS:6.8:latestData disk only
OracleOracle Linux 8.68.6Oracle:Oracle-Linux:ol86-lvm:latestOS and data disk (see note below)
OracleOracle Linux 8.6 Gen 28.6Oracle:Oracle-Linux:ol86-lvm-gen2:latestOS and data disk (see note below)
OracleOracle Linux 8.58.5Oracle:Oracle-Linux:ol85-lvm:latestOS and data disk (see note below)
OracleOracle Linux 8.5 Gen 28.5Oracle:Oracle-Linux:ol85-lvm-gen2:latestOS and data disk (see note below)
RedHatRHEL 9.29.2RedHat:RHEL:9_2:latestOS and data disk (see note below)
RedHatRHEL 9.2 Gen 29.2RedHat:RHEL:92-gen2:latestOS and data disk (see note below)
RedHatRHEL 9.09.0RedHat:RHEL:9_0:latestOS and data disk (see note below)
RedHatRHEL 9.0 Gen 29.0RedHat:RHEL:90-gen2:latestOS and data disk (see note below)
RedHatRHEL 9-lvm9-lvmRedHat:RHEL:9-lvm:latestOS and data disk (see note below)
RedHatRHEL 9-lvm Gen 29-lvm-gen2RedHat:RHEL:9-lvm-gen2:latestOS and data disk (see note below)
RedHatRHEL 8.98.9RedHat:RHEL:8_9:latestOS and data disk (see note below)
RedHatRHEL 8.9 Gen 28.9RedHat:RHEL:89-gen2:latestOS and data disk (see note below)
RedHatRHEL 8.88.8RedHat:RHEL:8_8:latestOS and data disk (see note below)
RedHatRHEL 8.8 Gen 28.8RedHat:RHEL:88-gen2:latestOS and data disk (see note below)
RedHatRHEL 8.78.7RedHat:RHEL:8_7:latestOS and data disk (see note below)
RedHatRHEL 8.7 Gen 28.7RedHat:RHEL:87-gen2:latestOS and data disk (see note below)
RedHatRHEL 8.68.6RedHat:RHEL:8_6:latestOS and data disk (see note below)
RedHatRHEL 8.6 Gen 28.6RedHat:RHEL:86-gen2:latestOS and data disk (see note below)
RedHatRHEL 8.58.5RedHat:RHEL:8_5:latestOS and data disk (see note below)
RedHatRHEL 8.5 Gen 28.5RedHat:RHEL:85-gen2:latestOS and data disk (see note below)
RedHatRHEL 8.48.4RedHat:RHEL:8.4:latestOS and data disk (see note below)
RedHatRHEL 8.38.3RedHat:RHEL:8.3:latestOS and data disk (see note below)
RedHatRHEL 8-LVM8-LVMRedHat:RHEL:8-LVM:latestOS and data disk (see note below)
RedHatRHEL 8-LVM Gen 28-lvm-gen2RedHat:RHEL:8-lvm-gen2:latestOS and data disk (see note below)
RedHatRHEL 8.28.2RedHat:RHEL:8.2:latestOS and data disk (see note below)
RedHatRHEL 8.18.1RedHat:RHEL:8.1:latestOS and data disk (see note below)
RedHatRHEL 7-LVM7-LVMRedHat:RHEL:7-LVM:7.9.2020111202OS and data disk (see note below)
RedHatRHEL 7.97_9RedHat:RHEL:7_9:latestOS and data disk (see note below)
RedHatRHEL 7.87.8RedHat:RHEL:7.8:latestOS and data disk (see note below)
RedHatRHEL 7.77.7RedHat:RHEL:7.7:latestOS and data disk (see note below)
RedHatRHEL 7.67.6RedHat:RHEL:7.6:latestOS and data disk (see note below)
RedHatRHEL 7.57.5RedHat:RHEL:7.5:latestOS and data disk (see note below)
RedHatRHEL 7.47.4RedHat:RHEL:7.4:latestOS and data disk (see note below)
RedHatRHEL 6.86.8RedHat:RHEL:6.8:latestData disk (see note below)
RedHatRHEL 6.76.7RedHat:RHEL:6.7:latestData disk (see note below)
SUSEopenSUSE 42.342.3SUSE:openSUSE-Leap:42.3:latestData disk only
SUSESLES 12-SP412-SP4SUSE:SLES:12-SP4:latestData disk only
SUSESLES HPC 12-SP312-SP3SUSE:SLES-HPC:12-SP3:latestData disk only

* For image versions greater than or equal to May 2023.

Note

RHEL:

  • The new Azure Disk Encryption implementation is supported for RHEL OS and data disk for RHEL7 Pay-As-You-Go images.
  • ADE is also supported for RHEL Bring-Your-Own-Subscription Gold Images, but only after the subscription has been registered . For more information, see Red Hat Enterprise Linux Bring-Your-Own-Subscription Gold Images in Azure

All distros:

  • ADE support for a particular offer type does not extend beyond the end-of-life date provided by the publisher.
  • The legacy ADE solution (using Microsoft Entra credentials) is not recommended for new VMs and is not compatible with RHEL versions later than RHEL 7.8 or with Python 3 as default.

Additional VM requirements

Azure Disk Encryption requires the dm-crypt and vfat modules to be present on the system. Removing or disabling vfat from the default image will prevent the system from reading the key volume and obtaining the key needed to unlock the disks on subsequent reboots. System hardening steps that remove the vfat module from the system or enforce expanding the OS mountpoints/folders on data drives are not compatible with Azure Disk Encryption.

Before enabling encryption, the data disks to be encrypted must be properly listed in /etc/fstab. Use the "nofail" option when creating entries, and choose a persistent block device name (as device names in the "/dev/sdX" format may not be associated with the same disk across reboots, particularly after encryption; for more detail on this behavior, see: Troubleshoot Linux VM device name changes).

Make sure the /etc/fstab settings are configured properly for mounting. To configure these settings, run the mount -a command or reboot the VM and trigger the remount that way. Once that is complete, check the output of the lsblk command to verify that the drive is still mounted.

  • If the /etc/fstab file doesn't mount the drive properly before enabling encryption, Azure Disk Encryption won't be able to mount it properly.
  • The Azure Disk Encryption process will move the mount information out of /etc/fstab and into its own configuration file as part of the encryption process. Don't be alarmed to see the entry missing from /etc/fstab after data drive encryption completes.
  • Before starting encryption, be sure to stop all services and processes that could be writing to mounted data disks and disable them, so that they do not restart automatically after a reboot. These could keep files open on these partitions, preventing the encryption procedure to remount them, causing failure of the encryption.
  • After reboot, it will take time for the Azure Disk Encryption process to mount the newly encrypted disks. They won't be immediately available after a reboot. The process needs time to start, unlock, and then mount the encrypted drives before being available for other processes to access. This process may take more than a minute after reboot depending on the system characteristics.

Here is an example of the commands used to mount the data disks and create the necessary /etc/fstab entries:

sudo UUID0="$(blkid -s UUID -o value /dev/sda1)"sudo UUID1="$(blkid -s UUID -o value /dev/sda2)"sudo mkdir /data0sudo mkdir /data1sudo echo "UUID=$UUID0 /data0 ext4 defaults,nofail 0 0" >>/etc/fstabsudo echo "UUID=$UUID1 /data1 ext4 defaults,nofail 0 0" >>/etc/fstabsudo mount -a

Networking requirements

To enable the Azure Disk Encryption feature, the Linux VMs must meet the following network endpoint configuration requirements:

  • The Linux VM must be able to connect to an Azure storage endpoint that hosts the Azure extension repository and an Azure storage account that hosts the VHD files.
  • If your security policy limits access from Azure VMs to the Internet, you can resolve the preceding URI and configure a specific rule to allow outbound connectivity to the IPs. For more information, see Azure Key Vault behind a firewall.

Encryption key storage requirements

Azure Disk Encryption requires an Azure Key Vault to control and manage disk encryption keys and secrets. Your key vault and VMs must reside in the same Azure region and subscription.

For details, see Creating and configuring a key vault for Azure Disk Encryption.

Terminology

The following table defines some of the common terms used in Azure disk encryption documentation:

TerminologyDefinition
Azure Key VaultKey Vault is a cryptographic, key management service that's based on Federal Information Processing Standards (FIPS) validated hardware security modules. These standards help to safeguard your cryptographic keys and sensitive secrets. For more information, see the Azure Key Vault documentation and Creating and configuring a key vault for Azure Disk Encryption.
Azure CLIThe Azure CLI is optimized for managing and administering Azure resources from the command line.
DM-CryptDM-Crypt is the Linux-based, transparent disk-encryption subsystem that's used to enable disk encryption on Linux VMs.
Key encryption key (KEK)The asymmetric key (RSA 2048) that you can use to protect or wrap the secret. You can provide a hardware security module (HSM)-protected key or software-protected key. For more information, see the Azure Key Vault documentation and Creating and configuring a key vault for Azure Disk Encryption.
PowerShell cmdletsFor more information, see Azure PowerShell cmdlets.

Next steps

Enable Azure Disk Encryption for Linux VMs - Azure Virtual Machines (2024)
Top Articles
AWS Vs. Azure Pricing: An Essential Guide For 2024
A Weaver's Guide To Choosing Sustainable Yarn - Warped Fibers
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
Things To Do In Atlanta Tomorrow Night
Non Sequitur
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Zonia Mosciski DO

Last Updated:

Views: 6139

Rating: 4 / 5 (51 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Zonia Mosciski DO

Birthday: 1996-05-16

Address: Suite 228 919 Deana Ford, Lake Meridithberg, NE 60017-4257

Phone: +2613987384138

Job: Chief Retail Officer

Hobby: Tai chi, Dowsing, Poi, Letterboxing, Watching movies, Video gaming, Singing

Introduction: My name is Zonia Mosciski DO, I am a enchanting, joyous, lovely, successful, hilarious, tender, outstanding person who loves writing and wants to share my knowledge and understanding with you.