Quickstart: Connect hybrid machines with Azure Arc-enabled servers
Azure Arc-enabled servers enables you to manage and govern your Windows and Linux machines hosted across on-premises, edge, and multicloud environments. In this quickstart, you'll deploy and configure the Connected Machine agent on your Windows or Linux machine hosted outside of Azure for management by Azure Arc-enabled servers.
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
Deploying the Azure Arc-enabled servers Hybrid Connected Machine agent requires that you have administrator permissions on the machine to install and configure the agent. On Linux, by using the root account, and on Windows, with an account that is a member of the Local Administrators group.
Before you get started, be sure to review the agent prerequisites and verify the following:
Your target machine is running a supported operating system.
Your account is granted assignment to the required Azure roles.
If the machine connects through a firewall or proxy server to communicate over the Internet, make sure the URLs listed are not blocked.
Azure Arc-enabled servers supports only the regions specified here.
Warning
The Linux hostname or Windows computer name cannot use one of the reserved words or trademarks in the name, otherwise attempting to register the connected machine with Azure will fail. See Resolve reserved resource name errors for a list of the reserved words.
Use Azure Cloud Shell
Azure hosts Azure Cloud Shell, an interactive shell environment that you can use through your browser. You can use either Bash or PowerShell with Cloud Shell to work with Azure services. You can use the Cloud Shell preinstalled commands to run the code in this article without having to install anything on your local environment.
To start Azure Cloud Shell:
| Option | Example/Link |
|---|---|
| Select Try It in the upper-right corner of a code block. Selecting Try It doesn't automatically copy the code to Cloud Shell. | ![]() |
| Go to https://shell.azure.com, or select the Launch Cloud Shell button to open Cloud Shell in your browser. | ![]() |
| Select the Cloud Shell button on the menu bar at the upper right in the Azure portal. | ![]() |
To run the code in this article in Azure Cloud Shell:
Start Cloud Shell.
Select the Copy button on a code block to copy the code.
Paste the code into the Cloud Shell session by selecting Ctrl+Shift+V on Windows and Linux or by selecting Cmd+Shift+V on macOS.
Select Enter to run the code.
Register Azure resource providers
Azure Arc-enabled servers depends on the following Azure resource providers in your subscription in order to use this service:
- Microsoft.HybridCompute
- Microsoft.GuestConfiguration
Register them using the following commands:
az account set --subscription "{Your Subscription Name}"
az provider register --namespace 'Microsoft.HybridCompute'
az provider register --namespace 'Microsoft.GuestConfiguration'
Generate installation script
The script to automate the download, installation, and establish the connection with Azure Arc, is available from the Azure portal. To complete the process, do the following:
Launch the Azure Arc service in the Azure portal by clicking All services, then searching for and selecting Servers - Azure Arc.
On the Servers - Azure Arc page, select Add at the upper left.
On the Select a method page, select the Add servers using interactive script tile, and then select Generate script.
On the Generate script page, select the subscription and resource group where you want the machine to be managed within Azure. Select an Azure location where the machine metadata will be stored. This location can be the same or different, as the resource group's location.
On the Prerequisites page, review the information and then select Next: Resource details.
On the Resource details page, provide the following:
- In the Resource group drop-down list, select the resource group the machine will be managed from.
- In the Region drop-down list, select the Azure region to store the servers metadata.
- In the Operating system drop-down list, select the operating system that the script be configured to run on.
- If the machine is communicating through a proxy server to connect to the internet, specify the proxy server IP address or the name and port number that the machine will use to communicate with the proxy server. Enter the value in the format
http://<proxyURL>:<proxyport>. - Select Next: Tags.
On the Tags page, review the default Physical location tags suggested and enter a value, or specify one or more Custom tags to support your standards.
Select Next: Download and run script.
On the Download and run script page, review the summary information, and then select Download. If you still need to make changes, select Previous.
Install the agent using the script
Windows agent
Log in to the server.
Open an elevated 64-bit PowerShell command prompt.
Change to the folder or share that you copied the script to, and execute it on the server by running the
./OnboardingScript.ps1script.
Linux agent
To install the Linux agent on the target machine that can directly communicate to Azure, run the following command:
bash ~/Install_linux_azcmagent.shIf the target machine communicates through a proxy server, run the following command:
bash ~/Install_linux_azcmagent.sh --proxy "{proxy-url}:{proxy-port}"
Verify the connection with Azure Arc
After you install the agent and configure it to connect to Azure Arc-enabled servers, go to the Azure portal to verify that the server has successfully connected. View your machine in the Azure portal.
Next steps
Now that you've enabled your Linux or Windows hybrid machine and successfully connected to the service, you are ready to enable Azure Policy to understand compliance in Azure.
To learn how to identify Azure Arc-enabled servers enabled machine that doesn't have the Log Analytics agent installed, continue to the tutorial:


