Share via

VM in a provisioning failed loop - KeyVault Error

ashlynn-youcount 6 Reputation points
2022-07-21T22:21:40.05+00:00

Hi,

I set up a key vault and soon realized I do not need it. I deleted the vault but now my virtual machine gives me this error:

Provisioning failed.
The Key Vault secret referenced with the URL XXX does not exist..
KeyVaultSecretDoesNotExist
Provisioning state error code ProvisioningState/failed/KeyVaultSecretDoesNotExist

I restored the key vault in an attempt to resolve this issue but the vault my VM is searching for was initialized to the wrong location so I just get this error:

Provisioning failed.
The Key Vault XX is located in location westus2, which is different from the location of the VM, westus. The VM and Key Vault need to be located within the same region..
KeyVaultAndVMInDifferentRegions

I seem to be stuck in this loop and cannot figure out how to sever the tie between my VM and this key vault that should've never existed in the first place. This error is inhibiting me from backing up my machine and has me afraid to redeploy (to solve the issue I was debugging in the first place). Please note that creating a new VM is not a viable solution for me.

Thanks in advance for your help!

Azure Key Vault
Azure Key Vault

An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Pratik Somaiya 4,211 Reputation points Volunteer Moderator
    2022-07-22T09:45:50.413+00:00

    Hello @ashlynn-youcount

    I think Key Vault was selected to store secrets so that they can be used by VM during boot

    Please refer to this link

    If might have been selected during VM creation

    223657-image.png

    Now, if you are facing the region error, then you can change the region of your VM as you can't change the region of your Key Vault, but during restore of the Key Vault did it asked for any region of choice or it restored to West US 2

    To know how to change the VM's region, please refer this link

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.