Creating a Server Migration Workflow
This section describes how to create a server migration workflow using the standard template.
Constraints
- A workflow can contain a maximum of 100 servers.
- You can migrate a maximum of 1,000 servers concurrently. For any servers beyond this number, the workflows will pause at the first step and put these servers in a pending state until other servers complete their migration. The workflows will then automatically start on these servers in the order the workflows were created.
- If this is your first time to create a server migration workflow, you need to assign MgC the required permissions. For more information about the required permissions, see Agency Permissions.
Notes
Before creating a server migration workflow, read and understand the following precautions.
Item |
Precaution |
---|---|
Source download bandwidth |
Used to download SMS-Agent to source servers.
|
Migration bandwidth |
|
CPU and memory |
|
OS compatibility |
For details about what OSs are supported, 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? |
Notes and constraints |
For details about the notes and constraints for server migration, see Notes and Constraints. |
Billing |
For details about the fees that may be incurred during the migration, see Billing. |
Permissions configuration |
For details about the permissions the target account must have, 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? |
Prerequisites
- You have discovered source servers.
- Servers to be migrated have been added to an application, and the application servers have been assessed. For details, see Grouping Resources as Applications and Getting Target Recommendations. After the assessment is complete, you can purchase recommended target servers in batches. For details, see Purchasing Resources. Source servers with target servers associated do not need to be assessed. For details, see Associating Source Servers with Target Servers.
- Migrating Windows source servers requires a Windows agent image. Since Huawei Cloud no longer provides public Windows images due to security restrictions, you need to prepare a Windows agent image on your own before the migration. For details, see Using Custom Agent Images.
Procedure
- 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 Workflows.
- Click Create Workflow in the upper right corner of the page.
- In the Server Migration card, click Preview Steps to view the steps predefined in the template and the detailed description of each step. Automated steps are automatically performed by MgC. Manual steps need to be performed by you. Click Configure Workflow in the lower right corner.
- Configure the workflow parameters based on Table 1.
Table 1 Parameters for configuring a server migration workflow Area
Parameter
Description
Workflow Details
Name
User-defined
Description
Select Source Resources
- By application: Servers in the selected application will be migrated together.
- By migration plan: Servers in the selected migration plan will be migrated together.
Application
Application
If Select Source Resources is set to By application, select the application that contains the servers to be migrated.
Migration Plan
Migration Plan Name
If Select Source Resources is set to By migration plan, select the plan that contains the servers to be migrated. For details about how to create a migration plan, see Creating a Server Migration Plan.
Migration Network
Network Type
If you select Public, ensure that all target servers have EIPs bound. These EIPs will be used for the migration.
If you select Private, configure Direct Connect connections, VPN connections, VPC peering connections, or subnets in the target VPC in advance to connect the source environment to the target environment.
- If the source environment cannot access the Internet, enter the private IP address of the source proxy server and the port used by the proxy software.
- If the source proxy server cannot access the Internet, put the SMS-Agent installation package at a location where the source servers can access directly or over a proxy. You can download the SMS-Agent installation package from the SMS console.
Target Environment
Region
The target region. It defaults to the one you selected when you assessed the application.
Project
A project in the target region.
VPC
- If the source IP address is 192.168.X.X, you are advised to create a VPC and a subnet that both belong to network range 192.168.0.0/16.
- If the source IP address is 172.16.X.X, you are advised to create a VPC and a subnet that both belong to network range 172.16.0.0/12.
- If the source IP address is 10.X.X.X, you are advised to create a VPC and a subnet that both belong to network range 10.0.0.0/8.
Subnet
The subnet must be in the same network segment as the VPC.
Security Group
- Inbound ports 8899, 8900, and 22 are allowed for Windows migrations.
- Inbound port 22 is allowed for Linux file-level migrations.
CAUTION:
- For security purposes, you are advised to only allow traffic from the source servers on these ports.
- The firewall of the target servers must allow traffic to these ports.
Advanced Settings
Start Target After Migration
- If you select No, the target servers will be stopped after the migration is complete.
- If you select Yes, the target servers will be started after the migration is complete.
Set Bandwidth Limit
- If you select No, the migration traffic is not limited.
- If you select Yes, you can limit the bandwidth that can be used for migration based on the source bandwidth and service requirements.
CAUTION:Consider the migration scale to set an appropriate bandwidth limit. If a too small bandwidth is allocated to the workflow that includes 10 servers, migration tasks in the workflow may preempt the limited bandwidth resource, and some servers may fail to be migrated.
Install rsync on Source
- If you select No, rsync will not be installed on the source servers.
- If you select Yes, rsync will be automatically installed on the source servers as long as it is not found on these servers.
CAUTION:Linux migrations depend on rsync. If rsync is not installed on a source server, the server will fail to be migrated.
Retain IP Address
Enable this option to retain the private IP addresses of the source servers on the target servers. Enabling it may cause risks. You need to evaluate and take responsibility for any potential risks.
Enable Quick Mode
Enable this option if incremental synchronization is not required. This option is disabled by default. If it is enabled, incremental synchronization is skipped and then subsequent steps are performed after full replication is complete in the workflow. Set this option based on your requirements.
Enterprise Project
Select the enterprise project you want to migrate to. The enterprise project default is selected by default.
- Click Next: Confirm.
- Confirm the workflow settings, and click Confirm. The Run Workflow dialog box is displayed, which indicates that the workflow has been created.
- If you want to start the migration immediately, click Confirm to run the workflow.
- If you want to add a stage or step to the workflow, click Cancel. The workflow enters a Waiting state, and the migration has not started. To start the migration, click Run in the Operation column.
- On the migration workflow details page, view the workflow settings and the migration progress. After the step for starting the migration Agent is completed, a migration task is automatically created on the SMS console. For details about the server information mapping between MgC and SMS, see What Are the Information Mappings Between MgC and SMS?
- Move the cursor to the migration progress bar. In the box that is displayed, view more migration details.
- When the migration progress bar reaches a step that requires manual confirmation, move the cursor to the progress bar and click Confirm next to the step status in the displayed window, so that the subsequent migration steps can be executed.
- When the workflow reaches the ResizeDiskPartition step, the system identifies whether disk capacity reduction has been performed on the target server.
- If yes, go to SMS console and resize disks and partitions for the target server. For details, see the Partition Resizing parameter in Configuring a Target Server. After the adjustment is complete, go back to the MgC console and click Confirm next to the step status so that the workflow can continue.
- If no, skip this step.
- The StartSynchronization step is repeated before you verify your services on the target server.
- When the progress bar reaches Cutover, the migration is complete. You need check whether your service systems are running properly on the target server. If they are, manually switch services to the target server. After the switchover is complete, click Confirm in the workflow. The system automatically performs the following steps SourceClear and MigrationTaskClear.
When to Use the Retry and Full Retry Buttons
During the running of the server migration workflow, the MgC Agent launches an SMS-Agent migration process on each source server. After the process is started, it communicates with the SMS console and receives commands to perform migration. During the StartMigration and StartSynchronization steps in the workflow, if the SMS-Agent process on a source server disconnects from the SMS console, the MgC console will detect the disconnection, causing the migration workflow to fail on that source server. On the migration workflow details page, you will see options Retry and Full Retry. The appropriate choice depends on the cause of the disconnection. The possible causes for the disconnection include:
- Possible cause 1: There is a network exception.
In this case, the SMS-Agent process still opens on the source server. You only need to restore the network, wait until the connection to the SMS console is restored, and click Retry to resume the migration.Figure 1 Retry
Command for checking the SMS-Agent process on Linux:
# ps -ef | grep -v grep | grep linuxmain
Command for checking the SMS-Agent process on Windows:
# Get-Process -Name SMSAgentDeploy -ErrorAction SilentlyContinue
- Possible cause 2: The SMS-Agent process is stopped due to a restart of the source server.
In this case, the SMS-Agent process is stopped, and the migration cannot be resumed. You need to create an SMS migration task again by clicking the Full Retry button. After the migration task is cleared, the workflow starts from the StartUpAgent step to restart the SMS-Agent process on the source server and create an SMS migration task again.Figure 2 Full Retry
Clicking the Full Retry button will delete the original migration task and create a new one. The migrated data will be overwritten.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.