Skip to content

Error: The subscription is not registered to use namespace ‘MicrosoftCompute`.

Error: The subscription is not registered to use namespace ‘MicrosoftCompute`.

You receive the following error when trying to create a new VM disk or VM in your new Azure Subscription.

In my case, I am trying to copy a VM disk from one subscription to another and receive the above error.

To find out if ‘Microsoft.Compute’ ResourceProviders has been registered in the subscription, lets run the following in Azure PowerShell.

Text
Description automatically generated

As we can see from the image below, that Microsoft.Compute is not registered.

While we at it, lets also have a look at what else is not registered by running the following in AZ PowerShell.

Text
Description automatically generated

So, we have 225 objects that are not registered, I guess I might as well register them never know when I need them. Let’s go ahead and first Register the ‘Microsoft.Compute’ provider.

Let’s run the PSH again to verify if the registration is complete.

Text
Description automatically generated

Now that we have our ‘Microsoft.Compute’ Provider successfully registered, let have a look at how we can bulk register all that is still un-registered.

Text
Description automatically generated

To execute and apply changes, remember to remove the “-WhatIf” at the end of the PSH.

Now let’s go back to our initial issue, lets go ahead and start the VM disk copy process in Storage explorer again.

After restarting the copy process, the VM disk created successfully in the new subscription.

Graphical user interface, text, application
Description automatically generated

Hope this helps for those who gets stuck with the same error 😊

Sharing is caring!

Published inUncategorized

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *