Search code examples
azureencryptionazure-storageazure-cli

Azure Managed Data Disk Not Encrypting


I have been following this document to encrypt a data disk on a VM. I am running the following command:

az vm encryption enable --resource-group "RGName" --name "VMName" --disk-encryption-keyvault "KVName" --volume-type "ALL"

The OS Disk IS encrypted, but the data disk is not. I have also tried running the same command above just specifying the volume-type as Data. I am not sure why the disk is not encrypting. When I run the command, it looks like it is running, the page says updating in ARM, but when all is said and done, it is not encrypted.


Solution

  • I solved the issue. The disk in question was attached to a VM but not mounted and formatted. Once I mounted and formatted the drive, I was able to encrypt it.