This feature lets you replace or upgrade the operating system of your ECS instance, ensuring stable maintenance and support while retaining data on the system disk.
Use cases
When the operating system on your ECS instance reaches its end of life (EOL), you may face increased security and operational risks. We recommend replacing the EOL operating system as soon as possible. The OS migration feature lets you retain application data after the replacement, but it only supports a limited number of OS migration options.
If you do not need to retain the data on your system disk or if you require more OS options, replace the system disk to change the operating system. You can also refer to the Operating system maintenance cycle and EOL guidance for recommended migration plans and detailed procedures for your current operating system.
Pre-migration assessment
Before starting the migration, understand the limitations of the destination operating system and conduct comprehensive testing to validate all your business applications in the target environment. This ensures compatibility and performance and prevents potential issues like service disruptions or feature failures after the migration.
The OS migration tool does not support hot migration. During the migration, the source instance's system kernel and software packages are installed or updated, and the instance restarts multiple times, causing service interruptions. Therefore, before you begin, manually create a snapshot to back up your data and isolate the migration environment to avoid affecting your production workload.
Source operating system is Windows
Limitations
Before you migrate the operating system, understand the following limitations.
-
Cross-language migration for Windows is not supported.
-
Only specific migration paths are supported.
-
The source Windows ECS instance must have an instance type with at least 2 vCPUs and 2 GiB of memory.
-
The operating system migration tool consumes resources to download and install software packages. Before you start the migration, ensure the instance's C drive has at least 20 GiB of free space. This amount must be greater than the size of the
C:\Windowsdirectory. -
You cannot migrate an ECS instance while a snapshot is in progress. Wait for the snapshot to complete before starting the migration.
-
Windows operating system migration is supported only in the following regions.
Asia Pacific - China
Asia Pacific - Other
Europe & Americas
Middle East
-
China (Hangzhou)
-
China (Shanghai)
-
China (Qingdao)
-
China (Beijing)
-
China (Zhangjiakou)
-
China (Hohhot)
-
China (Ulanqab)
-
China (Shenzhen)
-
China (Heyuan)
-
China (Guangzhou)
-
China (Chengdu)
-
China (Hong Kong)
-
China (Wuhan-Local Region)
-
Japan (Tokyo)
-
South Korea (Seoul)
-
Singapore
-
Malaysia (Kuala Lumpur)
-
Indonesia (Jakarta)
-
Philippines (Manila)
-
Thailand (Bangkok)
-
Germany (Frankfurt)
-
UK (London)
-
US (Silicon Valley)
-
US (Virginia)
Saudi Arabia (Riyadh)
-
Supported OS for migration
The ECS OS migration feature supports migrating your instance to the following operating systems.
Windows Server 2008 R2
Windows Server 2008 R2 has reached its EOL. You can migrate your workloads to Windows Server 2016 or 2019, which are in mainstream support.
Windows migration limitations prevent a direct migration from Windows Server 2008 R2 to Windows Server 2016 or 2019. You must first migrate to an intermediate version, Windows Server 2012 R2.
-
Migrate Windows Server 2008 R2 to the intermediate version, Windows Server 2012 R2.
OS architecture
Source operating system
Destination operating system
x86
Windows Server 2008 R2 Standard Edition 64-bit (Chinese/English)
Windows Server 2012 R2 Datacenter Edition 64-bit (Chinese/English)
Windows Server 2008 R2 Enterprise Edition 64-bit (Chinese/English)
-
Migrate Windows Server 2012 R2 to Windows Server 2016 or 2019.
OS architecture
Source operating system
Destination operating system
x86
Windows Server 2012 R2 Datacenter Edition 64-bit (Chinese/English)
-
Windows Server 2016 Datacenter Edition 64-bit (Chinese/English)
-
Windows Server 2019 Datacenter Edition 64-bit (Chinese/English)
-
Windows Server 2012 R2
Windows Server 2012 R2 has reached its EOL. You can migrate your workloads to Windows Server 2016 or 2019, which are in mainstream support.
|
OS architecture |
Source operating system |
Destination operating system |
|
x86 |
Windows Server 2012 R2 Standard Edition 64-bit (Chinese/English) |
|
|
Windows Server 2012 R2 Datacenter Edition 64-bit (Chinese/English) |
Windows Server 2016
|
OS architecture |
Source operating system |
Destination operating system |
|
x86 |
Windows Server 2016 Standard Edition 64-bit (Chinese/English) |
|
|
Windows Server 2016 Datacenter Edition 64-bit (Chinese/English) |
Windows Server 2019
|
OS architecture |
Source operating system |
Destination operating system |
|
x86 |
Windows Server 2019 Datacenter Edition 64-bit (Chinese/English) |
Windows Server 2022 Datacenter Edition 64-bit (Chinese/English) |
Source operating system is Linux
Limitations
Before you migrate the operating system, understand the following limitations.
Category | Description |
General limitations |
|
You also need to be aware of the following migration limitations related to specific OS features or software:
Feature or software | Support status | Impact on migration | Description |
i386-architecture software packages | Not supported | Yes | Alibaba Cloud Linux does not provide i386-architecture software packages. If your system contains such packages, you cannot use the migration tool. Remove these packages before the migration to prevent system errors. |
epel-modular | Not supported | No | The platform dependencies for the EPEL repository in CentOS 7/8 differ from those in Alibaba Cloud Linux 3. After migration, you cannot install epel-modular-based software packages. |
C/C++ program compatibility | Not guaranteed | No | Alibaba Cloud Linux 3 uses a base toolchain with GCC 10.2, binutils 2.35, and glibc 2.32. Its system packages are pre-compiled for compatibility. After the OS migration, we recommend that you recompile and validate your C/C++ programs against the new base toolchain to avoid compatibility issues. |
MySQL database | Only migration to the same or a higher version of MySQL is supported. |
| Alibaba Cloud Linux 3 supports MySQL databases. However, MySQL does not support version downgrades. If the MySQL version available on Alibaba Cloud Linux 3 is lower than the version on the source CentOS 7/8 system, the OS migration is not supported. |
Supported OS for migration
The ECS OS migration feature supports migrating your instance to the following operating systems.
CentOS 7/8
|
Architecture |
Source |
Destination |
|
x86 |
CentOS 7.x |
|
|
CentOS 8.x |
|
|
|
ARM64 |
CentOS 7.x |
|
|
CentOS 8.x |
|
Red Hat 7/8
|
Architecture |
Source |
Destination |
|
x86 |
Red Hat 7.9 |
|
|
Red Hat 8.x |
|
Alibaba Cloud Linux 2
|
Architecture |
Source |
Destination |
|
x86 |
Alibaba Cloud Linux 2 |
Alibaba Cloud Linux 3 |
Prerequisites
Ensure that Resource Access Management (RAM) is activated and authorized.
If it is not authorized, log on to the RAM console and click Authorize.
NoteIf you are using a RAM user, log on to the RAM console with your primary account and grant the
AliyunSMCFullAccesspermission to the RAM user.Ensure that the snapshot service is activated. The system creates a snapshot of the ECS instance during migration. For more information, see Activate ECS Snapshot.
Ensure that the ECS instance is in the Running state, the Cloud Assistant Agent is installed and has been active within the last 24 hours. If it is not installed, see Install the Cloud Assistant Agent.
Procedure
During the migration, the system creates snapshots of basic cloud disks, converts the OS kernel version, reinstalls and upgrades software packages, and stops and starts the ECS instance. We recommend that you back up important data and schedule the migration during a maintenance window to minimize business impact.
Do not manually stop, restart, or release the ECS instance or use scripts to perform these operations during the migration. Otherwise, the migration may fail.
Performing a migration drill or canceling a migration may trigger an automatic rollback to the pre-migration snapshot. Data generated during the migration will be lost.
During a Windows migration, a snapshot of the Windows installation media is automatically shared with your Alibaba Cloud account. A transit cloud disk is created from this snapshot and attached to the instance. Do not perform any operations on this transit cloud disk. It is automatically detached and released after the migration is complete.
The system checks migration conditions and performs a pre-assessment on the source instance. If the source system does not meet the requirements or if the pre-assessment fails, the migration is interrupted. A successful migration is not guaranteed. We recommend that you familiarize yourself with the migration requirements and troubleshooting documentation and perform a test migration first.
Start the OS migration process.
Go to ECS console - Instances.
In the top navigation bar, select the region where the target ECS instance is located.

Click the ID of the target instance to go to its details page. Click All Operations to expand the operations panel, then search for and click .
Select OS Migration. The system automatically performs a pre-migration check, which takes about 10 seconds. The check passes when the status changes from
to
.
Carefully read the OS migration notes, select I have read and understood the risks, and I agree to authorize Alibaba Cloud to create snapshots for all cloud disks of this instance, and then click Next.
NoteFor a batch migration, you must also select the ECS instances to be migrated.
In the Replace System Disk dialog box, select a destination operating system as needed.
Select the Same Destination Operating System: For a batch migration, you can migrate different instances to the same destination operating system.
Select Destination Operating System by Instance: Allows you to select a different destination OS for each instance in a batch migration.
Click Check For Migratability to view the results. The check takes about 30 seconds. After the status shows
, click Confirm Migration.
Migration verification
In the Replace System Disk dialog box, click the instance ID. On the Instance Details tab, check the Instance Status section to verify if the OS migration was successful.
NoteThe migration takes about 15 to 30 minutes, not including the time to create cloud disk snapshots. During the process, you can hover over Replacing Operating System to view the migration progress.
When the instance status changes from Running (Replacing Operating System) to Running, the OS migration is successful.
ImportantIf the instance status is Running (Operating System Replacement Failed), the OS migration has failed. You can hover over the status to view the cause of the failure. Click Troubleshooting & Contact Us to resolve the issue. After the issue is resolved, click Retry Replacement to attempt the migration again.
After the migration, the instance starts automatically. The instance ID, image ID, VPC, public and private IP addresses, hostname, and machine code remain unchanged. The operating system changes to the destination OS. The original system disk data is preserved, but applications may not work correctly due to environment or dependency changes. Perform thorough testing and verification. To revert to the source system, use the automatically created snapshot to roll back the cloud disk.
Next steps
Snapshots are automatically created for the ECS instance during migration. After a successful migration, delete any unneeded snapshots promptly to avoid additional costs. If you need to keep the snapshots, see Snapshot billing for detailed pricing rules.
View and manage the history of OS migration tasks in the SMC console. To learn more, see Server Migration Center (SMC).
For help with migration issues, see Troubleshoot OS migration issues (Windows), Troubleshoot OS migration issues (Linux), and the official Red Hat migration troubleshooting documentation.