All Products
Search
Document Center

Elastic Compute Service:Operating system migration

Last Updated:Jul 19, 2025

When technical support for an operating system is discontinued due to reasons such as end of lifecycle, end of third-party support, or evolution of open source projects, you can use the operating system migration feature to replace or upgrade the operating system. This lets you obtain stable system maintenance and technical support while retaining the data on the system disk of your Elastic Compute Service (ECS) instance.

Scenarios

When the operating system of your ECS instance enters the end of life (EOL) phase as described in Operating system lifecycle overview, you may face increased security and usage risks. In this case, we recommend that you replace the operating system that is in the EOL phase as soon as possible. The operating system migration feature lets you retain your existing application data after replacing the operating system, but provides only some operating system migration options.

If you do not need to retain the data on the system disk or require more operating system conversion options, you can change the operating system by replacing the system disk. You can also refer to Operating system maintenance cycle and EOL guidance to obtain the recommended migration solution and detailed handling methods for your current operating system.

Pre-migration assessment

Before performing the migration, we strongly recommend that you understand the migration limits of the corresponding operating system and perform comprehensive testing and validation of all your business applications in the target operating system environment in advance. This helps ensure compatibility and performance between the applications and the target operating system, effectively avoiding issues such as business operation problems or function failures that may occur after migration.

The operating system migration tool does not support hot migration. During migration, the system kernel and software packages of the source instance will be installed or updated, and the instance will automatically restart multiple times, causing business interruptions. Therefore, before migration, you need to create snapshots to back up data and isolate the operating system environment to be migrated to avoid affecting normal business operations.

Source operating system is Windows

Migration limits

Important

Please make sure you understand the following notes before migrating the operating system.

  • Cross-language migration of Windows operating systems is not supported.

  • The ECS instance whose Windows operating system is to be migrated must have at least 2 vCPUs and 2 GiB of memory.

  • The migration tool consumes resources to download and install software packages during the migration process. Therefore, make sure that the available space of the C drive on the instance is at least 20 GiB, and the available space is larger than the size of the C:\Windows directory.

  • Only the following regions support Windows operating system migration.

    Asia Pacific - China

    Asia Pacific - Others

    Europe and 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)

    SAU (Riyadh - Partner Region)

Supported operating systems for migration

The ECS operating system migration feature supports migration to the following operating systems.

Windows Server 2008 R2

Windows Server 2008 R2 has reached end of support. You can migrate it to Windows Server 2016/2019, which are in the mainstream support phase, to host your business.

Important

Due to limitations of the Windows operating system migration feature, you cannot directly migrate from Windows Server 2008 R2 to Windows Server 2016/2019. You need to first migrate to the transitional version Windows Server 2012 R2.

  1. Migrate Windows Server 2008 R2 to the transitional version Windows Server 2012 R2.

    Operating system 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

  2. Migrate Windows Server 2012 R2 to Windows Server 2016/2019.

    Operating system 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 end of support. You can migrate it to Windows Server 2016/2019, which are in the mainstream support phase, to host your business.

Operating system architecture

Source operating system

Destination operating system

x86

Windows Server 2012 R2 Standard 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 Datacenter Edition 64-bit Chinese/English

Windows Server 2016

Operating system architecture

Source operating system

Destination operating system

x86

Windows Server 2016 Standard Edition 64-bit Chinese/English

  • Windows Server 2019 Datacenter Edition 64-bit Chinese/English

  • Windows Server 2022 Datacenter Edition 64-bit Chinese/English

Windows Server 2016 Datacenter Edition 64-bit Chinese/English

Windows Server 2019

Operating system 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

Migration limits

Important

Please make sure you understand the following notes before migrating the operating system.

Limit category

Description

General limit

  • Anolis OS and Alibaba Cloud Linux do not provide i686-based software packages. If your CentOS operating system is equipped with i386-based or i686-based software packages, you cannot migrate to Anolis OS or Alibaba Cloud Linux.

  • The migration tool consumes resources when software packages are downloaded and installed during migration. Before you migrate an operating system of an ECS instance, make sure that the following resources are available:

    • Memory size: 600 MiB

    • Available disk capacity for the following directories:

      • /usr: 250 MiB

      • /var: 4 GiB

      • /boot: 100 MiB

    Note

    If your instance has a small number of vCPUs, a small amount of memory, and a small amount of storage capacity for the system disk and data disks, we recommend that you stop the services that are running on the instance before you perform migration. This helps prevent migration failures caused by insufficient resources.

Kernel compatibility limits for migrating CentOS 7/8 to Alibaba Cloud Linux

The following compatibility limits exist between CentOS 7/8 and Alibaba Cloud Linux operating systems. If your business uses applications that depend on kernel APIs for different purposes, such as building out-of-tree kernel modules and using hardware resources, you must assess the applications in advance to determine whether the applications can run as expected after direct migration.

Limit category

Description

Limit on migrating from CentOS 7 to Alibaba Cloud Linux 2

Alibaba Cloud Linux 2 uses kernel version 4.19, which is incompatible with kernel version 3.10 of CentOS 7.

Limit on migrating from CentOS 7 to Alibaba Cloud Linux 3

CentOS 7 uses kernel version 3.10. Alibaba Cloud Linux 3 uses Linux Kernel 5.10 LTS. The GNU toolchain of Alibaba Cloud Linux 3 contains GCC 10.2, Binutils 2.35, and glibc 2.32. These two kernel versions are incompatible with each other.

Limit on migrating from CentOS 8 to Alibaba Cloud Linux 3

Alibaba Cloud Linux 3 uses Linux Kernel 5.10 LTS. The GNU toolchain of Alibaba Cloud Linux 3 contains GCC 10.2, Binutils 2.35, and glibc 2.32. Alibaba Cloud Linux 3 is compatible with the CentOS 8 ecosystem. The operating system migration tool performs a basic assessment on the source operating system, but you still need to perform your own migration assessment before migration to prevent business operation issues after migration.

The following table describes the limits on migrating features or software related to your operating system:

Feature or software

Supported

Migration affected

Description

i386-based software package

Not supported

Yes

Alibaba Cloud Linux does not provide i386-based software packages. If your current system contains i386-based software packages, you cannot use the migration tool to migrate the operating system. You need to delete these packages before performing migration to prevent system exceptions during migration.

epel-modular

Not supported

No

The platform on which the EPEL repository of CentOS 7/8 depends is different from that of Alibaba Cloud Linux 3. After migration, you cannot install software packages based on epel-modular.

Compatibility with C/C++ programs

Not guaranteed

No

Alibaba Cloud Linux 3 is equipped with software packages that provide better compatibility with C/C++ programs. The GNU toolchain of Alibaba Cloud Linux 3 contains GCC 10.2, Binutils 2.35, and glibc 2.32. After you migrate an operating system, we recommend that you compile and verify your C/C++ programs using the new GNU toolchain to prevent incompatibility issues.

MySQL database

Only migrations to the same or later MySQL versions are supported

  • If the target MySQL version is the same as or later than the source MySQL version, the migration performance is not affected

  • If the target MySQL version is earlier than the source MySQL version, the migration performance is affected

Alibaba Cloud Linux 3 supports MySQL. However, MySQL version downgrades are not supported. If the MySQL version provided by Alibaba Cloud Linux 3 is earlier than the MySQL version provided by CentOS 7 or 8, you cannot use the migration tool to migrate operating systems.

Supported operating systems for migration

The ECS operating system migration feature supports migration to the following operating systems.

Migrate CentOS 7 or CentOS 8

Operating system architecture

Source operating system

Destination operating system

x86

CentOS 7.x

  • AnolisOS 7

  • AnolisOS 8

  • Alibaba Cloud Linux 2

  • Alibaba Cloud Linux 3

    Note

    For more information about Alibaba Cloud Linux, see What is Alibaba Cloud Linux?.

CentOS 7.9

RHEL 7

Note

This feature is supported only for specific users. If you want to use this feature, you can apply for a trial.

CentOS 8.x

  • AnolisOS 8

  • Alibaba Cloud Linux 3

CentOS 8.5

RHEL 8

Note

This feature is supported only for specific users. If you want to use this feature, you can apply for a trial.

ARM64

CentOS 7.x

  • AnolisOS 7

  • AnolisOS 8

  • Alibaba Cloud Linux 3

CentOS 8.x

  • AnolisOS 8

  • Alibaba Cloud Linux 3

Migrate RHEL 7 or RHEL 8

Operating system architecture

Source operating system

Destination operating system

x86

RHEL 7.9

  • Alibaba Cloud Linux 3

  • RedHat 8

    Note

    You cannot specify to migrate to a specific minor version of Red Hat during migration.

RHEL 8.x

  • RedHat 9

    Note

    You cannot specify to migrate to a specific minor version of Red Hat during migration.

  • Alibaba Cloud Linux 3

Upgrade Alibaba Cloud Linux 2

Operating system architecture

Source operating system

Destination operating system

x86

Alibaba Cloud Linux 2

Alibaba Cloud Linux 3

Migration preparation

  • Resource Access Management (RAM) is activated. Server Migration Center (SMC) is granted the permissions to access cloud resources.

    To grant the access permissions to SMC, log on to the RAM console and click Authorize to complete the authorization.

    Note

    If you use a RAM user, log on to the RAM console with the corresponding Alibaba Cloud account and grant the AliyunSMCFullAccess policy permissions to the RAM user.

  • The ECS Snapshot service is activated. Snapshots are created for an ECS instance when the operating system of the instance is being migrated. For more information, see Activate ECS Snapshot.

  • The ECS instance whose operating system you want to migrate is in the Running state. Cloud Assistant Agent is installed and ran on the instance within the previous 24 hours. For information about how to install Cloud Assistant Agent, see Install Cloud Assistant Agent.

Migration procedure

Warning
  • During the migration, the system automatically creates snapshots for basic disks on the ECS instance, changes the operating system kernel version, re-installs or upgrades software packages, and stops and then restarts the instance. To prevent your business from being affected by these operations, we recommend that you back up important data in advance and select an appropriate time to perform the migration.

  • During the migration process, do not manually or through maintenance scripts perform operations such as stopping, restarting, or releasing the ECS instance, as this may cause the migration to fail.

  • If you perform a migration test or cancel a migration on an ECS instance, all disks on the instance may be automatically rolled back to snapshots created before the migration. In this case, the data generated during the migration is lost.

  • During Windows migration, the Windows installation media snapshot resource will be automatically shared with the Alibaba Cloud account being migrated, and a transit disk will be created from this snapshot and attached to the instance. Do not operate this disk during migration. The transit disk will be automatically detached and released after the migration is complete.

  • During migration, the system performs migration condition checks and pre-migration assessments on the source instance. If the source system does not meet the migration conditions or the pre-migration assessment fails, the migration will be interrupted with an error and cannot guarantee successful migration. We recommend that you familiarize yourself with the migration conditions and error troubleshooting documentation in advance and perform tests.

  1. Optional. Perform the following operations if you want to migrate a CentOS 7 or CentOS 8 operating system to RHEL 7 or RHEL 8. Otherwise, skip this step.

    1. If the Security Center agent is installed on the source operating system, uninstall it.

      Note

      You 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.

      After the agent is uninstalled, Security Center still protects your server for 24 hours. If you want to reinstall the agent, install the agent 24 hours later. If you want to reinstall the agent within 24 hours after the agent is uninstalled, you must run the installation command at least three times and ignore the error messages during the installation. Otherwise, the reinstalled agent is automatically uninstalled.

      1. 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.

      2. 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"; f

        If Uninstall Success is returned, the Security Center agent is uninstalled.

    2. Run the following command to upgrade 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 # Upgrade 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 # Upgrade and restart the operating system. yum -y update reboot
  2. Open the Replace Operating System dialog box.

    1. Go to ECS console - Instance.

    2. In the top navigation bar, select the region of the ECS instance.image.png

    3. Click the ID of the target instance to go to the instance details page, click All Actions to expand all operation panels, then search for and click Replace Operating System.

  3. Select Migrate Operating System. Wait for the system to automatically perform a pre-migration check, which takes about 10 seconds. When the pre-check status changes from image to image, it indicates that the pre-check has passed.

  1. Read the operating system migration notes carefully, select I Acknowledge And Accept These Risks And Authorize Alibaba Cloud To Create Snapshots For All Disks On The ECS Instance. Then click Next.

    Note

    To migrate the operating systems of multiple ECS instances at a time, select the ECS instances whose operating systems you want to migrate.

  2. In the Replace Operating System dialog box, select a destination operating system based on your requirements.

    1. Select The Same Destination Operating System: If you migrate the operating systems of multiple ECS instances at a time, you can select this option and specify a destination operating system for all the selected instances.

    2. Select Destination Operating System By Instance: If you migrate the operating systems of multiple ECS instances at a time, you can select this option and specify a destination operating system for each selected instance.

  3. Click Check For Migratability to view the migration check results. The check takes about 30 seconds, please be patient. When the status shows image, click Migrate.

Migration validation

  1. In the Replace Operating System dialog box, click the instance ID. On the Instance Details tab, check whether the operating system of the ECS instance is migrated based on the value of the Instance Status parameter.

    Note

    Approximately 15 to 30 minutes are required to migrate the operating system. This excludes the time that is required to create snapshots. During the migration, you can move the pointer over Replacing Operating System to view the progress of the migration task.

  1. If the operating system is migrated, the value of the Instance Status parameter changes from Running (Replacing Operating System) to Running.

    Important

    If the instance status shows Running (Operating System Replacement Failed), it indicates that the operating system migration has failed. You can move the pointer over Operating System Replacement Failed to view the cause of the failure, click Identify Issue & Contact Us to resolve the issue. After the issue is resolved, click Retry Replacement to migrate the operating system of the ECS instance again.

  2. After the migration is complete, the instance automatically restarts. The instance ID, image ID, VPC, public and private IP addresses, and hostname remain unchanged. The operating system is changed to the destination operating system. The data on the original system disk is retained. However, your applications may not function as expected due to changes in the environment or dependencies, which can affect your services. Therefore, you must perform tests to verify the outcome of the migration. To roll back the data on the source system disk, you can use the snapshot that was automatically created for backup to roll back a disk.

What to do next