Edit

Share via


Register Azure Local with Arc

This article details how to register Azure Local machines with Azure Arc and with proxy configuration. The proxy configuration can be done via an Arc script or via the Configurator app for Azure Local.

  • Configure with a script: You can use an Arc script to configure registration settings.

  • Set up via the Configurator app (Preview): Using this method, you can configure Azure Local registration via a user interface. This method is useful if you prefer not to use scripts or if you want to configure the settings interactively.

Prerequisites

Make sure the following prerequisites are met before proceeding:

  • You have access to Azure Local machines running release 2505 or later. Prior versions don't support this scenario.
  • You have assigned the appropriate permissions to the subscription used for registration. For more information, see Assign required permissions for Azure Local deployment.

Important

Run these steps as a local administrator on every Azure Local machine that you intend to cluster.

Step 1: Review script parameters

The steps are different depending on the solution version of Azure Local you're using.

Versions 2505 and later

Review the parameters used in the script:

Parameters Description
SubscriptionID The ID of the subscription used to register your machines with Azure Arc.
ResourceGroup The resource group precreated for Arc registration of the machines. A resource group is created if one doesn't exist.
Region The Azure region used for registration. See the Supported regions that can be used.
ProxyServer Optional parameter. Proxy Server address when required for outbound connectivity.

Versions 2504 and earlier

Review the parameters used in the script:

Parameters Description
SubscriptionID The ID of the subscription used to register your machines with Azure Arc.
TenantID The tenant ID used to register your machines with Azure Arc. Go to your Microsoft Entra ID and copy the tenant ID property.
ResourceGroup The resource group precreated for Arc registration of the machines. A resource group is created if one doesn't exist.
Region The Azure region used for registration. See the Supported regions that can be used.
ProxyServer Optional parameter. Proxy Server address when required for outbound connectivity.
AccountID The user who registers and deploys the instance.
DeviceCode The device code displayed in the console at https://microsoft.com/devicelogin and is used to sign in to the device.

Step 2: Set parameters

The steps are different depending on the solution version of Azure Local you're using.

Versions 2505 and later

Set the parameters required for the registration script.

Here's an example of how you should change these parameters for the Invoke-AzStackHciArcInitialization initialization script. Once the registration is complete, the Azure Local machines are registered in Azure Arc:

#Define the subscription where you want to register your Azure Local machine with Arc.
$Subscription = "YourSubscriptionID"

#Define the resource group where you want to register your Azure Local machine with Arc.
$RG = "YourResourceGroupName"

#Define the region to use to register your server as Arc device
#Do not use spaces or capital letters when defining region
$Region = "eastus"

#Define the proxy address for your Azure Local deployment to access the internet via proxy.
$ProxyServer = "http://proxyaddress:port"

#Define the bypass list for the proxy. Use comma to separate each item from the list.  
# Parameters must be separated with a comma `,`.
# Use "localhost" instead of <local> 
# Use specific IPs such as 127.0.0.1 without mask 
# Use * for subnets allowlisting. 192.168.1.* for /24 exclusions. Use 192.168.*.* for /16 exclusions. 
# Append * for ___domain names exclusions like *.contoso.com 
# DO NOT INCLUDE .svc on the list. The registration script takes care of Environment Variables configuration. 
# At least the IP address of each Azure Local machine.
# At least the IP address of the Azure Local cluster.
# At least the IPs you defined for your infrastructure network. Arc resource bridge, Azure Kubernetes Service (AKS), and future infrastructure services using these IPs require outbound connectivity.
# NetBIOS name of each machine.
# NetBIOS name of the Azure Local cluster.

$ProxyBypassList = "localhost,127.0.0.1,*.contoso.com,machine1,machine2,machine3,machine4,machine5,192.168.*.*,AzureLocal-1"
Expand this section to see an example output.
PS C:\Users\SetupUser> $Subscription = "Subscription ID"
PS C:\Users\SetupUser> $RG = "myashcirg"
PS C:\Users\SetupUser> $Region = "eastus"
PS C:\Users\SetupUser> $ProxyServer = "http://192.168.10.10:8080"
PS C:\Users\SetupUser> $ProxyBypassList = "localhost,127.0.0.1,*.contoso.com,machine1,machine2,machine3,machine4,machine5,192.168.*.*,AzureLocal-1"

Versions 2504 and earlier

  1. Set the parameters required for the registration script.

    Here's an example of how you should change these parameters for the Invoke-AzStackHciArcInitialization initialization script. Once the registration is complete, the Azure Local machines are registered in Azure Arc:

    #Define the subscription where you want to register your machine as Arc device
    $Subscription = "YourSubscriptionID"
    
    #Define the resource group where you want to register your machine as Arc device
    $RG = "YourResourceGroupName"
    
    #Define the region to use to register your server as Arc device, do not use spaces or capital letters when defining region
    $Region = "eastus"
    
    #Define the tenant you will use to register your machine as Arc device
    $Tenant = "YourTenantID"
    
    #Define the proxy address if your Azure Local deployment accesses the internet via proxy
    $ProxyServer = "http://proxyaddress:port"
    
    Expand this section to see an example output.
    PS C:\Users\SetupUser> $Subscription = "<Subscription ID>"
    PS C:\Users\SetupUser> $RG = "myashcirg"
    PS C:\Users\SetupUser> $Tenant = "<Tenant ID>"
    PS C:\Users\SetupUser> $Region = "eastus"
    PS C:\Users\SetupUser> $ProxyServer = "<http://proxyserver:tcpPort>"
    
  2. Connect to your Azure account and set the subscription. Open a browser on the client that you're using to connect to the machine and open this page: https://microsoft.com/devicelogin and enter the provided code in the Azure CLI output to authenticate. Get the access token and account ID for the registration.

    #Connect to your Azure account and Subscription
    Connect-AzAccount -SubscriptionId $Subscription -TenantId $Tenant -DeviceCode
    
    #Get the Access Token for the registration
    $ARMtoken = (Get-AzAccessToken -WarningAction SilentlyContinue).Token
    
    #Get the Account ID for the registration
    $id = (Get-AzContext).Account.Id
    
    
    Expand this section to see an example output.
    PS C:\Users\SetupUser> Connect-AzAccount -SubscriptionId $Subscription -TenantId $Tenant -DeviceCode
    WARNING: To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code A44KHK5B5
    to authenticate.
    
    Account               SubscriptionName      TenantId                Environment
    -------               ----------------      --------                ----------- 
    guspinto@contoso.com AzureLocal_Content  <Tenant ID>             AzureCloud
    
    PS C:\Users\SetupUser> $ARMtoken = (Get-AzAccessToken).Token
    PS C:\Users\SetupUser> $id = (Get-AzContext).Account.Id
    
    

Step 3: Run registration script

The steps are different depending on the solution version of Azure Local you're using.

Versions 2505 and later

  1. Run the Arc registration script. The script takes a few minutes to run.

    #Invoke the registration script. Use a supported region.
    Invoke-AzStackHciArcInitialization -SubscriptionID $Subscription -ResourceGroup $RG -Region $Region -Cloud "AzureCloud" -Proxy $ProxyServer -ProxyBypass $ProxyBypassList 
    

    For a list of supported Azure regions, see Azure requirements.

    Expand this section to see an example output.

    Here's a sample output of a successful registration of your machines:

    PS C:\Users\Administrator> Invoke-AzStackHciArcInitialization -SubscriptionID $Subscription -ResourceGroup $RG -Region $Region -Cloud "AzureCloud" -Proxy $ProxyServer
    >>
    Configuration saved to: C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap.json
    Triggering bootstrap on the device...
    Waiting for bootstrap to complete... Current Status: InProgress
    =========SNIPPED=========SNIPPED=============
    Waiting for bootstrap to complete... Current Status: InProgress
    Waiting for bootstrap to complete... Current Status: Succeeded
    Bootstrap succeeded.
    
    Triggering bootstrap log collection as a best effort.
    Version Response                                                    
    ------- --------                                                    
    V1      Microsoft.Azure.Edge.Bootstrap.ServiceContract.Data.Response
    V1      Microsoft.Azure.Edge.Bootstrap.ServiceContract.Data.Response
    
    
    PS C:\Users\Administrator>
    
  2. During the Arc registration process, you must authenticate with your Azure account. The console window displays a code that you must enter in the URL, displayed in the app, in order to authenticate. Follow the instructions to complete the authentication process.

    Screenshot of the console window with device code and URL for authentication.

Once the registration is complete, the Azure Local machines are registered in Azure Arc.

Versions 2504 and earlier

  1. Finally run the Arc registration script. The script takes a few minutes to run.

    #Invoke the registration script. Use a supported region.
    Invoke-AzStackHciArcInitialization -SubscriptionID $Subscription -ResourceGroup $RG -TenantID $Tenant -Region $Region -Cloud "AzureCloud" -ArmAccessToken $ARMtoken -AccountID $id -Proxy $ProxyServer -ProxyBypass $ProxyBypassList
    

    For a list of supported Azure regions, see Azure requirements.

    Expand this section to see an example output.
    PS C:\Users\Administrator> Invoke-AzStackHciArcInitialization -SubscriptionID $Subscription -ResourceGroup $RG -TenantID $Tenant -Region $Region -Cloud "AzureCloud" -ArmAccessToken $ARMtoken -AccountID $id
    >>
    Configuration saved to: C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap.json
    Triggering bootstrap on the device...
    Waiting for bootstrap to complete... Current Status: InProgress
    =========SNIPPED=========SNIPPED=============
    Waiting for bootstrap to complete... Current Status: InProgress
    Waiting for bootstrap to complete... Current Status: Succeeded
    Bootstrap succeeded.
    
    Triggering bootstrap log collection as a best effort.
    Version Response                                                    
    ------- --------                                                    
    V1      Microsoft.Azure.Edge.Bootstrap.ServiceContract.Data.Response
    V1      Microsoft.Azure.Edge.Bootstrap.ServiceContract.Data.Response
    
    PS C:\Users\Administrator>
    
    

Step 4: Verify the setup is successful

After the script completes successfully on all the machines, verify that your machines are registered with Arc.

  1. Go to the Azure portal.

  2. Go to the resource group associated with the registration. The machines appear within the specified resource group as Machine - Azure Arc type resources.

    Screenshot of the Azure Local machines in the resource group after the successful registration.

Note

Once an Azure Local machine is registered with Azure Arc, the only way to undo the registration is to install the operating system again on the machine.

This article details how to register using Azure Arc gateway on Azure Local without the proxy configuration. You can register via the Arc script or the Configurator app.

  • Configure with a script: Using this method, configure the registration settings via a script.

  • Set up via the Configurator app: Configure Azure Arc gateway via a user interface. This method is useful if you prefer not to use scripts or if you want to configure the registration settings interactively.

Prerequisites

Make sure the following prerequisites are met before proceeding:

  • You have access to Azure Local machines running release 2505 or later. Prior versions don't support this scenario.
  • You have assigned the appropriate permissions to the subscription used for registration. For more information, see Assign required permissions for Azure Local deployment.

Important

Run these steps as a local administrator on every Azure Local machine that you intend to cluster.

Step 1: Review script parameters

The steps are different depending on the solution version of Azure Local you're using.

Versions 2505 and later

Review the parameters used in the script:

Parameters Description
SubscriptionID The ID of the subscription used to register your machines with Azure Arc.
ResourceGroup The resource group precreated for Arc registration of the machines. A resource group is created if one doesn't exist.
Region The Azure region used for registration. See the Supported regions that can be used.

Version 2504 and earlier

Review the parameters used in the script:

Parameters Description
SubscriptionID The ID of the subscription used to register your machines with Azure Arc.
TenantID The tenant ID used to register your machines with Azure Arc. Go to your Microsoft Entra ID and copy the tenant ID property.
ResourceGroup The resource group precreated for Arc registration of the machines. A resource group is created if one doesn't exist.
Region The Azure region used for registration. See the Supported regions that can be used.
AccountID The user who registers and deploys the instance.
DeviceCode The device code displayed in the console at https://microsoft.com/devicelogin and is used to sign in to the device.

Step 2: Set parameters

The steps are different depending on the solution version of Azure Local you're using.

Versions 2505 and later

Set the parameters.

#Define the subscription where you want to register your machine as Arc device
$Subscription = "YourSubscriptionID"

#Define the resource group where you want to register your machine as Arc device
$RG = "YourResourceGroupName"

#Define the region to use to register your server as Arc device
#Do not use spaces or capital letters when defining region
$Region = "eastus"

Expand this section to see an example output.
PS C:\Users\SetupUser> $Subscription = "Subscription ID"
PS C:\Users\SetupUser> $RG = "myashcirg"
PS C:\Users\SetupUser> $Region = "eastus"

Version 2504 and earlier

  1. Set the parameters.

    #Define the subscription where you want to register your machine as Arc device
    $Subscription = "YourSubscriptionID"
    
    #Define the resource group where you want to register your machine as Arc device
    $RG = "YourResourceGroupName"
    
    #Define the region to use to register your server as Arc device, do not use spaces or capital letters when defining region
    $Region = "eastus"
    
    #Define the tenant you will use to register your machine as Arc device
    $Tenant = "YourTenantID"
    
    Expand this section to see an example output.
    PS C:\Users\SetupUser> $Subscription = "<Subscription ID>"
    PS C:\Users\SetupUser> $RG = "myashcirg"
    PS C:\Users\SetupUser> $Tenant = "<Tenant ID>"
    PS C:\Users\SetupUser> $Region = "eastus"
    
  2. Connect to your Azure account and set the subscription. Open a browser on the client that you're using to connect to the machine and open this page: https://microsoft.com/devicelogin and enter the provided code in the Azure CLI output to authenticate. Get the access token and account ID for the registration.

    #Connect to your Azure account and Subscription
    Connect-AzAccount -SubscriptionId $Subscription -TenantId $Tenant -DeviceCode
    
    #Get the Access Token for the registration
    $ARMtoken = (Get-AzAccessToken -WarningAction SilentlyContinue).Token
    
    #Get the Account ID for the registration
    $id = (Get-AzContext).Account.Id
    
    
    Expand this section to see an example output.
    PS C:\Users\SetupUser> Connect-AzAccount -SubscriptionId $Subscription -TenantId $Tenant -DeviceCode
    WARNING: To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code A44KHK5B5
    to authenticate.
    
    Account               SubscriptionName      TenantId                Environment
    -------               ----------------      --------                ----------- 
    guspinto@contoso.com AzureStackHCI_Content  <Tenant ID>             AzureCloud
    
    PS C:\Users\SetupUser> $ARMtoken = (Get-AzAccessToken).Token
    PS C:\Users\SetupUser> $id = (Get-AzContext).Account.Id
    
    

Step 3: Run registration script

The steps are different depending on the solution version of Azure Local you're using.

Versions 2505 and later

  1. Run the Arc registration script. The script takes a few minutes to run.

    #Invoke the registration script. Use a supported region.
    Invoke-AzStackHciArcInitialization -SubscriptionID $Subscription -ResourceGroup $RG -Region $Region -Cloud "AzureCloud"
    

    For a list of supported Azure regions, see Azure requirements.

    Expand this section to see an example output.
    PS C:\Users\Administrator> Invoke-AzStackHciArcInitialization -SubscriptionID $Subscription -ResourceGroup $RG -Region $Region -Cloud "AzureCloud"
    >>
    Configuration saved to: C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap.json
    Triggering bootstrap on the device...
    Waiting for bootstrap to complete... Current Status: InProgress
    =========SNIPPED=========SNIPPED=============
    Waiting for bootstrap to complete... Current Status: InProgress
    Waiting for bootstrap to complete... Current Status: Succeeded
    Bootstrap succeeded.
    
    Triggering bootstrap log collection as a best effort.
    Version Response                                                    
    ------- --------                                                    
    V1      Microsoft.Azure.Edge.Bootstrap.ServiceContract.Data.Response
    V1      Microsoft.Azure.Edge.Bootstrap.ServiceContract.Data.Response
    
    
    PS C:\Users\Administrator>
    
  2. During the Arc registration process, you must authenticate with your Azure account. The console window displays a code that you must enter in the URL, displayed in the app, in order to authenticate. Follow the instructions to complete the authentication process.

    Screenshot of the console window with device code and URL for authentication.

Version 2504 and earlier

Finally run the Arc registration script. The script takes a few minutes to run.

#Invoke the registration script. Use a supported region.
Invoke-AzStackHciArcInitialization -SubscriptionID $Subscription -ResourceGroup $RG -TenantID $Tenant -Region $Region -Cloud "AzureCloud" -ArmAccessToken $ARMtoken -AccountID $id

For a list of supported Azure regions, see Azure requirements.

Expand this section to see an example output.
PS C:\Users\Administrator> Invoke-AzStackHciArcInitialization -SubscriptionID $Subscription -ResourceGroup $RG -TenantID $Tenant -Region $Region -Cloud "AzureCloud" -ArmAccessToken $ARMtoken -AccountID $id
>>
Configuration saved to: C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap.json
Triggering bootstrap on the device...
Waiting for bootstrap to complete... Current Status: InProgress
=========SNIPPED=========SNIPPED=============
Waiting for bootstrap to complete... Current Status: InProgress
Waiting for bootstrap to complete... Current Status: Succeeded
Bootstrap succeeded.

Triggering bootstrap log collection as a best effort.
Version Response                                                    
------- --------                                                    
V1      Microsoft.Azure.Edge.Bootstrap.ServiceContract.Data.Response
V1      Microsoft.Azure.Edge.Bootstrap.ServiceContract.Data.Response

PS C:\Users\Administrator>

Step 4: Verify the setup is successful

  1. Go to the Azure portal.

  2. Go to the resource group associated with the registration. The machines appear within the specified resource group as Machine - Azure Arc type resources.

    Screenshot of the Azure Local machines in the resource group after the successful registration.

Note

Once an Azure Local machine is registered with Azure Arc, the only way to undo the registration is to install the operating system again on the machine.

Next steps

This feature is available only in Azure Local 2503 or later.