rejeesh
rejeesh

Reputation: 11

Set-AzureRmVMDiskEncryptionExtension : Long running operation

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.

Upvotes: 0

Views: 1165

Answers (1)

Nitesh Singh
Nitesh Singh

Reputation: 348

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.

Upvotes: 0

Related Questions