Help Center/ Migration Center/ Best Practices/ Server Migration/ Migrating On-premises Servers to Huawei Cloud
Updated on 2025-08-20 GMT+08:00

Migrating On-premises Servers to Huawei Cloud

Scenario

This section describes how to use MgC to migrate on-premises servers to Huawei Cloud.

Preparations

  • Prepare a Windows server for installing the MgC Agent (formerly Edge) in the source intranet environment. The Windows server must:
    • Run Windows Server 2019, Windows Server 2016, Windows Server 2012, Windows 10, or Windows Server 8.1.
    • Use PowerShell 3.0 or later.
    • Have at least 4 CPUs and 8 GB of memory.
    • Have at least 20 GB of available space on the drive (drive C by default) for installing the MgC Agent.
    • 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.
    • Allow outbound traffic on port 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.
  • Prepare a HUAWEI ID or an IAM user that has the permissions to access MgC. For details, see Preparations.
  • Create a migration project on the MgC console.

Requirements for Source Servers

When the MgC Agent is used to collect data from and migrate source servers, the source servers must meet the requirements below.

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.
  • Use PowerShell 3.0 or later.
  • Have WinRM enabled and be able to access the server where the MgC Agent is installed. For more information, see How Do I Configure WinRM and Troubleshoot WinRM Connection Problems?
  • Allow the execution of shell scripts. To review the current execution policy, you can open PowerShell on the source servers as an administrator and run the following command:
    Get-ExecutionPolicy
    If Restricted is returned, no scripts 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 key exchange algorithms and MAC algorithms:
    • Key exchange algorithms: ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, rsa-sha2-512, and rsa-sha2-256
    • MAC algorithms: hmac-sha2-256 and hmac-sha2-512

    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. To verify that, you can 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, you need to allow access from the MgC Agent.
    iptables -L INPUT -v -n

    Run the following command to allow the access.
    iptables -D INPUT -s <IP-address-of-the-MgC-Agent-server-indicated-by-the-source-field>

Precautions

Before creating a server migration workflow, read and understand the precautions below.

Item

Precaution

Source download bandwidth

Used to download SMS-Agent to source servers.

  • If each source server uses a dedicated bandwidth, the bandwidth must be at least 30 Mbit/s.
  • If source servers share a bandwidth, the average bandwidth must be at least 50 Mbit/s.

Migration bandwidth

  • Used to migrate data. It affects the migration speed and duration.
  • For details about how to estimate the migration duration, see How Long Does a Migration Take?

CPU and memory requirements

  • At least 520 MB of available memory
  • At least 0.3 CPUs available in Linux and at least 1 CPU available in Windows

OS compatibility

See Supported OSs.

Server migration statements

For details about the important statements you need to understand before the migration, see What Are the Important Statements of SMS?

Constraints

For details, see Notes and Constraints.

Billing

For details about the fees that may be incurred during the migration, see Billing.

Permissions configuration

For details, see Permissions Management.

Migration network and ports

For details about the requirements for the migration network and ports, see How Do I Set Up a Secure Migration Network for Using SMS?

Changes in server configurations before and after migration

For details about the configurations that may change after the migration, see What Are the Differences Between the Source and Target Servers After the Migration?

Step 1: Download and Install the MgC Agent (Formerly Edge)

Install the MgC Agent and connect it to MgC. For more information, see Installing the MgC Agent.

Step 2: Add Servers to MgC

  1. Sign in to the MgC console. In the navigation pane, under Project, select an application migration project from the drop-down list.
  2. In the navigation pane, choose Source Resources.
  3. On the Servers tab, click Add above the list.

    Figure 1 Adding a server

  4. In the displayed dialog box, configure parameters listed in Table 1 and click Confirm. The system automatically checks the credential status and starts collecting resource details.

    Table 1 Parameters for adding a server

    Parameter

    Description

    Name

    User-defined

    MgC Agent

    Select the MgC Agent installed in the source environment.

    Type

    Select the OS type of the source server.

    Access IP Address

    Enter the IP address of the source server.

    If the source server is in the same VPC as the MgC Agent, you can enter the private IP address of the server. Otherwise, you have to enter its public IP address.

    Port

    Enter the port on the source server that allows access from the MgC Agent.

    • The port defaults to 5985 on Windows and can be modified.
    • The port defaults to 22 on Linux and can be modified.

    Credential

    Select the server credential. If the credential is not displayed in the list, go to the MgC Agent console, add the server credential, and synchronize it to MgC.

  5. After the server is added, view it in the list.

Step 3: Group Servers as an Application

You can group the added servers as an application to get sizing recommendations for target resources and execute the migration.

  1. On the Resources page, in the Servers list, select the servers to be grouped as an application and click Group as Application above the list.
  2. Select an application from the drop-down list. If no applications are available, click Create Application. In the displayed dialog box, enter an application name and description; select a business scenario, environment, and target region; and click Create. For more information, see Creating an Application.
  3. Click OK. You can view the application name in the Application column of these servers.

(Optional) Step 4: Associate Source Servers with Existing Servers on Huawei Cloud

If you have servers on Huawei Cloud, you can associate source servers with these existing Huawei Cloud servers. These Huawei Cloud servers will be used to receive data migrated from their paired source servers. Then you can go to Step 6: Create a Migration Workflow directly.

If you do not want to migrate data to these existing Huawei Cloud servers, skip the current step and go to Step 5: Get Target Recommendations.

Before associating an existing server on Huawei Cloud with a source server, make sure that the existing server meets the following requirements:

  • Disks on the existing server can be formatted. During the migration, disks on the existing server will be formatted and re-partitioned based on the source disk settings for receiving data migrated from the source server.
  • To migrate over the Internet, the existing server must be able to access the Internet.
  • The existing server must be in the same region as the application that the source server is added to.
  1. In the navigation pane, choose Migration Solutions.
  2. Click View in the Target Configuration card.
  3. On the displayed Servers tab, locate a source server and click Associate in the Target Association column.
  4. In the displayed dialog box, select the region of the application and select a project. Then, select an existing Huawei Cloud server and click Confirm.

    After the association is complete, Associated is displayed in the Target Association column. You can click Details to view the specifications of the associated target server.

Step 5: Get Target Recommendations

The system can assess source resources and generate recommendations for rightsized Huawei Cloud resources based on the specifications, performance, and business purpose of the source resources. These recommendations also take into account your requirements for cost, availability, performance, and compliance.

If your source servers have been associated with existing servers on Huawei Cloud, you can skip this step and create a migration workflow to migrate them.

  1. On the Migration Solutions page, click Assess in the Target Configuration card.
  2. In the Select Application drop-down list, select the application that contains the source servers to be assessed.
  3. In the Select Resources area, select the servers to be assessed.
  4. Configure an assessment policy based on Table 2.

    Table 2 Parameters for configuring an assessment policy

    Parameter

    Sub-parameter

    Description

    Target Region

    -

    Select the region where you want to purchase resources on Huawei Cloud. You are advised to select a region close to your target users for lower network latency and quick access.

    Assessment Policy

    Match source configuration

    MgC recommends Huawei Cloud resources that best match the size of source resources.

    For details about how the system recommends appropriate target resources, see How Does MgC Generate Target Recommendations?

    Match business scenario

    MgC recommends the right Huawei Cloud resources based on the business scenario of source resources and Huawei Cloud best practices.

    For details about how the system recommends appropriate target resources, see How Does MgC Generate Target Recommendations?

    Priority

    High performance

    MgC recommends target resources designed for optimal performance.

    Low cost

    MgC recommends the most cost-effective target resources that meet your demands.

    Preferences

    Server Types (Optional)

    Select the server types you prefer.

    Server Series (Optional)

    Select the server series you prefer. The system will generate recommendations based on your preferred server types and series.

    NOTICE:

    If you select Display only series allowed on DeHs, Server Types will be dimmed, and the server series allowed on DeHs in the target region will be listed.

    System Disk (Optional)

    Select the system disk type you prefer.

    Data Disk (Optional)

    Select the data disk type you prefer.

    Sizing Criteria

    Choose the criteria that the system will use to generate server recommendations.

    For details about how the system recommends appropriate target resources, see How Does MgC Generate Target Recommendations?

  5. Click Confirm.
  6. In the application list on the Migration Solutions page, locate the application and click View Target Configurations in the Operation column.

    In the Target Configurations area, you can view the specifications of Huawei Cloud resources recommended based on the source resource specifications and your preferences. It also gives you the ability to estimate the cost of running on Huawei Cloud. In addition, you can modify the recommended target configurations.

Step 6: Create a Migration Workflow

After completing steps 1 to 5, create a workflow to migrate the source servers to Huawei Cloud. For details, see Creating a Server Migration Workflow.