You can create a workgroup to manage the lifecycles of multiple migration tasks at a time. This allows for batch migration through workgroups, enhancing the efficiency of server migration. This topic mainly introduces how to migrate servers in batch through workgroups.
Migration scenarios
Currently, batch migration through workgroups only supports migrating servers to ECS Image. After the migration is complete, you need to manually create ECS instances by using the generated ECS custom images.
Migrate a server to an ECS instance.
Migrate data between ECS instances that belong to the same Alibaba Cloud account or different Alibaba Cloud accounts.
Migrate data from a simple application server to an ECS instance.
For more information about migration scenarios, see Server migration operations.
Prerequisites
Preparations for server migration are complete. For more information, see Before you begin.
The migration template is set up. For more information, see Configure the migration template.
Procedure
Step 1: Create a workgroup
50 workgroups can be created in each Alibaba Cloud account.
Log on to the Server Migration Center (SMC) console.
ImportantIf you migrate data between ECS instances that belong to different Alibaba Cloud accounts (migrate ECS instances of source account A to destination account B), use Alibaba Cloud account B to log on to the SMC console.
In the left navigation bar, select
.On the Workgroup Migration page, click createWorkgroup.
In the pop-up createWorkgroup dialog box, configure parameters based on the following table.
Parameter
Description
workgroupName
Optional. Enter the workgroup name.
The name must be 2 to 64 characters in length. It must start with a letter and cannot start with
http://
orhttps://
. It can contain digits, colons (:), periods (.), underscores (_), and hyphens (-).workgroupDescription
Optional. Enter the workgroup description.
Select Migration Source
Optional. If you have imported migration sources: You can select migration sources from the drop-down list.
If you have not imported migration sources: You can follow Step 2: Import and associate a source after you create a workgroup.
NoteA workgroup can associate up to 50 migration sources.
A migration source can only be associated with one workgroup.
Tag
Optional. Enter tag keys and tag values, or select existing tag keys and tag values to facilitate workgroup management.
NoteEach workgroup can bind up to 20 tags.
Click Create.
If you no longer need the workgroup later, you need to disassociate the migration sources in the workgroup, select
in the Actions column of the corresponding workgroup, and delete the workgroup as prompted.
Step 2: Import and associate a source
Migration sources can be servers of a variety of types, such as servers in data centers, VMs, and hosts on third-party cloud platforms.
In the Create a Workgroup dialog box that appears, click Import Migration Source.
NoteIf you have associated all migration sources when creating a workgroup, click Close and continue to Step 3: Start migration.
On the Import Migration Source page, follow the prompts to import and associate the migration source.
(Recommend) Use the CLI
ImportantThe source server must be accessible over the Internet.
Configure the parameters as prompted and copy the activation code command.
The following table describes the parameters.
Parameter
Description
Workgroup
By default, the created workgroup is selected.
Migration Source Type
Select the type of source server as needed:
Physical Server or VM
ECS
Third-party Cloud Sever
Import Method
Select Use CLI to Import Server.
Migration Source Quota
The number of migration sources whose information you want to import by using the activation code. Valid values: 1 to 1000. Default value: 200.
Validity Period
The validity period of the activation code. Unit: day. Valid values: 1 to 90. Default value: 90.
Activation Code
The activation code. Perform the following steps to generate the activation code and copy the generated command:
Click Generate.
Click the Linux Shell or Windows Powershell tab based on the operating system of the source.
Click Copy to copy the activation code command.
Log on to the source server and paste and run the copied command as an administrator to import the information about the migration source.
Linux server
Log on to the Linux server.
Paste and run the copied command as an administrator to import the information about the migration source.
After the command is run, if a message similar to
Import Source Server [s-bp18x8751kgz2oyh****] Successfully!
is returned, the information about the migration source is imported.
Windows server
Log on to the Windows server.
Open Windows PowerShell as an administrator.
Run the copied command to import the information about the migration source.
After the command is run, if a message similar to
Import Source Server [s-bp19rlidl3mwuptc****] Successfully!
is returned, the information about the migration source is imported.
Use the SMC console
ImportantThe source server must be accessible over the Internet.
If you want to import the information about a migration source as a Resource Access Management (RAM) user, make sure that the following permissions are granted to the RAM user:
AliyunRAMReadOnlyAccess
. For more information, see Grant permissions to a RAM user.AliyunCloudShellFullAccess
. For more information, see Authorize RAM users.
Configure the parameters as prompted and copy the activation code command.
The following table describes the parameters.
Parameter
Description
Workgroup
By default, the created workgroup is selected.
Migration Source Type
Select the type of source server as needed:
Physical Server or VM
ECS
Third-party Cloud Sever
Physical Server or VM or Third-party Cloud Sever is selected as an example.
NoteIf you select ECS, you can directly select ECS instances in specific regions, but the ECS instances must have Cloud Assistant Agent installed (Cloud Assistant Agent is pre-installed on ECS instances that are created from public images after December 1, 2017).
Import Method
Select Import through Console.
Migration Source Name
The name of the migration source. The name must be 2 to 128 characters in length. The name must start with a letter but cannot start with
http://
orhttps://
. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).OS Type
The type of the operating system. Select Linux or Windows based on your operating system type.
ImportantIf you select Windows as the operating system, you must install OpenSSH. For more information, see the How do I install OpenSSH on a Windows server? section of the "FAQ" topic.
IP Address
The IPv4 address that is used to access the migration source over the Internet. Example: 120.55.XX.XX.
Port
The SSH port number of the migration source. Valid values: 1 to 65535. Default value: 22.
Username
The username that is used to log on to the operating system of the migration source.
Linux: The default username is
root
.Windows: The default username is
Administrator
.
Password
The password corresponding to the username.
After you configure the parameters, click Import.
The import process takes about 3 to 10 minutes. Wait until the import is complete.
Use the SMC client
Configure the parameters as prompted and copy the activation code command.
The following table describes the parameters.
Parameter
Description
Workgroup
By default, the created workgroup is selected.
Migration Source Type
Select the type of source server as needed:
Physical Server or VM
ECS
Third-party Cloud Sever
Import Method
Select Use Client to Import Server.
Description
The description about how to download the SMC client. Read the information in the Description section and download the required version of the SMC client based on the CPU architecture (ARM or x86) and bit version (32-bit or 64-bit) of the operating system of the migration source.
Import the information about the migration source.
Perform the operations based on the operating system of the migration source.
ImportantDuring the migration, do not shut down the SMC client until the migration is complete. Otherwise, the migration source is disconnected from the SMC console, and the migration fails.
Windows server
You can use a remote connection tool that supports file transfer. For example, you can use WinSCP to upload the SMC client package to the source Windows server.
On the source Windows server, use the built-in decompression tool of Windows or the decompression tool that you install to decompress the SMC client package.
In the SMC client folder that corresponds to the source server, run the SMC client.
To run the Windows GUI version, double-click the go2aliyun_gui.exe file.
To run the Windows CLI version, double-click the go2aliyun_client.exe file.
NoteWhen you run the program, you must click OK to confirm that you have the administrator permissions.
Obtain an activation code or AccessKey pair.
(Recommend) Obtain an activation code: In the Description section in the SMC console, click Generate and copy the generated activation code information.
Obtain an AccessKey pair: An AccessKey pair consists of an AccessKey ID and an AccessKey secret. If no AccessKey pair is created, create one first. For more information, see Obtain an AccessKey pair.
Enter the activation code or AccessKey pair as prompted.
To run the Windows GUI version, enter the activation code or AccessKey pair in the Token Id/AK and Token Code/SK fields and click Start. For more information, see Use the SMC client.
To run the Windows CLI version, enter the obtained
access_access_token_id
andaccess_token_code
and press theEnter
key.
If the information about the migration source is imported, a message similar to the following one is returned: Import Source Server [s-bp11npxndknsycqj****] Successfully!
Linux server
You can use a remote connection tool that supports file transfer. For example, you can use WinSCP to upload the SMC client package to the source Linux server.
Connect to the source Linux server and decompress the SMC client package.
Linux 64-bit Generic
is used in the example. Run the following command to decompress the package. If you use another version of the SMC client, replace the package name in the command with the name of your SMC client.tar xf go2aliyun_client_linux_x86_64.tar.gz
NoteLinux ARM64 supports the g6r general-purpose instance family and the c6r compute-optimized instance family. For more information about instance types, see the "Arm-based enterprise-level computing instance families" section of the Overview of instance families topic.
(Optional) Exclude the files or directories that you do not need from the migration. For more information, see the How do I exclude files or directories from a migration job? section of the "FAQ" topic.
ImportantIf you enable the block replication feature, you cannot exclude files or directories from the migration job.
Obtain an activation code or AccessKey pair.
(Recommend) Obtain an activation code: In the Description section in the SMC console, click Generate and copy the generated activation code information.
Obtain an AccessKey pair: An AccessKey pair consists of an AccessKey ID and an AccessKey secret. If no AccessKey pair is created, create one first. For more information, see Obtain an AccessKey pair.
In the SMC client folder, run the following commands to run the SMC client.
cd go2aliyun_client_linux_x86_64 sudo chmod +x go2aliyun_client sudo ./go2aliyun_client
Enter the activation code or AccessKey pair as prompted. The following figure shows an example of an activation code.
The following messages may appear after you enter the activation code.
If no snapshot dependency is installed on your source server, a message appears. The following figure shows the details of the message. You can decide whether to install a snapshot dependency based on whether you enable the block replication feature.
If you want to enable block replication for the migration, enter
yes
to automatically install a snapshot dependency.If you do not want to enable block replication for the migration, enter
no
.
ImportantIf the snapshot dependency fails to be installed, do not enable block replication when you create a migration job. Otherwise, the migration may fail.
The rsync tool is installed on most mainstream migration sources. If rsync is not installed on the migration source, the SMC client displays a message. Enter
yes
to install rsync, as shown in the following figure.If SELinux is enabled on the migration source, a message that prompts you to disable SELinux appears. Enter
yes
to disable SELinux. The following figure shows how to disable SELinux.
If the information about the migration source is imported, a message similar to the following one is returned:
Import Source Server [s-bp11npxndknsycqj****] Successfully!
.NoteIf the information about the migration source fails to be imported, you can troubleshoot the issue based on the returned message. After you fix the issue, run the following commands to exit the background program and re-import the information about the migration source. For more information about FAQ and solutions, see FAQ about Server Migration Center (SMC) and Troubleshooting.
sudo ./go2aliyun_client --abort sudo ./go2aliyun_client
Associate the source.
In the left-side navigation pane, click
.In the actions column of the destination workspace, click Associate Migration Source.
In the Associate Migration Source dialog box that appears, select a migration source and click OK.
Check the status of the migration source.
In the left-side navigation pane, click
.Click the workgroup ID to go to the workgroup details page.
In the Migration Source section, view the status of the migration source in the Real-Time Migration Status column.
If the status of the migration source is Migration SourceOnline, the information about the migration source is imported.
If the migration source is in another state, the information fails to be imported. In this case, troubleshoot the failure based on the following solutions and import the information about the migration source again:
Troubleshoot the failure based on the message displayed in the SMC console or the log file in the directory where the SMC client is installed. By default, the SMC client is installed in the following directory:
Windows server: C:\smc
Linux server: /smc
For more information about frequently asked questions (FAQ) and solutions, see FAQ about Server Migration Center (SMC) and Troubleshooting.
Step 3: Start migration
In the left-side navigation pane, click
.In the Actions column of the workgroup, click Start Migration.
In the Start Migration dialog box, confirm that the servers to be migrated are correct, and click Next.
If servers still exist in the Inoperable Migration Sources tab, you can click the
icon to view the reasons why they cannot be migrated.
Configure the migration parameters as needed, and click Create.
If you have preset the migration task parameters in the migration template, the template parameters will be automatically filled in when the migration task is created to improve migration efficiency. For more information, see Configure the migration template.
NoteIf migration tasks already exist for some migration sources, no additional migration tasks will be created for these sources.
In the message that appears, read the migration notes and click Got It.
In the pop-up Migration Settings dialog box, click View Now.
On the Workgroup Migration page, view the migration status.
When the Migration Status changes from Not Started to In Progress, it indicates that the servers have started migrating.
You can click the workgroup ID to view the real-time migration status of each server. If you have enabled migration drills, SMC will first perform migration drills, and then perform migration operations after the drill is passed.
When the Real-time Migration Status is Drill Passed, it indicates that the migration drill is successful, and the system will automatically start the migration.
When the Real-time Migration Status is Drill Exception, it indicates that the migration drill fails. You need to view the drill report and fix the Critical drill items, and then retry the migration drill. For more information, see Configure a migration test.
When the Real-time Migration Status is Synchronizing, it indicates that the server data is being migrated.
The time required for data transmission varies based on factors such as the size of the migration source data and the network bandwidth. Wait until the migration job is complete. At this time, you can perform the following steps based on your needs:
Modify migration settings: In the Actions column, click Modify Migration Job to modify the task name, task description, transmission speed limit, compression rate, and Checksum verification parameters.
Pause the migration operation: In the Actions column, click Pause Migration Job to pause migration.
When the Real-time Migration Status is Waiting, it indicates that the first full migration of the server has been completed.
The first migration will involve a full migration of data from the source server system and generate a full ECS custom image.
Step 4: Incremental migration
After the first migration is complete, the migration status is Waiting. SMC will wait for the next frequency cycle based on Synchronization Interval that you set to automatically run incremental migration and generate a new ECS custom image.
Each ECS custom image generated during incremental migration is a full image of the current state of the source server, including the incremental data at the time of migration and all previously migrated data.
Stop the services and run an incremental migration job.
Stop the services on the source server during off-peak hours, and run the incremental migration again. Perform the following operations:
Log on to the source server and stop the system services.
Perform incremental migration.
Automatically perform incremental migration
SMC will automatically run incremental migration based on Synchronization Interval that you set.
Manually perform incremental migration
In the Actions column of the deworkgroup, click startSync, and perform incremental migration in batches as prompted.
NoteYou can also click the workgroup ID to perform manual incremental synchronization for each server.
Complete incremental synchronization.
After the last incremental migration operation is complete, perform the following steps to complete incremental migration:
In the Actions column of the destination workgroup, select
.In the Run Incremental Job dialog box, click Next.
You can also select Perform One Last Synchronizatio in the Complete Incremental Synchronization dialog box to complete the last data synchronization.
Click Next to confirm the migration sources.
Click OK to start incremental synchronization.
On the Workgroup Migration page, view the migration status.
The amount of time required for data transmission is subject to factors such as the data size of the migration source and network bandwidth. Wait until the migration job is complete. When the migration status is Completed, the migration is successful.
NoteAfter you complete incremental migration, no more incremental migration operations are automatically performed and you cannot manually run the migration job. If you click Complete Incremental Synchronization and confirm the completion by accident but still need to migrate incremental data, re-create a migration job.
Verify migration results
After the migration is successful, a custom Alibaba Cloud image will be generated.
On the Workgroup Migration page, click the workgroup ID.
In the Migration Deliverables column of the destination migration source, view the ECS custom image.
At the same time, you can click View Report to view the image detection results. For more information, see Configure image check.
Verify the migration results.
(Recommended) Manually verify the migration result
In the Actions column of the destination migration source, click Create Instance to go to the ECS instance creation page in the ECS console. The custom ECS image created after migration is selected by default.
Create an ECS instance using the custom image. For more information, see Create an instance by using a custom image.
Use the automatic migration result verification feature
NoteTo use this feature, you must install the Cloud Assistant Agent in your instance, and the system version of the instance must support this feature. For more information, see Install Cloud Assistant Agent.
This feature verifies whether the image generated by the migration job can be used to create and start instances. This verification is based on the CloudOps Orchestration Service (OOS) template named
ACS-SMC-CreateAndVerifyInstance
provided by Alibaba Cloud.In the Actions column of the destination migration source, click Verify Migration Result.
In the dialog box that appears, read the instructions on the verification process and click Verify Now.
You can also click Customize Verification Parameters to configure the parameters.
In the Verify Migration Result column, view the verification result. Valid values:
Verified: Indicates that the migration is successful. You can click View Output Parameters to check the details.
Not Verified: Indicates that the migration failed. You can click View Cause to view the cause of errors and troubleshoot issues.
You can also click
in the Actions column, and select View Verification Records in OOS Console to view the template history.
After the server is migrated, you must perform the following operations to ensure normal operation of your business:
Verify the integrity and correctness of the data. For more information, see the How do I check my system after I migrate a Linux server? or How do I check my system after I migrate a Windows server? section of the "FAQ" topic.
Manually start the applications and services after the migration if automatic start is not enabled for the applications and services on the source server.
The IP address changes after the migration job is complete. Change the IP address of the server after the migration if your business involves IP address configuration.
If a domain name has been bound to the source server, the public IP address of the server is changed after the migration. In this case, you must resolve the domain name to the new public IP address of the server. For more information, see Add an A record for a website domain name.
If you want to keep the private IP address unchanged, you can modify the private IP address after the migration is complete. For more information, see Primary private IP address.
Clear resources
During migration, SMC will create a temporary pay-as-you-go intermediate instance named No_Delete_SMC_Transition_Instance
under your Alibaba Cloud account to assist with migration. The method to clear resources depends on whether the migration is successful.
If the migration is successful, the intermediate instance is automatically released. No manual operation is required.
If the migration fails, the intermediate instance is not automatically released and incurs fees as long as the migration job exists. You can release the intermediate instance in one of the following ways to reduce costs:
If you confirms that you no longer need the migration task, click the workgroup ID, click the migration source ID, and click Clear Migration Job in the Actions column of the migration task to automatically clear the intermediate instance.
Manually release the intermediate instance. For more information, see Release an instance.
References
If you need to migrate a single server, see: