How to onboard multiple VMs and multiple k8s clusters from Azure local to Azure Arc

Ajit Sane 0 Reputation points
2026-07-03T06:23:09.09+00:00

We want to understand what are the best approaches available to onboard multiple VMs and multiple k8s clusters from Azure local to Azure Arc. And which is the recommended approach?

We want to understand how do we onboard the VMs and k8s clusters from Azure local to Arc for below scenarios

  1. When the VMs and k8s clusters are created from the Azure portal
  2. When the VMs and k8s clusters are created from WAC
Azure Local
0 comments No comments

1 answer

Sort by: Most helpful
  1. Jerald Felix 15,690 Reputation points Volunteer Moderator
    2026-07-03T10:49:04.7766667+00:00

    Hello Ajit Sane,

    Greetings! Thanks for raising this question in the Q&A forum.

    The onboarding path is different depending on how each resource was originally created, because Azure Local VMs and AKS Arc clusters created directly from the Azure portal are already Arc connected from the moment they are provisioned, while ones created locally through Windows Admin Center or PowerShell exist only in your on-premises Failover Cluster and need to be explicitly registered with Arc afterward. Here is the recommended approach for each scenario, plus how to do it at scale.

    1. VMs and clusters created from the Azure portal need no separate onboarding step

    Any VM or AKS Arc cluster you deploy from the Azure portal (or via Azure CLI/ARM/Bicep targeting your custom location) is automatically projected into Azure and connected to Arc as part of creation, since the request flows through the Arc resource bridge and custom location that were set up when your Azure Local instance was deployed. There is nothing further to onboard for this path, the resource already exists as an Azure resource the moment it is created.

    1. VMs created locally through Windows Admin Center or Hyper-V Manager need to be Arc-enabled as servers, individually or at scale

    These VMs are not automatically projected the way portal-created VMs are, they exist purely as local Hyper-V VMs until you Arc-enable the guest OS. Use the standard Arc-enabled servers onboarding for each VM:

    azcmagent connect --resource-group "<resource-group>" --tenant-id "<tenant-id>" --subscription-id "<subscription-id>" --location "<region>" --cloud "AzureCloud"
    

    For many VMs at once, do not run this manually on each one. Instead, generate a bulk onboarding service principal and deployment script from the Azure portal (Servers - Azure Arc > Add > Add multiple servers), which produces a single script you can push out via Group Policy, SCCM, or a PowerShell remoting loop across all target VMs at the same time.

    1. AKS clusters created through Windows Admin Center or PowerShell need to be connected to Arc explicitly

    If you built the cluster using the AksHci PowerShell module or the Windows Admin Center wizard and skipped or disabled the Arc integration step, connect it afterward with:

    Enable-AksHciArcConnection -name $clusterName -subscriptionId $subscriptionId -resourceGroup $resourceGroup -tenantId $tenantId -location $location
    

    If you are not the subscription Owner, use a service principal instead so the command does not depend on your personal permissions:

    $Credential = Get-Credential
    Enable-AksHciArcConnection -name $clusterName -subscriptionId $subscriptionId -resourceGroup $resourceGroup -credential $Credential -tenantId $tenantId -location $location
    

    For clusters built outside the AksHci tooling entirely (a generic on-premises Kubernetes cluster), use the general Arc-enabled Kubernetes connect command instead:

    az connectedk8s connect --name <cluster-name> --resource-group <resource-group> -l <region>
    
    1. Recommended approach for ongoing, mixed environments

    Since you have both provisioning paths in play, the practical recommendation is to standardize new VM and cluster creation through the Azure portal or CLI against your custom location wherever possible, since that removes the onboarding step entirely going forward. Reserve Windows Admin Center creation only for scenarios that specifically require local-only management, and treat every WAC-created VM or cluster as needing an explicit Arc onboarding pass immediately after creation, ideally automated through the bulk script or your existing configuration management tooling rather than done manually per resource.

    1. Governance at scale

    Once onboarded, apply an Azure Policy assignment scoped to your resource group or subscription that audits for Arc-enabled servers or connected clusters missing required extensions or tags, so you catch any locally created VM or cluster that was not properly onboarded going forward, rather than discovering gaps later.

    If this answer helps you kindly accept the answer which will help others who have similar questions.

    Best Regards,

    Jerald Felix.

    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.