Updated on 2025-07-18 GMT+08:00

Connecting the MgC Agent to MgC

You need to connect the MgC Agent (formerly Edge) to MgC, so the MgC Agent can receive commands from MgC for discovering resources and executing migration tasks.

After the connection is set up, you can perform the following operations on the MgC console:

  • Create resource discovery tasks to discover multiple types of source resources over the Internet. You can also perform deep collection for the discovered resources, such as servers, containers, object storage systems, and databases.
  • Create workflows to migrate source servers. Before that, you can get target server recommendations based on the collected performance data of the source servers.
  • Create big data migration tasks. Currently, migrating data from Alibaba Cloud MaxCompute to Huawei Cloud DLI is supported.
  • Create big data verification tasks to verify data consistency.

Constraints

  • An account can have up to 100 online MgC Agents at the same time.
  • A maximum of five MgC Agents (regardless of the status) can be registered with a single migration project.

Prerequisites

You have installed the MgC Agent. For details, see Installing the MgC Agent.

Setting Up the Connection Using a Huawei Cloud Access Key

  1. Sign in to the MgC Agent console.
  2. On the Overview page, click Connect to MgC in the upper right corner.
  3. In the Step 1: Select Connection Method area, select Huawei Cloud Access Key. Select the region where the project is created on MgC, enter an AK/SK pair of your Huawei Cloud account, and click List Migration Projects. After the MgC Agent is authenticated using the entered AK/SK pair, you can go to the next step. If the system displays a message indicating that the AK/SK pair is incorrect, try to rectify the fault by following the instructions in What Can I Do If the AK/SK Verification Fails?

    If your source servers need to be migrated, the entered AK/SK pair must have permissions to use SMS. For details, see SMS Custom Policies.

  4. In Step 2: Select MgC Migration Project, select a migration project from the project drop-down list. The MgC Agent will report the collected information about your source resources to this project.
  5. In Step 3: Preset MgC Agent Name, specify a name for the MgC Agent, which will be displayed on the MgC console, and click Connect. Confirm the connection to MgC, and click OK.

    After the MgC Agent is connected to MgC, the name you specified here cannot be modified.

  6. If Connected shows up on the overview page, the connection to MgC is successful.

Setting Up the Connection Through Enterprise Federation

This connection method is applicable only if:

  • You log in to the MgC Agent console using a local account.
  • Your source cloud is Azure.

Before the connection, you need to obtain the required credentials and complete the federated authentication. For details, see Configuring Federated Authentication Between Huawei Cloud MgC Agent and Azure Entra ID.

  1. Sign in to the MgC Agent console.
  2. On the Overview page, click Connect to MgC in the upper right corner.
  3. In the Step 1: Select Connection Method area, select Enterprise Federation. Set the parameters based on Table 1.

    Table 1 Parameters for configuring federated authentication

    Parameter

    How to Obtain

    Huawei Cloud IdP ID

    Enter the name of the Huawei Cloud identity provider (IdP) created during the configuration of federated authentication. To obtain the name:

    Log in to the IAM console, choose Identity Providers from the navigation pane. Locate the desired identity provider and click View in the Operation column. The Name in the basic information area is the IdP ID.

    Enterprise IdP

    Select Azure Entra ID from the drop-down list.

    Tenant ID

    1. Access the Azure portal.
    2. On the home page, click App registrations. If it is not displayed on the home page, search for it in the search box in the upper part of the page.
    3. On the All applications tab, click the OAuth 2.0 application created to open the Overview page of the application. In the Essentials area, you can obtain the Directory (tenant) ID and Application (client) ID.

    Application ID

    Application Password

    Enter the client secret of the OAuth 2.0 application configured during federated authentication.

    If the client secret is lost, perform the following steps to create a new one:

    1. In the navigation pane of the OAuth 2.0 application, choose Manage > Certificates & secrets.
    2. On the Client secrets tab, click New client secret to open the Add a client secret dialog box on the right.
    3. Enter a secret description, select the expiration date, and click Add. Then copy and save the generated client secret. Client secret values cannot be viewed, except for immediately after creation.

  4. Click Obtain Access Key. The Azure login page is displayed. After you log in to Azure using an Azure account and permanent password, the information shown in the figure below is displayed, indicating that the temporary access key for Huawei Cloud is obtained.

    Do not log in Azure using a temporary password. Otherwise, the temporary access key for Huawei Cloud cannot be updated after the temporary password expires.

  5. In the Step 2: Select MgC Migration Project area, click List Migration Projects. In the Migration Project drop-down list, select the migration project created on the MgC console. The MgC Agent will report the collected data to the project. For details about how to create a migration project, see Managing Projects.
  6. In Step 3: Preset MgC Agent Name, specify a name for the MgC Agent, which will be displayed on the MgC console, and click Connect. Confirm the connection to MgC, and click OK.

    After the MgC Agent is connected to MgC, the name you specified here cannot be modified.

  7. If Connected shows up on the overview page, the connection to MgC is successful.