Deploying a Cloud Management Gateway (CMG) with ConfigMgr requires access to an Azure Subscription. Additionally, the CMG is deployed using a resource provider named Microsoft.ClassicCompute. Newly registered Azure Subscriptions doesn’t have the this resource provider registered by default, which will cause the deployment of a CMG to fail with the first error message that as below followed by other error messages:
ERROR: Resource Manager – Failed to finish deployment. Check [Monitor/Activity log] on Azure Portal for more information
As shown in the picture below, if the Microsoft.ClassicCompute resource provider is not registered in the Azure Subscription that was selected during the Create Cloud Management Gateway wizard, the deployment fails miserably.
The first error message displayed doesn’t really tell us much other than to check the Activity log in the Azure portal. Instead of checking the portal, the actual error message is shown in the second error presented in the CloudMgr.log:
Error message details that describes the issue: “code”:”MissingSubscriptionRegistration”,”target”:”Microsoft.ClassicCompute”,”message”:”The subscription is not registered to use namespace ‘Microsoft.ClassicCompute’
From the above message, that has been amended to only show the important part, lies the real issue. That being the ‘MissingSubscriptionRegistration’ error code and for the ‘Microsoft.ClassicCompute’ target.
Fortuantely, there’s an easy fix for this. You could either browse to your Azure Subscription through the Azure portal and register the resource provider, or use PowerShell to accomplish the same task.
Option 1 – Azure Portal
- From within the Azure portal, select All Services and then Subscriptions.
- Selected the same subscription selected when configuring the CMG deployment.
- Under Settings, locate Resource Providers and the Microsoft.ClassicCompute provider and select Register.
Option 2 – PowerShell
- Install the Az.Resources PowerShell module and any prerequisite modules it may need using Install-Module -Name Az.Resources.
- Use the Connect-AzAccount to authenticate against Azure.
- Run the following command to register the resource provider:
Register-AzResourceProvider -ProviderNamespace ‘Microsoft.ClassicComputer’
You should now delete the existing Cloud Management Gateway deployment, there’s unfortunately no way to trigger a re-deployment, and create the same deployment once more. This time the deployment should go through if your configuration is correct.
If you’re looking for a complete blog post that covers all the required steps for setting up a Cloud Management Gateway using E-HTTP, check out the following post.