0
votes

While trying to encrypt a VM, I am getting the below error:

Set-AzureRmVMDiskEncryptionExtension : Long running operation failed with status 'Failed'. ErrorCode: VMExtensionProvisioningError ErrorMessage: VM has reported a failure when processing extension 'AzureDiskEncryptionForLinux'. Error message: "Enable failed.". StartTime: 11/15/2017 11:12:30 AM EndTime: 11/15/2017 11:14:38 AM OperationID: 004051ca-bf73-4a37-a145-5e0ac30bc30a Status: Failed At line:1 char:1 + Set-AzureRmVMDiskEncryptionExtension -ResourceGroupName $resourceGrou ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Set-AzureRmVMDiskEncryptionExtension], ComputeCloudException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption.SetAzureDiskEncryptionExtensionCommand

Please help me to resolve this issue.

1
Are you using Azure PowerShell version 1.1.0?Wayne Yang
No latest powershell version only.rejeesh
Azure poweshell 5.0.0?Wayne Yang
What is the OS of your VM? Azure Disk Encryption is supported on limited OS in Gallery.Wayne Yang
With Ubuntu..I have encrypted the VM. In the OS disk,it is showing that encryption is enabled. But for attached disks it is showing just '-'.Not sure whether encryption enabled for the disk or not.How can I confirm itrejeesh

1 Answers

0
votes

I was also having the same issue. The reason was i was not changing the access policy of the key vault. use this command to change the access policy first and then execute the command for encryption. Set-AzureRmKeyVaultAccessPolicy -VaultName $KeyVaultName -ResourceGroupName $rgName -EnabledForDiskEncryption and then check the policy with the following command (Get-AzureRmKeyVault -VaultName $keyVaultName -ResourceGroupName $rgName).EnabledForDiskEncryption it should return true.