All Products
Search
Document Center

Server Migration Center:Create an operating system migration job

Last Updated:Apr 23, 2024

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.

Note

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

  • AnolisOS 7

  • AnolisOS 8

  • Red Hat 7

    Important

    Only a CentOS 7.9 operating system can be migrated to Red Hat 7.

  • Alibaba Cloud Linux 2

  • Alibaba Cloud Linux 3

CentOS 8

  • AnolisOS 8

  • Red Hat 8

    Important

    Only a CentOS 8.5 operating system can be migrated to Red Hat 8.

  • Alibaba Cloud Linux 3

  • Red Hat 7

    Important

    Only Red Hat 7.9 is supported.

  • Red Hat 8

Alibaba Cloud Linux 3

Alibaba Cloud Linux 2

Alibaba Cloud Linux 3

ARM64

CentOS 7

  • AnolisOS 7

  • AnolisOS 8

  • Alibaba Cloud Linux 3

CentOS 8

  • AnolisOS 8

  • Alibaba Cloud Linux 3

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 2008 R2 64-bit (Chinese/English)

  • Windows Server 2008 R2 Enterprise 64-bit (Chinese/English)

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.

  • Windows Server 2012 R2 64-bit (Chinese/English)

  • Windows Server 2012 R2 Datacenter 64-bit (Chinese/English)

  • Windows Server 2016 Datacenter 64-bit (Chinese/English)

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

  • Windows Server 2016 64-bit (Chinese/English)

  • Windows Server 2016 Datacenter 64-bit (Chinese/English)

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

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

    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.

      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"; fi

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

    2. 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
  2. Import the information about the migration source.

    You can import the information about a migration source by using one of the following methods:

  3. Create and start the migration job.

    1. On the Migration Sources page, find the migration source generated for the source operating system, and click Create Migration Job in the Actions column.

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

      image

    3. Click Create.

    4. In the Migrate Operating System dialog box, read the message and click Got It.

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

      image

      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.

      image

    • 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:

      1. Log on to the ECS console.

      2. In the left-side navigation pane, choose Storage & Snapshots > Snapshots.

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

      4. In the Roll Back Disk message, click OK.

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

    Note

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