Single Server Migration
Introduction
Server migration enables you to migrate x86 physical servers and VMs on private and public clouds to Huawei Cloud. For example, ECSs, FlexusL instances, FlexusX instances, DeHs, and DeCs.
In this scenario, you need to deploy the Agent on each source server and configure tasks one by one. For batch server migration, refer to Batch Server Migration.
Currently, this function is available only in the AP-Singapore region.
Process Flow
Figure 1 shows the general process.
Table 1 lists the details.
| Step | Description |
|---|---|
| 1 | Download the Agent and install it on the source server. |
| 2 | After the Agent is started, it registers its connection status with the cloud service. Then it reports the source server information to the cloud service for migration feasibility check. |
| 3 | Go to the MgC console and choose Server Migration > Single Server. Set a target server and create a server migration task. |
| 4 | The Agent receives and executes the migration instructions. |
| 5 | The system migrates the system disk of the source server. |
| 6 | The system migrates the data disks of the source server. |
| 7 | Launch the target server. |
Constraints
Learn about the migration network and precautions before, during, and after the migration. For details, see SMS Precautions.
Learn about the restrictions of server migration tasks. For details, see Server Requirements and Migration Constraints.
Billing
MgC and SMS are free of charge, but you will be billed for the services used during data migration, such as ECS, Elastic Volume Service (EVS), and Elastic IP (EIP). For details, see SMS Billing.
Procedure
Table 2 introduces the complete process of server migration.
| Step | Description |
|---|---|
| |
| Install and start the Agent on the source server. Choose either the Windows or Linux version based on the source server's OS. | |
| Wait for the Agent to be started. Then, log in to the MgC console, set the target server parameters, and set the task parameters. | |
| Start the migration task to replicate all data from the source server to the target server. | |
| Verify that data on the target server is consistent with that on the source server and that applications and services are running properly. | |
| Synchronize incremental data from the source server to the target server and confirm that all data is synchronized. Multiple rounds of incremental data synchronization are supported. After the migration is complete, delete the cutover and synchronization snapshots generated during the migration to stop further billing. | |
| Switch services from the source server to the target server and use the target server to handle services. |
Preparations
Prepare resources by referring to Table 3 before creating a server migration task.
| Item | Requirement |
|---|---|
| Obtaining the source server account and permissions | Get the login account and password of the source server in advance for installing and starting the migration Agent. Permission requirements:
|
| Registering a Huawei Cloud account with required permissions for the target server |
|
| Creating an application migration project | Create a project to separate and manage migration resources. For details, see Creating an Application Migration Project. |
| Checking the source server environment and available space |
|
| Check the network environment | The migration network must meet the following requirements:
|
| Checking the compatibility of the source server | Ensure that the OS of the source server is supported by the system. For the compatible OSs, see: |
| Creating a target server | Use an existing target server (Use existing) or create a new one (Create new).
For details, see How Do I Create a Target Server That Meets the SMS Requirements? |
Step 1: Import a Source Server
Download the Agent from the MgC console to a source server and install it. Enter the AK/SK pair for the Huawei Cloud account that you are migrating to and the SMS domain name. After the Agent is started, it reports information about the source server to the cloud service.
- Sign in to the MgC console. In the navigation pane, under Project, select your application migration project from the drop-down list.
- In the navigation pane, choose Server Migration > Single Server.
- Click Import Source to go to the page for downloading the Agent.
- Install the Agent of the corresponding version and OS type.
- Windows: Download the Installation File and Install the Agent
- Linux: Install the Agent
- Wait until the Agent is installed and started, then go back to the Server Migration page to set a target server.
Step 2: Set a Target Server
This section describes how to select and configure a target server for the source server (with the Agent installed and started).
- In the navigation pane, choose Server Migration > Single Server.
- In the server list, locate the source server to be migrated, and click Configure Target in the Migration Stage/Status column or choose More > Configure Target in the Operation column.
If the source server record is not found in the server migration list, see Why Wasn't My Source Server Added to the SMS Console After I Configured the Agent?
- On the Configure Basic Settings page, configure parameters by referring to Table 4.
Table 4 Parameter description Parameter
Sub-Parameter
Description
Target Region
-
Select the region for the target server.
Target Port
-
- By default, ports 22, 8900, and 8899 are enabled for Windows.
- For a Linux server, port 22 is enabled by default for file-level migration, and ports 22 and 8900 are enabled by default for block-level migration.
NOTE:Open ports are used for the following purposes:
- Port 22: The initialization port of the transmission link. It is used to establish the transmission channel and can be modified in some regions.
- Port 8899: The control port for data transmission. It is used to transmit task control signals. It cannot be modified.
- Port 8900: The port for block data transmission. It cannot be modified.
Pay attention to the following security notes for migration ports:
During a migration, SMS uses the required ports to establish a transmission channel between the source server and the target server. To reduce security risks during the migration, SMS includes the following built-in security settings:
- Agent image: used only during the migration and automatically uninstalled after the migration.
- SSL login: Password-based SSH login is disabled for the target server. Only certificate- or key-based SSH login is allowed.
- SSH port: The default is port 22, which can be changed in some regions.
In the security group of the target ECS, allow only the required migration ports (22, 8899, and 8900), and allow access only from the IP address of the source server. Do not enable other unnecessary ports or set the source IP address to 0.0.0.0/0.
CAUTION:- Strictly comply with the requirements above; otherwise the target ECS may be accessed by unauthorized IP addresses over unnecessary ports, increasing the risk of being scanned, cracked, or attacked. You are responsible for any security risks caused by incorrect security group rules.
- Use the latest stable version of rsync if needed, and complete security configurations according to the official rsync security hardening guide. You are responsible for any security risks resulting from using an earlier version, a version with known vulnerabilities, or a version not configured in accordance with official security requirements.
Network Type
Public
(Default) Migration over the Internet requires that the target server has an EIP bound.
Private
A Direct Connect connection, VPN connection, VPC peering connection, VPC subnet, or Cloud Connect connection must be provisioned. The private IP address of the target server will be used for migration.
For details about the network scenarios and solutions for migration over a private network, see Setting Up an SMS Migration Network Using VPN, Direct Connect, and Cloud Connect.
IP Version
IPv4
IPv4 is used for data migration by default.
IPv6
On a dual-stack network, IPv6 can be used for migration. For details about migration over IPv6, see Migrating Servers over an IPv6 Network.
CAUTION:If IPv6 is selected, you can only select an existing server as the target end, instead of creating one.
- Configure the target server specifications. For details, see How Do I Create a Target Server That Meets the SMS Requirements?
There are two methods for configuring target servers.
- Use existing: Select a server created on Huawei Cloud as the target server. For details, see Selecting an Existing Server.
To ensure that the target server can start properly after the migration is complete, its disks will be formatted, and its registry and network settings will be updated. You are advised to back up data before the migration.
- Create new: The system automatically purchases a target server based on the configured specifications. For details, see Creating a Server.
- Use existing: Select a server created on Huawei Cloud as the target server. For details, see Selecting an Existing Server.
- (Optional) Configure resource limits.
Set the parameters according to Table 5.
Table 5 Resource limit parameters Parameter
Description
CPU Limit
These options are only available for Linux migrations. For details, see How Do I Limit Resource Allocation for the Agent in a Linux Migration?
Memory Limit
Disk Throughput Limit
Migration Rate Limit
You can limit the migration rate based on the source bandwidth and service requirements. If you do not want to limit the migration rate, set this parameter to 0.
Traffic limiting is unavailable if:
- The migration uses an IPv6 network.
- Traffic Control (TC) is missing from the source server.
- The TC module is available, but the Class-Based Queuing (CBQ) or Hierarchy Token Bucket (HTB) module is missing.
Overrate Threshold (%)
You can regulate how much the migration rate can exceed the configured limit. If the migration rate exceeds the threshold multiple consecutive times, the migration task is automatically paused.
For example, if the migration rate limit is set to 10 Mbit/s and the overrate threshold is set to 10%, the task is automatically paused when the migration rate exceeds 11 Mbit/s (110% of the limit) multiple times consecutively.
CAUTION:This option is only available for Linux migrations. It will not be available or applied if:
- The migration uses an IPv6 network.
- Traffic Control (TC) is missing from the source server.
- The TC module is available, but the Class-Based Queuing (CBQ) or Hierarchy Token Bucket (HTB) module is missing.
- The installed SMS-Agent is earlier than 24.9.0.
- Enable the migration drill.
Migration drills help you fully assess the feasibility and identify potential risks of a migration task beforehand. The system verifies if security group ports are set correctly, domains connect normally, and necessary permissions are available. If issues are identified, the system offers remediations to minimize risks and disruptions during migration.
After this function is enabled, the system automatically launches a migration drill before starting the full replication. The entire migration drill takes 5 to 15 minutes, and pay-per-use resources incur costs during this period. For details, see Billing. A migration drill does not transmit source data, so the fee incurred in the drill is low.
You can review the drill results in the task details. For details, see Checking the Migration Drill Status and Report.
- Configure migration parameters.
Set the parameters according to Table 6.
The parameters for Windows and Linux servers are different. Set their parameters accordingly.
Table 6 Migration settings Parameter
Sub-Parameter
Description
Start Target Upon Launch
No
The target server will be stopped after the migration is complete.
Yes
The target server will be started after the migration is complete.
Migration Method
Linux block-level
Migration and synchronization are performed by block. This method is efficient, but the compatibility is poor.
Linux File-Level
Migration and synchronization are performed by file. This method is inefficient, but the compatibility is excellent. File-level migration is used by default for Linux OSs.
Windows Block-Level
Migration and synchronization are performed by block. Block-level migration is used by default and cannot be changed.
Enable Concurrency
Automatic
The SMS-Agent automatically configures the maximum number of migration processes allowed based on source server conditions.
Manual
You can specify the maximum number of processes that the SMS-Agent can start concurrently for migration and synchronization tasks, respectively.
This option is only available for Linux file-level migrations. For more information, see How Do I Set the Number of Concurrent Processes for a Linux File-Level Migration?
Enable Continuous Synchronization
-
Disabled: After full replication is complete, the system automatically starts the target server without synchronizing incremental data from the source server. You need to choose More > Synchronize in the Operation column to synchronize incremental data to the target server.
Enabled: After full replication is complete, the system automatically starts to synchronize incremental data from the source end to the target end periodically. In this case, the target server is not started and cannot be operated. To exit this phase, click Start Target in the Migration Stage/Status column of the migration task to start the target server.
Verify Data Consistency
-
Disabled: Data consistency is not verified after full replication is complete. You can choose whether to perform data consistency check during incremental synchronization.
Enabled: Data consistency is automatically verified after full replication is performed. This is a quick verification, and only the file size and last modification time will be verified. You can modify the verification policy when you launch an incremental synchronization. Note that consistency verification cannot be performed for servers with Btrfs file systems. The following describes the parameters for data consistency verification:
- Enable Hash Verification: If this option is enabled, the system will generate and compare hash values for each file to be verified. Hash verification is recommended when individual files are large and important. Enabling this option will increase CPU and disk I/O overheads for the source server and extend the verification time. CAUTION:
- Hash values cannot be calculated for files in use, so these files will be skipped during the verification.
- Enabling this option requires you to specify the verification scope, and only files in the specified scope will be verified.
- Verification Scope
- Under Exclude paths, enter the paths you want to exclude from the verification. A maximum of 30 paths can be entered. Use commas (,) to separate the paths. For example, /root/data,/var. Leaving it empty will initiate a full verification.
- Under Include paths, enter the paths you want to verify.
CAUTION:- If the entered paths are incorrect or empty, 0 will be displayed for them in the verification results.
- The more data you need to verify, the longer the verification will take. It is wise to narrow the verification scope to only key paths.
- The following paths will be excluded from consistency verification by default:
- Linux: /bin, /boot, /dev, /home, /etc, /lib, /media, /proc, /sbin, /selinux, /sys, /usr, /var, /run, and /tmp
- Windows: top-level directories of partitions, for example, C:\ and O:\
If you need to include any of the preceding excluded paths in the verification, refer to Modifying the Default Excluded Paths.
Resize Disks and Partitions
-
Disabled: The number of disks and partition size of the target server are the same as those of the source server.
Enabled: You can adjust the number of target disks and partition size. For details, see Resizing Disks and Partitions.
Transit IP Address
-
This parameter is available only for private line migration. It is used to set the transit IP address of the target server. For details about how to configure the network in this scenario, see For a Scenario Where the Source Server Has No Internet Access and Cannot Communicate with the Target Server.
- Enable Hash Verification: If this option is enabled, the system will generate and compare hash values for each file to be verified. Hash verification is recommended when individual files are large and important. Enabling this option will increase CPU and disk I/O overheads for the source server and extend the verification time.
- Save the settings and start migration.
After configuring the target server settings, review them in the summary panel and choose whether to start the migration now or later.
- Saving the settings and starting the task immediately
- Click Save and Start.
- In the displayed dialog box, read the migration conditions and click OK. Return to the migration server list. The task status becomes Running, indicating that the migration has started.
- Saving the settings and starting the task later
- After you confirm that the settings are correct, click Save.
- In the displayed dialog box, read the migration conditions and click OK. Return to the migration server list. The task status becomes To be started, indicating that the migration is not started.
To start the migration, click Start in the Migration Stage/Status column.
- Saving the settings and starting the task immediately
Step 3: Start a Full Replication
After configuring the target server, you can replicate all data from the source server to the target server.
During the full replication, do not restart the source server and the Agent, or the migration will fail. For more precautions during the migration, see Precautions.
- In the server list, locate the source server that has a matching target server, and click Start in the Migration Stage/Status column.

- Click Confirm.
- Click the server name to check the migration speed and progress. If the Task Status is Complete, the full replication is complete and the target server is successfully started.

If Continuous Synchronization is enabled when you configure the migration task, after the full replication, the task will periodically synchronize incremental data from the source server to the target server. In this way, you need to manually start the target server.
Step 4: Test the Target Server
This section describes how to check the target server status, verify the data consistency, and confirm the service continuity after the target server is started.
- In the server list, click a target server to check its configuration parameters and running status.

- Log in to the target server using Virtual Network Console (VNC). For details, see Logging In to a Linux ECS Using VNC and Logging In to a Windows ECS Using VNC.
The username and password for logging in to the target server are the same as those of the source server.
- Check whether the file list of the source server is the same as that of the target server.
- Start the applications or services on the target server and check whether they are running properly.
Step 5: Synchronize and Verify Incremental Data
This section describes how to synchronize incremental data from the source server to the target server.
You can perform this operation for multiple times. Remember to stop services on the source server before the final synchronization. Otherwise, you will need to repeat the synchronization for new data.
- In the server list, locate the source server you want to synchronize, and click Sync above the list, or choose More > Sync in the Operation column.
- In the Synchronize Incremental Datadialog box, carefully read the tips, enable Verify Data Consistency if needed, and click OK. For details about this option, see How Do I Verify Data Consistency Between the Source and Target Servers?

- Click the server name to check the synchronization progress. Wait until the task status changes to Complete.
Step 6: Perform a Service Cutover
MgC does not provide the service cutover function. The following describes the process.
This section describes how to switch the service access layer to the target server after the preceding operations. The cutover mode varies according to the application scope:
- One-off cutover: for small and medium-sized services
- Batch cutover: for large-scale services. Different from one-off cutover, this mode groups servers based on their complexity, and then migrates each batch at a time.
Helpful Links
- Handle the Agent installation and startup issues by referring to: Agent Installation and Startup.
- Handle the migration failures by referring to Error Codes and Solutions.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
