Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Task 01 - Generate Azure Arc script to add server

Introduction

Tailspin Toys wants to migrate their on-premises SQL Server database to Azure SQL Managed Instance. In this task, you will start the process of adding a server to Azure Arc by creating the Azure resource and generating a script to run in the on-prem VM.

Description

In this task, you will create the Azure Arc resource and the scrip to run.

The key tasks are as follows:

  1. Create the Azure Arc resource.
  2. Generate the script to run in the on-prem VM.

Success Criteria

  • Successfully generate the script.

Solution

Expand this section to view the solution
  1. Sign in to the Azure Portal. Ensure that you’re using a subscription associated with the same resources you created during the Before the hands-on lab set up.

    If you’re using Azure Gov, sign in to the Azure Gov Portal.

  2. In the Search resources, services, and docs box at the top of the portal, search for Azure Arc, then select the Azure Arc service.

    An Azure Portal search is shown showing the results for a search for Azure Arc with the Azure Arc service in the results highlighted.

  3. On the Azure Arc page, select the Get started tab and then the Add resources option.

    The Azure Arc page in the Azure is shown navigated to the Get started pane and the Add resources button is highlighted.

  4. On the Azure Arc pane, under Machines select the Add/Create option and then the Add a machine option.

    The Azure Arc pane in the Azure Portal is shown navigated to the Infrastructure pane and the Servers Add button is highlighted.

  5. Under Add a single server select Generate script.

    The Add servers with Azure Arc pane is shown with the Generate Script button highlighted for the Add a single server option.

    If you encounter an error when using the single server script, try using the Add multiple servers option.

    The Add multiple servers with Azure Arc pane is shown with the Generate Script buttin highlighted for the Add multiple servers option.

  6. On the Resource details tab, enter the following values, then select Next.

    • Resource group: Select the Resource Group created for this lab. For example: tailspin-rg.
    • Region: Select Sweden Central.
    • Operating system: Windows
    • Connect SQL Server: Checked
    • Connectivity method: Public endpoint

    The Resource details tab of the Add a server with Azure Arc pane is displayed with values entered.

  7. On the Tags tab, enter the following tag values to identify this server, then select Next:

    • Datacenter: headquarters
    • City: Milwaukee
    • StateOrDistrict: WI
    • CountryOrRegion: USA

    The Tags tab of the Add a server with Azure Arc pane is shown with the tag values entered.

  8. On the Download and run script tab, select Download to download the generated script. By default, the script named OnboardingScript.ps1 will be saved to the Downloads folder.

    The Download button is highlighted on the Download and run script tab.