After you import the information about a migration source, Server Migration Center (SMC) automatically generates a record for the migration source. You can create and start an operating system migration job for the migration source in the SMC console. This topic describes how to create and start a migration job.
For more information about operating system migration, see Migrate a Linux operating system and Migrate a Windows operating system.
Prerequisites
The information about your migration source is imported. You can import the information about a migration source by using one of the following methods:
Limits
The operating system that you want to migrate must be the operating system of an Elastic Compute Service (ECS) instance in the current Alibaba Cloud account and an operating system listed in the Scenarios section. For more information about the limits, see the following topics:
Scenarios
Linux
The following table describes the x86- or ARM64-based operating systems that can be migrated by using SMC and the corresponding operating systems to which they can be migrated.
Operating system architecture | Source operating system | Destination operating system |
X86 | CentOS 7 |
|
CentOS 8 |
| |
| Alibaba Cloud Linux 3 | |
Alibaba Cloud Linux 2 | Alibaba Cloud Linux 3 | |
ARM64 | CentOS 7 |
|
CentOS 8 |
|
Windows
The following table describes the x86-based operating systems that can be migrated by using SMC and the operating systems that can serve as migration destinations.
Operating system architecture | Source operating system | Destination operating system |
X86 |
| Windows Server 2012 R2 Datacenter 64-bit (Chinese/English) Important The language of the destination operating system must be the same as that of the source operating system. |
|
Important The language of the destination operating system must be the same as that of the source operating system. | |
| Windows Server 2019 Datacenter 64-bit (Chinese/English) Important The language of the destination operating system must be the same as that of the source operating system. |
Procedure
Perform the following operations if you want to migrate a CentOS 7 or CentOS 8 operating system to Red Hat 7 or Red Hat 8. Otherwise, skip this step.
If the Security Center agent is installed on the source operating system, uninstall it.
NoteYou can reinstall the Security Center agent after the migration and system upgrade are complete. For more information, see the Manually install the Security Center agent section of the "Install the Security Center agent" topic.
Go to the Feature Settings page of the Security Center console. Find the server from which you want to uninstall the Security Center agent and uninstall the Security Center agent. For more information, see Uninstall the Security Center agent.
Use a remote connection tool to connect to the server and run the following commands:
wget "http://update2.aegis.aliyun.com/download/uninstall.sh" && chmod +x uninstall.sh && ./uninstall.sh if ! lsmod | grep AliSecGuard; then echo 'Uninstall Success'; else echo "Uninstall Failed"; fi
If
Uninstall Success
is returned, the Security Center agent is uninstalled.
Run the following command to update the source operating system to the latest kernel version:
CentOS 7
# Back up the source YUM software repository and replace it with the Alibaba Cloud repository of CentOS 7. mv /etc/yum.repos.d/ /etc/yum.repos.d.backup/ mkdir -p /etc/yum.repos.d/ wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo yum clean all yum makecache # Update and restart the operating system. yum -y update reboot
CentOS 8
# Back up the source YUM software repository and replace it with the Alibaba Cloud repository of CentOS 8. mv /etc/yum.repos.d/ /etc/yum.repos.d.backup/ mkdir -p /etc/yum.repos.d/ wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.aliyuncs.com/repo/Centos-8.repo wget -O /etc/yum.repos.d/epel-archive-8.repo http://mirrors.cloud.aliyuncs.com/repo/epel-archive-8.repo yum clean all yum makecache # Update and restart the operating system. yum -y update reboot
Import the information about the migration source.
You can import the information about a migration source by using one of the following methods:
Create and start the migration job.
On the Migration Sources page, find the migration source generated for the source operating system, and click Create Migration Job in the Actions column.
In the Create Migration Job dialog box, configure the parameters to create an operating system migration job.
The following table describes the parameters that you can configure to create an operating system migration job.
Parameter
Description
Migration Job Type
The type of the migration job. Select Operating System Migration.
Current Operating System
By default, the current operating system is displayed and cannot be modified. In this example, CentOS 7 is displayed.
Destination Operating System
The operating system to which you want to migrate the source operating system. Select an operating system from the drop-down list. In this example, Alibaba Cloud Linux 3 is selected.
Migration Test
Specifies whether to enable the migration test feature. A migration test is a process of simulating and verifying a migration solution before you perform an actual migration. A migration test helps you fully understand the feasibility and risks of a migration solution before you perform an actual migration. This reduces the issues and losses that may occur during the actual migration.
A migration test helps you identify issues that may occur during the migration, provides solutions to the issues, and improves the migration success rate.
By default, the migration test feature is enabled. You can perform a migration test only on migration sources that run the Linux operating system. For more information, see Configure a migration test.
Execution Method
The mode in which you want to perform a migration test. By default, Test and Migrate is selected. Valid values:
Test Only: The system performs only the migration test. After the migration test is complete, you must manually start the operating system migration job.
Test and Migrate: The system performs the migration test. After the migration test is complete, if no test items are in the Critical state, the system automatically starts the operating system migration job.
Click Create.
In the Migrate Operating System dialog box, read the message and click Got It.
On the Operating System Migration tab of the Migration Jobs page, wait until the migration job is complete.
If the migration job enters the Completed state, the operating system is migrated.
In the Instance ID/Name column of the migration job, view and record the ECS instance ID. On the Instances page of the ECS console, find the ECS instance based on the ECS instance ID and go to the details page of the ECS instance. In the Configuration Information section of the Instance Details tab of the instance details page, you can find that the source operating system is migrated to the destination operating system.
If the migration job enters the InError state, the migration fails. You can check the logs to troubleshoot the failure. Then, restart the migration job. For more information about common issues and troubleshooting, see FAQ and Troubleshoot operating system migration failures (Linux).
If you want to roll back the system disk on which the source operating system is installed, you can use the snapshots that are automatically created for the system disk. To roll back the system disk, perform the following steps:
Log on to the ECS console.
In the left-side navigation pane, choose
.On the Disk Snapshots tab, find the snapshot that you want to use to roll back the system disk, and click Roll Back Disk in the Actions column.
In the Roll Back Disk message, click OK.
Wait until the operating system starts.
After the migration job is complete, the ECS instance automatically restarts. During the system initialization phase, operations such as software package updates are performed. Do not perform operations on the ECS instance or within the operating system until the operating system starts.
NoteThe system initialization phase takes about 10 minutes. The actual time varies based on the number of system software packages to be processed.
References
If an error is reported, resolve the error based on the error log and restart the migration job.
For information about frequently asked questions and solutions, see Troubleshoot operating system migration failures (Linux) and Troubleshoot operating system migration failures (Windows).
SMC provides several methods for you to obtain technical support. For more information, see Contact us.