You can use Server Migration Center (SMC) to migrate servers in data centers, on-premises VMs, or servers on third-party cloud platforms to Alibaba Cloud. You can also migrate an Elastic Compute Service (ECS) instance to another ECS instance within the same Alibaba Cloud account or across different Alibaba Cloud accounts. This topic describes how to use SMC to migrate servers between ECS instances within an Alibaba Cloud account or across different Alibaba Cloud accounts.
Prerequisites
The preparations for the migration are complete. For example, an Alibaba Cloud account is created, real-name verification is complete, Resource Access Management (RAM) is activated, and SMC is authorized to access your cloud resources. For more information, see Before you begin.
Background information
To migrate servers between ECS instances, we recommend that you copy an image from a region to another within an Alibaba Cloud account, or share an image with a different Alibaba Cloud account. For more information, see Copy an image and Share a custom image. If the preceding methods do not meet your requirements, you can follow the instructions provided in this topic to migrate servers between ECS instances.
When you use SMC, you are charged only for the ECS resources that you use during the migration. For more information, see Billing.
Usage notes
If you migrate a server for the first time, we recommend that you perform a test migration. Before you start the migration job, take note of the information in the following table.
Item | Description |
Username | If you migrate servers between ECS instances across different Alibaba Cloud accounts, you must download and install an SMC client on the source ECS instance. Then, you need to enter the AccessKey pair of the Alibaba Cloud account that owns the destination ECS instance. |
Data security | To prevent data loss, we recommend that you create snapshots for your cloud disk. For information about how to create snapshots, see Create a snapshot of a disk. |
Migration speed | During the migration, the network environment, CPU, memory, and disk performance of the source server affect the migration speed.
For more information, see Estimate the time required for migration and test the data transfer speed. |
IP addresses | After the migration is complete, the public and private IP addresses are reassigned when you use an image to create an ECS instance.
|
Underlying hardware | After the migration is complete, the application licenses that are associated with the underlying hardware may become invalid. |
Scenarios
You can migrate servers between ECS instances in the following scenarios:
Scenario 1: Migrate servers between ECS instances across different Alibaba Cloud accounts
In this scenario, you can migrate servers between ECS instances across different Alibaba Cloud accounts. The ECS instances can reside in the same region or different regions. For example, you can migrate an ECS instance that belongs to Alibaba Cloud Account A to another ECS instance that belongs to Alibaba Cloud Account B.
Scenario 2: Migrate servers between ECS instances within an Alibaba Cloud account
In this scenario, you can migrate servers between ECS instances within the same Alibaba Cloud account. The ECS instances can reside in the same region or different regions. For example, you can migrate an ECS instance to an ECS image or another ECS instance within Alibaba Cloud Account A.
In this scenario, you can also shrink the disk of an ECS instance by migrating the ECS instance to a custom image or another ECS instance that has a smaller disk. This is because ECS does not support system disk shrinking or data disk shrinking. For more information, see Shrink a disk.
Step 1: Import the information about a migration source
Perform the operations for importing the information about a migration source based on the migration scenario in which you migrate servers between ECS instances within an Alibaba Cloud account or across different Alibaba Cloud accounts.
Migrate servers between ECS instances within an Alibaba Cloud account
Multiple methods are supported in SMC to import the information about a migration source. For more information, see the following topics:
Import the information about a migration source by using the SMC console
Import the information about a migration source by using the CLI
Import the information about a migration source by using the SMC client
We recommend that you migrate servers between ECS instances within an Alibaba Cloud account in the SMC console. To do so, perform the following steps:
Log on to the SMC console.
In the left-side navigation pane, click Migration Sources.
On the Migration Sources page, click Import Migration source to import the source ECS instance.
Configure the parameters based on the type of your migration source. The following table describes the parameters.
Parameter
Description
Migration Source Type
The type of the migration source. Select ECS. By default, Install SMC Client is selected.
ImportantThe SMC client allows you to migrate servers or operating systems, migrate ECS instances across zones, or migrate your source server to Alibaba Cloud WUYING Workspace. If the SMC client is not installed, you can only migrate ECS instances across zones.
Import Method
The method that is used to import the information about the migration source. Select Import through Console.
Region
The region in which the source ECS instance resides.
Instance
The ECS instance whose information you want to import to SMC. You can select multiple ECS instances to import the information about the ECS instances at a time.
You can enter the instance ID, instance name, private IP address, public IP address, or elastic IP address (EIP) in the search box to search for an ECS instance.
After you configure the parameters, click Import.
The import process takes about 3 to 10 minutes. Wait until the migration source is imported.
You can view the import status on the Migration Sources page. If the value in the Migration Source Status column changes from Importing to Online for a migration source, the information about the migration source is imported.
If the value in the Migration Source Status column is Import Failed for a migration source, you can click the icon to view the error message, troubleshoot the error based on the error message, and then import the information about the migration source again. If the information about the migration source fails to be imported or an error occurs during the migration, you can check the log files in the directory of the SMC client for more information. By default, the SMC client is installed in the following directory:
Windows: C:\smc
Linux: /smc
For more information, see Troubleshooting and FAQ.
NoteThe information about ECS instances whose information has been imported to SMC cannot be imported again. If you select one or more ECS instances whose information has been imported to SMC, a message appears to notify you.
Migrate servers between ECS instances across different Alibaba Cloud accounts
Multiple methods are supported in SMC to import the information about a migration source. For more information, see the following topics:
Import the information about a migration source by using the CLI
Import the information about a migration source by using the SMC client
We recommend that you migrate servers between ECS instances across different Alibaba Cloud accounts by using the CLI. To do so, perform the following steps:
If you want to use the SMC client to import a migration source, you need to download and install an SMC client on the source ECS instance. Then, you need to log on to the SMC console by using the Alibaba Cloud account that owns the destination ECS instance and create a migration job. When you import the information about a migration source, you must enter the activation code or the AccessKey pair of the Alibaba Cloud account that owns the destination ECS instance.
Log on to the SMC console by using the Alibaba Cloud account that owns the destination ECS instance.
ImportantYou must distinguish the Alibaba Cloud accounts that own the source and destination ECS instances.
In the left-side navigation pane, click Migration Sources.
On the Migration Sources page, click Import Migration source to import the source ECS instance.
Configure the parameters to obtain the activation code.
The following table describes the parameters.
Parameter
Description
Migration Source Type
The type of the migration source. Select ECS Instance.
Import Method
The method that is used to import the information about the migration source. Select Use CLI to Import Server.
Migration Source Quota
The number of migration sources whose information can be imported by using the activation code. Valid values: 1 to 1000. Default value: 10.
Validity Period
The validity period of the activation code. Unit: days. Valid values: 1 to 90. Default value: 30.
Activation Code
Generate the activation code and copy the command by performing the following steps:
Click Generate.
Click the Linux Shell or Windows Powershell tab based on the OS of the server.
Click Copy to copy the command.
Connect to the source server and run the copied command as an administrator to import the information about the migration source.
Perform the operations to import the information about a migration source based on the OS of the source server.
Step 2: Create and start a migration job
Log on to the SMC console by using the Alibaba Cloud account that owns the destination ECS instance.
ImportantIf you want to migrate servers between ECS instances across Alibaba Cloud accounts, you must distinguish the Alibaba Cloud accounts that own the source and destination ECS instances.
In the left-side navigation pane, click Migration Sources.
On the Migration Sources page, find the migration source for which you want to create a migration job and click Create Migration Job in the Actions column.
In the Create Migration Job dialog box, read the instructions and configure parameters for the migration job. For more information, see Create a server migration job.
NoteWe recommend that you select VPC as the network type when you create a migration job. Compared with migration over the Internet, migration over a VPC is more efficient and stable.
What to do next
After the migration job is complete, perform the following operations based on the specified destination type:
If you migrate an ECS instance to an ECS image, create an ECS instance based on the image. For more information, see Create an ECS instance by using a custom image.
If you migrate an ECS instance to another ECS instance, view the destination ECS instance in the ECS console.