Azure CLI to move Azure Arc Guest to Maintenance group

Rick Elder 41 Reputation points
2022-10-18T15:24:58.19+00:00

We recently started onboarding Azure Arc Guest servers from AWS via a Service Principal. That all works as expected but when we try to move them into maintenance groups inside of the Update Management Center (Preview), we get an error back:

(InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.HybridCompute' for api version '2  
021-09-01-preview'.  
Code: InvalidResourceType  
Message: The resource type could not be found in the namespace 'Microsoft.HybridCompute' for api version '2021-09-01-pre  
view'.  

Is there another resource-type I should be using? I checked this list and couldn't find one that fit for Azure Arc Guest servers. The work around so to manually move them into the correct Maintenace group. https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers

Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
358 questions
Azure Update Manager
Azure Update Manager
An Azure service to centrally manages updates and compliance at scale.
261 questions
{count} votes

2 answers

Sort by: Most helpful
  1. tbgangav-MSFT 10,406 Reputation points
    2022-11-04T09:13:43.56+00:00

    Hi @Rick Elder ,

    Please use following param for configuration assignment.

    257127-image.png

    Following is correct command

    Arc resource (HybridCompute)

    az maintenance assignment create --resource-group AWSUpdateMgmt --location eastus --resource-name i-0abd518c9631e9c52 --resource-type machines --provider-name Microsoft.HybridCompute --configuration-assignment-name PatchingConfig --maintenance-configuration-id "/subscriptions/a7d40ff7-d9ce-4b80-916e-d0c6c7bb657d/resourcegroups/AWSUpdateMgmt/providers/Microsoft.Maintenance/maintenanceConfigurations/Playground-WeeklyPatching"

    Azure VM.

    az maintenance assignment create --resource-group RGName --location eastus --resource-name --resource-type virtualmachines --provider-name Microsoft.Compute --configuration-assignment-name PatchingConfig --maintenance-configuration-id <mrpconfigurationarmId>"


  2. Rick Elder 41 Reputation points
    2022-11-04T13:36:50.86+00:00

    Following is correct command

    Arc resource (HybridCompute)

    az maintenance assignment create --resource-group AWSUpdateMgmt --location eastus --resource-name i-0abd518c9631e9c52 --resource-type machines --provider-name Microsoft.HybridCompute --configuration-assignment-name PatchingConfig --maintenance-configuration-id "/subscriptions/a7d40ff7-d9ce-4b80-916e-d0c6c7bb657d/resourcegroups/AWSUpdateMgmt/providers/Microsoft.Maintenance/maintenanceConfigurations/Playground-WeeklyPatching"

    Azure VM.

    az maintenance assignment create --resource-group RGName --location eastus --resource-name --resource-type virtualmachines --provider-name Microsoft.Compute --configuration-assignment-name PatchingConfig --maintenance-configuration-id <mrpconfigurationarmId>"

    0 comments No comments