Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VM has reported a failure when processing extension AzureDiskEncryption

I am running the following script:

$keyVault = Get-AzKeyVault -VaultName $keyVaultName -ResourceGroupName $rgName;
$diskEncryptionKeyVaultUrl = $keyVault.VaultUri;
$keyVaultResourceId = $keyVault.ResourceId;
$keyEncryptionKeyUrl = (Get-AzureKeyVaultKey -VaultName $keyVaultName -Name myKey).Key.kid;

Set-AzVMDiskEncryptionExtension -ResourceGroupName $rgName `
-VMName "myVM" `
-DiskEncryptionKeyVaultUrl $diskEncryptionKeyVaultUrl `
-DiskEncryptionKeyVaultId $keyVaultResourceId `
-KeyEncryptionKeyUrl $keyEncryptionKeyUrl `
-KeyEncryptionKeyVaultId $keyVaultResourceId

which is returning the following around 1 minutes of processing:

Set-AzureRmVmDiskEncryptionExtension : Long running operation failed with status 'Failed'. Additional Info:'VM has reported a failure when processing extension 'AzureDiskEncryption'. Error message: "Failed to send DiskEncryptionData, Check KeyVault inputs, ResourceIds and retry encryption operation".' ErrorCode: VMExtensionProvisioningError ErrorMessage: VM has reported a failure when processing extension 'AzureDiskEncryption'. Error message: "Failed to send DiskEncryptionData, Check KeyVault inputs, ResourceIds and retry encryption operation". ErrorTarget: StartTime: 3/2/19 2:10:59 PM EndTime: 3/2/19 2:10:59 PM

i have verified the values are all correctly passed to the set command and no nulls are being passed.

like image 845
Baahubali Avatar asked Mar 02 '19 14:03

Baahubali


People also ask

What is VM extension issue in Azure?

Azure virtual machine (VM) extensions are small applications that provide post-deployment configuration and automation tasks on Azure VMs. For example, if a virtual machine requires software installation, antivirus protection, or the ability to run a script inside it, you can use a VM extension.

Which possible disruption could result from encrypting a VM OS disk?

This disruption can result in status messages such as "Extension status not available on the VM." In expected scenarios, the encryption fails to finish.


1 Answers

in this case OP needed to enable Key Vault for disk encryption, under advanced access policies.

enter image description here

like image 136
4c74356b41 Avatar answered Sep 30 '22 04:09

4c74356b41