Azure Arc-enabled servers
-
Phase 0: Before you start
-
Phase 1: The foundation
-
Phase 2: Day-to-day operations
-
Phase 3: Enterprise architecture
-
Phase 4: Troubleshooting step by step
-
Phase 5: Final project and career
Azure Arc-enabled servers bring Windows and Linux machines that live outside Azure, whether in your data centre, a branch office or another cloud, into Azure Resource Manager. Each machine turns into an Azure resource that you can tag, put under Azure Policy, monitor with the Azure Monitor Agent and patch with Update Manager, the same way you would a VM.
For most companies Arc is how they get to hybrid operations, with one inventory, one set of policies and one monitoring workspace covering every server no matter where it runs.
You don’t need an on-premises lab for this. Instead you’ll use Microsoft’s supported evaluation method, which is a throwaway Azure VM dressed up to look like an outside server. You’ll connect it, send its logs to law-saat, and fix the two connection problems that every Arc admin runs into sooner or later.
| Time | You need | Cost | By the end you can |
|---|---|---|---|
| About 75 minutes | vnet-saat, the Developer Bastion, law-saat and dcr-saat-basic, the CLI | About 15 US cents: a small test VM and a NAT Gateway for about an hour; the Arc connection itself has no charge | Onboard a server to Azure Arc, manage it like an Azure VM, and fix disconnected agents |
What it is, in one line
Azure Arc-enabled servers are machines outside Azure that run the Connected Machine agent and appear as resources in Azure.
In Simple Words
Visiting pupils on the school register
Think of a school running a summer camp that children from other schools join. They aren’t the school’s own pupils, but the camp still puts them on its register so it can take attendance, send notices and ring parents, the same as it does for its own children.
Every visiting child wears a camp badge, and that badge is the Connected Machine agent, while their register entry is the Arc resource in Azure.
If a child stops answering roll call for a while, the register marks them “not seen”. In Arc that’s a Disconnected server, which is also the first thing you’ll break in this lesson.
Engineer's View
How Arc-enabled servers work
- Connected Machine agent (
azcmagent): you install it on the server, and it creates aMicrosoft.HybridCompute/machinesresource along with a managed identity for it. - Heartbeat: the agent checks in every 5 minutes. If 15 minutes pass with no heartbeat, the status changes to Disconnected, and after 45 days it becomes Expired and has to be reconnected.
- Network: it needs only outbound HTTPS 443 to the Arc, Entra ID and Resource Manager endpoints, either directly, through a proxy, or through an Azure Arc private link scope.
- What you get: tags, RBAC, Azure Policy and machine configuration, extensions such as the Azure Monitor Agent, Defender and Custom Script, plus Update Manager, inventory in Resource Graph and run commands.
- Cost: connecting the server and the core management cost nothing, but add-ons like Update Manager, Defender for Servers and some machine configuration features are billed per server.
- Evaluation on Azure VMs: the agent won’t run anywhere it can reach the Azure Instance Metadata Service (169.254.169.254), so Microsoft’s test method removes the Azure VM agent and blocks that address. Don’t ever do this to a VM you actually need.
How it works, step by step
When you run azcmagent connect on a server, this is what happens:
- You sign in, here with a device code (for bulk onboarding you’d use a service principal).
- The agent creates the Arc resource in the chosen resource group and region.
- Azure issues a managed identity certificate to the server.
- The agent starts sending heartbeats and polls for extensions and policies.
- The server shows as Connected, and from then on you manage it from Azure.
From step 4 onwards everything depends on outbound HTTPS, which is why most Arc tickets turn out to be network tickets.
Keep in mind that Arc doesn’t move workloads into Azure. The server stays where it is and only the way you manage it moves.
Hands-on lab: Azure Arc-enabled servers with arc01
Before you run any command, double-check it
Read every command twice before you press Enter. Check the target: the system or account, the IDs, the names and the sizes. These commands are for learning and were tested in our lab, not on your system. At work, run the read-only list commands first, follow your change process, make sure a backup exists, and ask a second person to check anything that changes or deletes data. You run them at your own risk.
Load the network IDs and give this lab outbound access:
$v = Get-Content C:\azure-lab\vnet-saat.json | ConvertFrom-Json
$sub = az account show --query id -o tsv
$tenant = az account show --query tenantId -o tsv
az network public-ip create --resource-group rg-saat-core --name pip-saat-natgw --sku Standard --location centralindia --tags course=saatvedha-azure lesson=40 -o none
az network nat gateway create --resource-group rg-saat-core --name natgw-saat --public-ip-addresses pip-saat-natgw --idle-timeout 4 --location centralindia --tags course=saatvedha-azure lesson=40 -o none
az network vnet subnet update --ids $v.'snet-web' --nat-gateway natgw-saat -o none1Create a throwaway “outside” server
You’ll need a small Ubuntu VM in its own group, plus a separate group for the Arc resource:
az group create --name rg-saat-l40 --location centralindia --tags course=saatvedha-azure lesson=40 -o none
az group create --name rg-saat-arc --location centralindia --tags course=saatvedha-azure lesson=40 -o none
az vm create --resource-group rg-saat-l40 --name arc01 --image Canonical:ubuntu-24_04-lts:server:latest --size Standard_B2ats_v2 --subnet $v.'snet-web' --public-ip-address '""' --nsg '""' --admin-username azureuser --generate-ssh-keys --tags course=saatvedha-azure lesson=40 -o none
"subscription: $sub"
"tenant: $tenant"2Make it look like a non-Azure server
Open arc01 in the portal, go to Connect, then Bastion, and sign in as azureuser with your SSH key. In the browser terminal, run Microsoft’s evaluation steps, which stop and remove the Azure VM agent and block the metadata service.
current_hostname=$(hostname)
sudo systemctl stop walinuxagent
sudo waagent -deprovision -force
sudo rm -rf /var/lib/waagent
sudo hostnamectl set-hostname $current_hostname
sudo ufw --force enable
sudo ufw deny out from any to 169.254.169.254
sudo ufw default allow incoming
curl -s -m 5 -H Metadata:true "http://169.254.169.254/metadata/instance?api-version=2021-02-01" || echo "IMDS blocked"The last line should print this:
IMDS blockedAfter this, Run Command and VM extensions stop working on arc01, and it behaves like a server sitting outside Azure. Leave the Bastion tab open.
3Install the agent and connect
Still in the Bastion terminal, using the subscription and tenant IDs that step 1 printed:
wget -q https://aka.ms/azcmagent -O ~/install_linux_azcmagent.sh
sudo bash ~/install_linux_azcmagent.sh
sudo azcmagent connect --resource-group rg-saat-arc --location centralindia --subscription-id <subscription-id> --tenant-id <tenant-id> --use-device-codeThe agent prints a device code. Open the link on your laptop, type in the code and sign in, and after about a minute the agent reports that the machine is connected.
Now check it from your laptop:
az connectedmachine show --resource-group rg-saat-arc --name arc01 --query "{name:name, status:status, os:osName, agent:agentVersion, lastSeen:lastStatusChange}" -o tableYou should see something like this:
Name Status Os Agent LastSeen
------ --------- ----- ------------ --------------------------------
arc01 Connected linux 1.58.03104.2 2026-10-22T09:41:20.117000+00:004Manage it like an Azure VM
Tag it, add the Azure Monitor Agent as an Arc extension, and point it at the DCR you built in Lesson 32:
$arcId = az connectedmachine show --resource-group rg-saat-arc --name arc01 --query id -o tsv
az tag update --resource-id $arcId --operation Merge --tags env=lab owner=saatvedha -o none
az connectedmachine extension create --resource-group rg-saat-arc --machine-name arc01 --name AzureMonitorLinuxAgent --publisher Microsoft.Azure.Monitor --type AzureMonitorLinuxAgent --location centralindia -o none
$dcrId = "/subscriptions/$sub/resourceGroups/rg-saat-core/providers/Microsoft.Insights/dataCollectionRules/dcr-saat-basic"
Set-Content -Path C:\azure-lab\dcr-assoc.json -Value ('{"properties": {"dataCollectionRuleId": "' + $dcrId + '"}}')
az rest --method put --url "https://management.azure.com${arcId}/providers/Microsoft.Insights/dataCollectionRuleAssociations/dcra-saat-basic?api-version=2022-06-01" --body '@C:\azure-lab\dcr-assoc.json' -o noneGive it about 10 minutes, then query law-saat in the portal:
Heartbeat
| where Computer == 'arc01'
| summarize LastSeen = max(TimeGenerated) by Computer, ComputerEnvironment, ResourceProviderYou should see something like this:
Computer ComputerEnvironment ResourceProvider LastSeen
arc01 Non-Azure Microsoft.HybridCompute 2026-10-22 09:55:10It’s the same workspace, the same DCR and the same KQL you use for your Azure VMs, except this machine counts as non-Azure, and that’s what Arc is for.


✅ Checkpoint: arc01 shows as a Connected Arc machine with tags, the Azure Monitor Agent, and heartbeats in law-saat as Non-Azure.
Break It, Then Fix It
Keep your Bastion session to arc01 open for both breaks.
1Break it: the server goes Disconnected
Remove the NAT Gateway, the way a firewall change might, and wait 20 minutes:
az network vnet subnet update --ids $v.'snet-web' --remove natGateway -o none
Start-Sleep -Seconds 1200
az connectedmachine show --resource-group rg-saat-arc --name arc01 --query "{name:name, status:status, os:osName, agent:agentVersion, lastSeen:lastStatusChange}" -o tableYou should see something like this:
Name Status Os Agent LastSeen
------ ------------ ----- ------------ --------------------------------
arc01 Disconnected linux 1.58.03104.2 2026-10-22T10:16:20.117000+00:00The agent has missed three heartbeats, so after 15 minutes Azure marks it Disconnected, and policies, extensions and monitoring stop updating for it. Back in the Bastion terminal, the agent’s own checker tells you why:
sudo azcmagent check --location centralindiaSome of the endpoints should fail their reachability test.
To fix it, give it outbound HTTPS again (NAT, firewall rules, a proxy set with azcmagent config set proxy.url, or Arc private link), and wait for the next heartbeat:
az network vnet subnet update --ids $v.'snet-web' --nat-gateway natgw-saat -o none
Start-Sleep -Seconds 600
az connectedmachine show --resource-group rg-saat-arc --name arc01 --query "{name:name, status:status, os:osName, agent:agentVersion, lastSeen:lastStatusChange}" -o tableThe status should go back to Connected. If a server stays disconnected for 45 days it becomes Expired, and then you have to onboard it all over again.
2Break it: deleted in Azure, still connected on the server
A tidy-up script deletes the Arc resource from Azure, and nobody tells the server about it:
az connectedmachine delete --resource-group rg-saat-arc --name arc01 --yesIn the Bastion terminal, check the agent and try connecting again:
sudo azcmagent show | grep -i -E 'status|resource name'
sudo azcmagent connect --resource-group rg-saat-arc --location centralindia --subscription-id <subscription-id> --tenant-id <tenant-id> --use-device-codeThe agent still thinks it’s connected to a resource that no longer exists, and the new connect is refused because the machine already has a connection set up. So the server is stuck in between, unmanaged in Azure and stuck on its own side.
To fix it, clear the local connection first and then connect again:
sudo azcmagent disconnect --force-local-only
sudo azcmagent connect --resource-group rg-saat-arc --location centralindia --subscription-id <subscription-id> --tenant-id <tenant-id> --use-device-codeThe right way to retire an Arc server is the opposite order: run sudo azcmagent disconnect on the server first, and it removes both the local configuration and the Azure resource.
To clean up, start by disconnecting properly in the Bastion terminal:
sudo azcmagent disconnect --use-device-codeThen, from your laptop, remove everything this lesson created:
az group delete --name rg-saat-arc --yes
az group delete --name rg-saat-l40 --yes
az network vnet subnet update --ids $v.'snet-web' --remove natGateway -o none
az network nat gateway delete --resource-group rg-saat-core --name natgw-saat
az network public-ip delete --resource-group rg-saat-core --name pip-saat-natgw
C:\azure-lab\Find-LabResources.ps1 -Lesson 40The last command should print this:
Nothing tagged course=saatvedha-azure is left.
✅ Checkpoint: You brought a Disconnected server back and fixed a server stuck after its Arc resource was deleted. All lesson resources are gone.
This happened at work
400 servers, 70 of them silent
A retailer onboarded 400 store servers to Azure Arc and moved all their patching over to Update Manager. About three months later the security team noticed that 70 of the store servers were missing two months of patches.
When they looked in Azure, every one of those servers showed as Disconnected or Expired. A new web proxy had been rolled out to the stores, and nobody had configured the Arc agent to use it. The servers themselves were healthy, but Azure couldn’t reach them, so none of the patch schedules ran.
What they changed: the store build now sets the proxy with azcmagent config, and the agent’s connectivity check is run after every network change. They also added an Azure Monitor alert that fires when any Arc machine stays Disconnected for more than an hour, and a weekly Resource Graph report that lists every non-Connected machine by store.
Common mistakes and troubleshooting
| Mistake | What you see | What to do |
|---|---|---|
| No outbound path or proxy not set | Status Disconnected, then Expired | Open 443 to Arc endpoints or set proxy.url. |
| Deleting the Arc resource before the agent | Server stuck; connect refused | Run azcmagent disconnect on the server first. |
| Onboarding a normal Azure VM | Agent refuses (IMDS reachable) | Use Azure VM features; Arc is for outside machines. |
| Using a personal account for bulk onboarding | Onboarding breaks when the person leaves | Use a service principal with the Arc onboarding role. |
| Expecting Arc to be a migration | Server still on-premises | Arc moves management, not workloads. |
| Ignoring Expired machines | Stale inventory and missed patches | Alert on Disconnected; reonboard Expired. |
Interview questions
Click a question to open it. Each one is worded the way an interviewer would ask it, and underneath you’ll find why they ask it and one way you could answer in your own words.
Fresher level
1. What is Azure Arc-enabled servers?
Why they ask this: To check the basic concept.
How you might answer: It’s a service that connects Windows and Linux servers outside Azure to Azure Resource Manager through the Connected Machine agent, so you can manage them with Azure tools like Policy, Monitor and Update Manager.
2. What network access does the Arc agent need?
Why they ask this: A practical requirement.
How you might answer: Only outbound HTTPS on 443 to the Azure Arc, Entra ID and Resource Manager endpoints, either directly, through a proxy or through an Azure Arc private link scope. You don’t need any inbound ports.
3. What do the statuses Connected, Disconnected and Expired mean?
Why they ask this: They want the lifecycle.
How you might answer: Connected means heartbeats are coming in, and Disconnected means there haven’t been any for 15 minutes. Expired means it’s been disconnected for 45 days, so the identity certificate has expired and you have to onboard the server again.
2–5 years experience
4. An Arc server shows Disconnected. How do you troubleshoot?
Why they ask this: A real ticket.
How you might answer: I’d run azcmagent check and azcmagent show on the server, then look at DNS, the proxy and the firewall for the Arc endpoints, make sure the himds service is running, and go through the agent logs. Most of the time it turns out to be a network or proxy change.
5. How do you onboard hundreds of servers?
Why they ask this: They want scale.
How you might answer: I’d create a service principal with the Azure Connected Machine Onboarding role and generate the script from the portal, then push it out with tools we already have, like Configuration Manager, Group Policy or Ansible, setting tags and resource groups at connect time.
6. How do you monitor Arc servers?
Why they ask this: They want the link to earlier lessons.
How you might answer: You install the Azure Monitor Agent as an Arc extension, usually through policy, and associate DCRs, the same way you do for Azure VMs. The data lands in the same workspace, with ComputerEnvironment set to Non-Azure.
Senior level
7. How would you design hybrid management for 2,000 servers with Arc?
Why they ask this: They want governance.
How you might answer: I’d set up resource groups by location or business unit and apply tags at onboarding. Then policy initiatives for AMA, DCRs, Defender and machine configuration, Update Manager schedules using dynamic scope, Arc private link where it’s needed, and alerts on any disconnected machines.
8. What are the security considerations for Arc?
Why they ask this: They want risk awareness.
How you might answer: Arc extends Azure RBAC down to on-premises servers, so someone with an Azure role can now run commands on them. I’d limit extension and run command permissions, use PIM, restrict which extensions the agent allows, and watch the Activity log for Arc operations.
9. When would you not use Arc?
Why they ask this: They want judgement.
How you might answer: I wouldn’t bother for servers that are about to be retired or migrated, or for isolated networks that can’t reach Azure even through a proxy or private link. Same if an existing tool already does the job well and Arc would only add cost through its paid add-ons.
Quick quiz
Q1. What does Azure Arc move into Azure?
- The workload
- The management of the server
- The disks
- The network
Show answer
B — The server stays where it is.
Q2. After how long without heartbeats is a machine Disconnected?
- 5 minutes
- 15 minutes
- 1 hour
- 45 days
Show answer
B — Expired comes after 45 days.
Q3. What port does the agent need?
- Inbound 3389
- Outbound 443
- Inbound 22
- Outbound 25
Show answer
B — Only outbound HTTPS.
Q4. Why does the evaluation method block 169.254.169.254?
- To save cost
- So the agent doesn’t detect an Azure VM
- To stop SSH
- For DNS
Show answer
B — The agent refuses to run where IMDS is reachable.
Q5. How should you retire an Arc server?
- Delete it in the portal first
- Run azcmagent disconnect on the server
- Unplug it
- Rotate keys
Show answer
B — Disconnect removes local config and the Azure resource.
Quick recap
You can now bring outside servers under Azure management and keep them connected.
- The Connected Machine agent turns a server into an Azure resource.
- Only outbound 443 is needed, and proxy and firewall changes cause most of the problems.
- Disconnected after 15 minutes, Expired after 45 days.
- Manage Arc servers with the same AMA, DCRs and policies as VMs.
- Disconnect on the server before you delete anything in Azure.
Next lesson
Lesson 41: From ARM templates to Bicep → You turn a portal-exported ARM template into clean Bicep and deploy it.
Further reading: Azure Arc-enabled servers
Want to go deeper into Azure Arc-enabled servers? See Microsoft’s Azure Arc-enabled servers overview and Evaluate Azure Arc-enabled servers on an Azure VM. You can also see the full plan for this course on the Azure Cloud Administration course page.
