Onboard Linux Machine to Azure Arc

John Benavides
5 min readJul 19, 2024

--

What is Azure Arc? 🤷🏽‍♂️

Azure Arc is a comprehensive and powerful solution that enables you to extend Azure services and management to any infrastructure. With Azure Arc, you can easily manage and govern resources across on-premises, multi-cloud, and edge environments. By bringing the agility and scalability of Azure to your infrastructure, Azure Arc empowers you to modernize your applications and accelerate innovation. Whether you are using Kubernetes, databases, or virtual machines, Azure Arc provides a unified and consistent experience, allowing you to leverage the full potential of Azure services wherever your resources are located.

This guide will walk you through the step-by-step process of onboarding a Linux machine to Azure Arc. You will learn how to install and configure the necessary tools, establish a connection between your Linux machine and Azure, and register the machine with Azure Arc. By following this guide, you will be able to seamlessly integrate your Linux machine into the Azure ecosystem and unlock the benefits of Azure Arc for your infrastructure.

Azure Arc Portal Overview 📘

Now that we have a good understanding of what Azure Arc is and its capabilities, let’s explore how to access it within the Azure portal. To begin, we can navigate to the Azure Portal by opening a web browser and entering the URL. Once we are inside the Azure portal, we can easily locate Azure Arc by following these steps:

  1. Look for the search bar at the top of the portal.
  2. Type in the term “Azure Arc”.
  3. Hit enter or click on the search icon to initiate the search.

By following these simple instructions, we will be able to find Azure Arc within the Azure portal and start leveraging its powerful features and functionalities for our projects and workloads.

Azure Arc location in Azure Portal

Once you are in the Azure Arc portal, navigate to the left-hand side of the screen and locate the “Infrastructure” section. Within this section, you will find the “Machines” option. Click on it to proceed.

The machine overview page is a comprehensive view that displays a detailed list of all devices currently utilizing Azure Arc. This page not only provides information about the agent status and the resource group to which the device belongs, but it also offers valuable insights into the operating system being used.

Let’s onboard our Linux Machine! 🚀

Now that we have learned how to navigate to the Azure Arc portal and view an overview of our machines, it’s time to take the next step and add our Linux machine to the portal! 😀 By doing so, we can seamlessly integrate our Linux machine into the Azure ecosystem and unlock the full potential of Azure Arc for our infrastructure.

Generating Onboarding Script 👨🏽‍💻

Let’s onboard our Linux machine! Our first step is to navigate to the Azure Arc portal, then go to Infrastructure -> Machines. On the top center bar, you’ll see an “Add/Create” option. Click on it and select “Add machine”.

Add a machine to Azure Arc

Now we have a few different options. In this case, we will only be adding a single server to Azure Arc. Select “Add a Single Server,” then click on “generate script.”

Next, we will be presented with a configuration page. Here, we will configure the subscription, resource group, and region where we want our machine to reside. Once you configure the details to your desired settings click on next.

💡 Please remember to change the Operating System to Linux.

Now we are able to customize our device tags. These tags can be used to identify a number of things, such as the location of the machine, who onboarded it, and its purpose. This step is completely customizable based on your needs. Once complete click on next!

Now that we completed all the steps Azure Arc automatically generates an onboarding script. You can download this script and head over to your Linux machine to begin the onboarding process!

🚨 When saving your onboarding script please ensure it’s saved as shell script. An example you can use is “Onboarding.sh

Onboarding Linux Machine 💻

  1. Open a terminal with elevated privileges on your Linux machine, and proceed to execute the generated onboarding script, ensuring that the network requirements are met.

2. Once the onboard is complete you’ll need to authenticate using a global admin account. You should be providing a URL as well as a verification code.

3. Once you enter the code, you’ll be prompted to sign into your global admin account.

4. Sign in with an administrator account to authenticate the machine to your Azure Portal. You’ll be prompted to confirm that you are attempting to onboarded the machine, select continue.

5. Once the machine is successfully onboarded, you’ll see the following message on your Linux machine.

6. Within the next 5–10 minutes you should see your Linux machine appear in the azure arc portal.

Final Thoughts 💭

Azure Arc, a powerful resource from Microsoft, opens up possibilities by seamlessly integrating non-native Microsoft machines into the Azure ecosystem. Whether it’s a single machine or multiple, the process, whether done manually or at scale, is remarkably straightforward. Once integrated, you can set up data collection rules for log ingestion, onboard machines to Microsoft Defender for Endpoint, and dive into even more functionalities!

Hopefully, this guide proves valuable on your journey to explore Azure and its array of exceptional resources. Cheers to your Azure adventures!

--

--