Ensure that you have a unique name for your Azure resource group.
- Run the following PowerShell commands on each server.
#Install NuGet package provider
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
#Register PSGallery as a trusted repo
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
#Install Arc registration script from PSGallery
Install-Module AzsHCI.ARCinstaller -Force
Install-Module Az.Accounts -RequiredVersion 2.13.2
Install-Module Az.Resources -RequiredVersion 6.12.0
Install-Module Az.ConnectedMachine -RequiredVersion 0.5.2
#Define the subscription where you want to register your server as Arc device
$Subscription = " <subscription ID>
#Define the resource group where you want to register your server as Arc device
$RG = " <Resource group name>"
#Define the tenant you will use to register your server as Arc device
$Tenant = "<Tenant ID>
#Connect to your Azure account and Subscription
Connect-AzAccount -SubscriptionId $Subscription -TenantId $Tenant -DeviceCode - Log in to Microsoft Device Code, and then enter the code that you generated in the previous command. In the PowerShell window, you can confirm that the Connect-AzAcount operation is complete.
- In the PowerShell window, enter following ARC registration commands:
#Get the Access Token for the registration
$ARMtoken = (Get-AzAccessToken).Token
#Get the Account ID for the registration
$id = (Get-AzContext).Account.Id
#Invoke the registration script. For this preview release, only eastus region is supported.
Invoke-AzStackHciArcInitialization -SubscriptionID $Subscription -ResourceGroup $RG -TenantID $Tenant -Region eastus -Cloud "AzureCloud" -ArmAccessToken $ARMtoken -AccountID $idThe registration process takes about 5 to 15 minutes. - To verify the ARC extension registration, view the resource group in the Azure Portal. The server resource must be listed in the resource group.
- Verify that all ARC extensions are installed on each node. The time required for the system to reflect the installation of ARC extensions through the Azure portal varies depending on the available bandwidth. On average, it usually takes about 10 to 15 minutes.
- Go to Resource Group > Node > Extensions.
For more information about registering the servers with Azure Arc, see Register servers with Azure Arc.