Hi shirure param,
Thanks for reaching out to Microsoft Q&A.
error message you are encountering indicates that the azure disk encryption process is unable to access the specified keyvault due to insufficient permissions. Specifically, the action requires the Microsoft.KeyVault/vaults/keys/read
permission to read the encryption keys stored in the Key Vault.
Check Key Vault Access Policies:
- Ensure that the Key Vault access policies are configured correctly to allow the Azure Disk Encryption service to access the keys. You need to enable permissions for
WrapKey
andUnwrapKey
for the service principal associated with the Azure Disk Encryption.
Verify Key Vault Location:
- Confirm that the Key Vault is in the same region and subscription as the virtual machine (VM) you are trying to encrypt. Azure Disk Encryption requires that both resources be co-located to function properly.
Set Up Advanced Access Policies:
- Use the Azure portal, PowerShell, or AzureCLI to set advanced access policies on the Key Vault. This includes enabling disk encryption and granting the necessary permissions to the Azure Disk Encryption service.
Check for Existing Keys:
- Ensure that the key you are trying to use for encryption exists in the Key Vault and is enabled. If the key has been deleted or disabled, you will need to create a new key or enable the existing one.
Network Configuration:
- If there are any network restrictions (like firewall settings), ensure that the VM can access the Key Vault. This may involve configuring the Key Vault to allow access from Microsoft Trusted Services if the firewall is enabled.
Correct Resource Identifiers:
- Double-check the Resource ID and the URI for the Key Vault and the Key Encryption Key (KEK) to ensure there are no typos or incorrect identifiers being used in your commands.
Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.