Updated on 2025-02-17 GMT+08:00

Installing the MgC Agent on Windows

The MgC Agent for Windows is used to collect details of resources such as servers, storage systems, containers, and big data clusters. In addition, it works with migration workflows to migrate applications and data to the cloud.

Preparations

  • Prepare a Windows server for installing the MgC Agent (formerly Edge) in the source intranet environment. The Windows server must:
    • Be able to access the Internet and the domain names of MgC, IoTDA, and other cloud services. For details about the domain names to be accessed, see Domain Names.
    • Allow the ports required by the MgC Agent (formerly Edge). For details about the required ports, see Communication Matrix.
    • Use PowerShell 3.0 or later.
    • Have at least 4 CPUs and 8 GB of memory.
    • Allow outbound traffic on 8883 if the server is in a security group.
    • Not have any antivirus or protection software enabled. This type of software may stop the MgC Agent from executing migration commands, resulting in migration failures.

    Do not install the MgC Agent on a source server to be migrated.

    • High resource consumption: The MgC Agent consumes CPU and memory resources during collection and migration. If a large number of migration tasks are performed by the MgC Agent, services on the source server may be affected.
    • Port occupation: The MgC Agent occupies some ports on the server, which may affect services running on it.
  • Sign up for a HUAWEI ID and enable Huawei Cloud services, and obtain an AK/SK pair for the account.
  • Create a migration project on the MgC console.

Notes and Constraints

  • If there are Windows source servers to be migrated, these servers must:
    • Allow access from the server where the MgC Agent is installed over port 5985.
    • Have WinRM enabled and have connected to the server where the MgC Agent is installed. For more information, see How Do I Configure WinRM on a Windows Source Server and Troubleshoot WinRM Connection Problems?
    • Allow the execution of shell scripts. Open PowerShell on the source servers as an administrator and run the following command to view the current execution policy:
      Get-ExecutionPolicy
      If Restricted is returned, no script can be executed. Run the following command and enter Y to change the policy to RemoteSigned:
      Set-ExecutionPolicy RemoteSigned
  • If there are Linux source servers to be migrated, these servers must:
    • Allow access from the server where the MgC Agent is installed over port 22.
    • Allow direct root access. That means remote connections using root with SSH or other tools must be allowed on these Linux source servers.
    • Have SFTP and SSH enabled.
    • Support the following SSH connection security algorithms:

      ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, rsa-sha2-512, and rsa-sha2-256

      If a server does not support the preceding security algorithms, you are advised to upgrade OpenSSH to 8.0 or later. Otherwise, deep collection cannot be performed for that server.

    • Have their iptables configured to allow all communications with the server where the MgC Agent is installed. Run the following command on the source servers. If the source field in the command output contains the IP address and port of the server where the MgC Agent is installed, it means that the MgC Agent is not allowed to access these source servers. In this case, ensure that access from the MgC Agent is permitted
      iptables -L INPUT -v -n

  • You are advised to change your MgC Agent access password every three to six months.

Procedure

  1. Sign in to the MgC console from the Windows server you prepared.
  2. In the navigation pane, choose MgC Agents.
  3. In the Windows area, click Download Installation Package to download the MgC Agent installation package to the Windows server you prepared.
  4. Decompress the downloaded the MgC Agent installation package, double-click the installation program, and click Next. If the installation program cannot be launched, try to run it in compatibility mode. For details, see How Do I Run the MgC Agent in Compatibility Mode?
  5. On the License Agreement page, read the agreement carefully, select I accept the terms of the License Agreement, and click Next.
  6. Select drive C as the installation directory and click Install.

    The MgC Agent can only be installed in drive C. If you select another disk for installation, the MgC Agent may fail to start.

  7. After the installation is complete, click Finish to open the MgC Agent console and go to the User Registration page.

Registering an Account

When you log in to the MgC Agent console for the first time, you must set a username and password. Keep the username and password secure.

  1. On the Register page, specify a username and password, confirm the password, and click Privacy Statement.

  2. Read the privacy statement carefully before selecting I have read and agree to the Privacy Statement, and click Register.

    You are advised to change your password for accessing the MgC Agent every three to six months.