Migrate lightweight servers to Alibaba Cloud Simple Application Server

更新时间:
复制 MD 格式

If you plan to migrate your existing lightweight server—such as a Tencent Cloud Simple Application Server, Huawei Cloud HECS instance, or AWS Lightsail instance—to Alibaba Cloud Simple Application Server (SAS), use Alibaba Cloud’s Server Migration Center (SMC). SMC is Alibaba Cloud’s migration platform designed to deliver accessible, consistent, and efficient migration services that meet your cloud migration needs.

Note
  • Alibaba Cloud Simple Application Server is a lightweight cloud server that is quick to deploy and easy to manage. It provides one-stop services for application deployment, security management, and service monitoring on a single server, improving your server experience and efficiency. For more information, see What is Simple Application Server?

  • If Alibaba Cloud Simple Application Server does not meet your business requirements, migrate your lightweight server from another cloud provider directly to an Alibaba Cloud ECS instance for more flexible resource configuration. For more information, see Migrate servers to Elastic Compute Service (ECS).

Limits

  • SMC does not support migrating Alibaba Cloud ECS instances to Alibaba Cloud Simple Application Server.

    Use the SCP command and Data Transmission Service (DTS) to migrate website applications deployed on an ECS instance to Simple Application Server. For more information, see Migrate ECS instances to Simple Application Server.

  • SMC does not support migrations between Alibaba Cloud Simple Application Server instances.

    To migrate data between Alibaba Cloud Simple Application Server instances, see Migrate data between Simple Application Servers.

  • You cannot migrate between Windows and Linux systems. Windows systems can only be migrated to Windows systems, and Linux systems can only be migrated to Linux systems.

  • The source lightweight server can have at most one data disk attached.

  • Migration dry runs are not supported. The migration process skips the dry run step and proceeds directly to the next step.

Migration impact

Review the following items before starting your migration.

Impact item

Description

Migrated data directories

During the migration, SMC automatically generates a disk partition structure on the destination that closely matches the source server's structure. You can adjust the partition structure of the destination disk, including its partition size, order, transfer method, and LVM configurations.

By default, all disks are migrated:

  • If a data disk does not have a mount target, the disk is not migrated.

  • If you do not need to migrate specific partition directories, exclude them when you adjust the partition structure.

For more information, see Adjust disk partition structure as needed.

Intermediate instance

Do not interfere with the intermediate instance.

Do not stop, start, restart, or release the intermediate instance, or change its billing method during migration. The intermediate instance is automatically released after migration.

Note
  • For each migration, SMC creates a temporary, pay-as-you-go intermediate instance named No_Delete_SMC_Transition_Instance in your destination Alibaba Cloud account to assist with the migration.

  • If you migrate to a destination instance, that instance serves as the intermediate instance and is not automatically released.

How it works.

IP address

The IP address changes after the migration, potentially causing service interruptions. Perform the migration during off-peak hours. If your services involve IP address configurations, you must update the domain name resolution and ICP filing after the migration.

Note

If a domain name is mapped to the source server, remap it to the new instance's public IP address. Add a website resolution.

Underlying hardware

The underlying hardware changes after the migration. This may invalidate certain application licenses that are bound to specific hardware. Review your license agreements.

Performance impact

The migration process consumes server resources, including CPU, memory, disk I/O, and network bandwidth.

Data consistency

Data consistency issues after migration.

Preparations

  • You have completed preparing for server migration.

  • Understand the SMC client, migration principles, billing, workflow, and feedback channels. For more information, see Migration guide.

  • Create an Alibaba Cloud Simple Application Server that meets compatibility requirements for storage and operating system relative to your source server. If you have not created a destination Alibaba Cloud Simple Application Server, see Create a Simple Application Server.

    Warning

    After migration, the original data in the Alibaba Cloud Simple Application Server instance will be purged (data on the server being migrated will not be affected). Therefore, if your Alibaba Cloud Simple Application Server instance contains important data, we recommend that you create a data backup.

    • Operating system consistency: The source and destination servers must run the same operating system type. Windows systems can only be migrated to Windows systems, and Linux systems can only be migrated to Linux systems.

    • Data disk count and capacity requirements:

      • The number of data disks attached to the destination server must be greater than or equal to the number on the source server. However, the destination instance supports at most one data disk. If your destination instance lacks sufficient data disks, attach exactly one data disk. For instructions, see Attach a data disk and Partition and format a data disk.

      • The capacity of the system disk and data disk on the destination server should be greater than or equal to those on the source server. If you plan to reduce disk size, ensure the destination disk capacity is at least equal to the actual used capacity of the corresponding source disk. If the destination disk capacity is insufficient, expand it first. For instructions, see Expand a data disk.

Migration procedure

Step 1: Import the migration source

A migration source refers to the server you want to migrate—such as an on-premises server, virtual machine, cloud host from another provider, or other server type. SMC supports multiple import methods. Choose the method that best fits your needs. For more information, see How to choose a migration source import method?

Import migration source with one-click command line (recommended)

Important
  • The source server must have public network access. If your source server uses a firewall, add the SMC domains and ports to your firewall whitelist. For details, see What are the SMC service domains?

  • If your source server cannot access the public network or you want to improve migration efficiency via private network transfer, use the SMC client import method.

  1. Go to the Server Migration page in the SMC console.

  2. On the Server Migration page, click Import Source Servers.

  3. Configure parameters as prompted and copy the activation command. The following table describes the parameters.

    Parameter

    Description

    Workgroup (optional)

    Applies only to batch migration to ECS images. Skip this parameter for single-server migration.

    You can group multiple migration sources into the same workgroup for management. Migration sources in a workgroup must enable automatic incremental synchronization. For instructions, see Batch migrate servers.

    If you have not created a workgroup, click Create a New Workgroup.

    Migration Source Type

    Select Physical machine/virtual machine/cloud server from another provider.

    Import Method

    Select Command line import to generate an activation script command and run it on the source server for one-click import.

    Migration Source Quota

    Enter the number of migration sources the activation code can activate. Valid values: 1–1000. Default: 200.

    Validity Period

    Enter the validity period (in days) for the activation code. Valid values: 1–90. Default: 90.

    Activation Code

    After generating the activation code, copy the command as follows:

    1. Click Generate.

    2. Click the Linux Shell or Windows PowerShell tab based on your source server OS.

    3. Click Copy to copy the activation command.

  4. Log on to the source server and run the copied command with administrative permission to import the migration source.

    Linux source server
    1. Log on to the Linux source server.

    2. Run the copied command with administrative permission to import the migration source.

      image.png

      If the output resembles Import Source Server [s-bp18x8751kgz2oyh****] Successfully!, the import succeeded.

    Windows source server
    1. Log on to the Windows source server.

    2. Open Windows PowerShell as an administrator.

    3. Paste and run the copied command to import the migration source.

      image.png

      If the output resembles Import Source Server [s-bp19rlidl3mwuptc****] Successfully!, the import succeeded.

      If the command fails, see How to resolve command line import failures for Windows migration sources?

  5. On the Server Migration page in the SMC console, check the status in the Real-time migration status column.

    • If the Migration SourceOnline, it indicates that the import was successful.

    • If the status is anything else, the import failed. Resolve the issue and reimport:

      • Check the error message in the console or review log files in the SMC client directory. Default installation paths:

        • Windows source server: C:\smc

        • Linux source server: /smc

      • For common issues and fixes, see SMC FAQ and Troubleshoot errors.

Import migration source using the SMC client

For more information about the SMC client, see SMC client user guide.

Important
  • Client import requires the source server to run the SMC client, which defaults to public network access mode. If your source server uses a firewall, add the SMC domains and ports to your firewall whitelist. For details, see What are the SMC service domains?

  • If your source server cannot access the public network or you want to improve migration efficiency via private network transfer, set up private network transmission as described in Private network migration.

  1. Go to the Server Migration page in the SMC console.

  2. On the Server Migration page, click Import Source Servers.

  3. On the Import Source Servers page, configure the parameters as described in the following table.

    Parameter

    Description

    Migration Source Type

    Physical servers/VMs/Cloud servers of other cloud platforms.

    Import Method

    Select Use Client to Import Server.

    You must manually download and install the SMC client on the source server.

    Description

    1. In the Description section, follow the prompts to download, install, and activate the SMC client that matches the operating system (Linux or Windows) and architecture (32-bit or 64-bit) of your source server.

    2. Click Generate and copy the activation code.

      You must enter the activation code when you install the client.
  4. Import the migration source.

    Important

    Do not close the SMC client during the migration. Otherwise, the migration source will lose its connection to the SMC console and the migration will fail.

    Windows source server
    1. Use a remote connection tool that supports file transfer, such as WinSCP, to upload the SMC client to the Windows source server.

    2. On the Windows source server, use the system's built-in decompression tool or a third-party tool to decompress the SMC client package.

    3. In the folder for the SMC client version that matches your server's system, double-click the go2aliyun_client.exe application.

      When prompted for administrator privileges, click OK.
    4. Obtain an activation code or an AccessKey pair.

      • (Recommended) Obtain an activation code: In the Description section of the SMC console, click Generate and copy the activation code.

      • Obtain an AccessKey pair: An AccessKey pair consists of an AccessKey ID and an AccessKey secret. If you have not created one, see Create an AccessKey pair.

    5. Follow the prompt and enter the values for the activation code, access_access_token_id and access_token_code, and press Enter.

      If a message similar to Import Source Server [s-bp18x8751kgz2oyh****] Successfully! is displayed, it indicates a successful import.

    Linux source server
    1. Use a remote connection tool that supports file transfer, such as WinSCP, to upload the SMC client to the Linux source server, or run the command provided in the import instructions to download the SMC client directly on the source server.

    2. Remotely connect to the Linux source server and decompress the SMC client package.

      The following command uses the Linux 64-bit General-purpose Edition as an example. If you use a different version of the SMC client, replace the package name in the command with the name of the file you downloaded.

      tar -zxvf go2aliyun_client.tar.gz
      Note

      The Linux 64-bit ARM Edition supports the g6r general-purpose instance family and the c6r compute-optimized instance family. Enterprise-level Arm-based compute instance families.

    3. (Optional) Exclude files or directories from the migration.

      Important

      If you enable block replication for the migration, you cannot exclude files or directories.

    4. Obtain an activation code or an AccessKey pair.

      • (Recommended) Obtain an activation code: In the Description section of the SMC console, click Generate and copy the activation code.

      • Obtain an AccessKey pair: An AccessKey pair consists of an AccessKey ID and an AccessKey secret. If you have not created one, see Create an AccessKey pair.

    5. In the SMC client directory, run the following commands to start the SMC client.

      The go2aliyun_client2.6.5_linux_x86_64 directory is used as an example. The directory name varies based on the client version. Make sure to replace it with the name of the directory created after you download and decompress the package.
      cd go2aliyun_client2.6.5_linux_x86_64
      sudo chmod +x go2aliyun_client
      sudo ./go2aliyun_client
    6. Enter the activation code or AccessKey pair as prompted. The following example shows how to enter an activation code:adad

      After you enter the activation code or AccessKey pair, the following prompts may appear:

      • If a snapshot driver is not installed on the source system, the SMC client prompts you to install one. You can choose whether to install it based on your migration plan.

        • If you plan to enable block replication when you create the migration task, enter yes to automatically install the snapshot driver.

        • If you do not plan to enable block replication, enter no.

        Important

        If the snapshot driver fails to install, do not enable block replication when you create the migration task. Otherwise, the migration will fail.

        123

      • Most mainstream source systems have rsync installed by default. If rsync is not installed, the SMC client prompts you to install it. Enter yes to automatically install rsync, as shown in the following figure.Install rsync

      • If SELinux is enabled on the source system, the SMC client prompts you to disable it. Enter yes to automatically disable SELinux, as shown in the following figure.Disable SELinux

      If a message similar to Import Source Server [s-bp11npxndknsycqj****] Successfully! is displayed, it indicates a successful import.

      Note

      If the import fails, troubleshoot the issue based on the displayed message. Then, run the following commands in sequence to exit the background process and import the migration source again. For information about common issues and solutions, see SMC FAQ and Troubleshooting.

      sudo ./go2aliyun_client --abort
      sudo ./go2aliyun_client
  5. On the Server Migration page of the SMC console, check the status of the migration source in the Real-time Migration Status column.

    • If the status is Migration SourceOnline, the import was successful.

    • If the status is anything else, the import failed. Troubleshoot the issue using the following methods and then import the migration source again.

      • Troubleshoot the issue based on the error message in the console or by checking the SMC client log file. The default installation directories of the SMC client are:

        • Windows source server: C:\smc.

        • Linux source server: /smc.

      • For information about common issues and solutions, see SMC FAQ and Troubleshooting.

Step 2: Configure migration

  1. In the Actions column of the migration source that you want to manage, click Start Migration.

  2. Configure the parameters and click Start Migration.

    1. Configure basic parameters.

      Parameter

      Description

      Destination Type

      Select Simple Application Server.

      Target Region (required)

      The region where your Simple Application Server will reside after migration. For more information, see Regions and zones.

      Destination Instance (required)

      Select a Simple Application Server instance as the destination.

      The destination instance must match the source server in storage and OS type. For example, migrate only from a Linux source server to a Linux Simple Application Server, or from a Windows source server to a Windows Simple Application Server.

      Important
      • To avoid migration failure, do not stop, start, restart, or release the destination instance during migration.

      • If the destination instance has fewer data disks than the source, not all source data disks will be migrated.

      • If the destination disk capacity is smaller than the source disk capacity, expand the destination disk first. For instructions, see Expand a data disk.

      Execution Method

      Select how to run the migration task:

      • Migrate Now: Starts the migration immediately after you create the migration job. By default, Migrate Now is selected.

      • Migrate Later: Schedules the migration job to start automatically at a specified time.

        Note

        The earliest you can schedule the job is 10 minutes from the current time.

      • Create Only: Creates the migration job but does not start it. You must manually start it later by clicking Start Migration Job in the Actions column.

      Network Type

      Migration data is transferred to the intermediate instance over the public network. This mode requires the source server to have public internet access. You can choose whether to specify a Virtual Private Cloud (VPC) and vSwitch.

      • Specify a VPC and vSwitch: The migration job creates an intermediate instance in the VPC and vSwitch that you specify.

      • Do not specify a VPC and vSwitch: The migration job creates an intermediate instance in a new VPC and vSwitch that are automatically created by the system.

    2. You can also adjust the disk partition structure. Parameters are described in the following table.

      Parameter

      Description

      Modify Disk Partition

      Select whether to adjust the disk partition structure based on your requirements. Only SMC client versions 2.8.0 and later support this feature. SMC Client User Guide.

      • Disabled: The disk information of the source instance is not shown. SMC automatically reads the source disk information and generates a disk layout. After migration, the destination disk partition structure matches the automatically generated layout by default.

      • Enabled: The disk information of the source instance is displayed. SMC automatically reads the source disk information to generate a disk layout. You can adjust the destination disk partition structure, including the partition size and order, transfer method, and whether to enable LVM.

        The disk partition parameters are as follows:

        Configure disks

        • System Disk: The size of the destination system disk, in GiB. Valid values: 20 to 2,048.

          The destination system disk size must exceed the used space on the source system disk. For example, if the source system disk is 400 GiB and 100 GiB of space is used, the destination system disk size must be greater than 100 GiB.

          Note

          The default value is the size of the source system disk. Unless you need to reduce the system disk size, we recommend that you do not specify a value smaller than the default.

        • Data Disk<N>: The size of the destination data disk after migration, in GiB. Valid values: 1 to 32,768.

          • The <N> variable represents the data disk number. If you are migrating to a destination instance, N is the data disk ID.

          • The destination data disk size must exceed the used space on the source data disk. For example, if the source data disk is 500 GiB and 100 GiB of space is used, the destination data disk size must be greater than 100 GiB.

          • If a Data Disk has no mount target, or if all its mount targets are set to not be migrated, the data disk is not migrated.

        • LVM: Logical Volume Manager (LVM) is a disk partition management system for Linux. LVM offers more flexibility than standard disk partitions and allows for dynamic resizing of disk space.

          You can enable LVM based on your requirements. If enabled, the destination disk is automatically rebuilt with an LVM structure.

          Example:

          For each destination disk with LVM enabled, the system creates one physical volume (PV) and its corresponding volume group (VG). Within this VG, it creates one logical volume (LV) for each mount target. The VG is named vgX by default (where X is the disk sequence number), and the LVs are named lvX by default (where X is the LV sequence number), as shown in the following example:

          image

          Important

          LVM cannot be enabled in the following cases:

          • The source server runs Windows.

          • The system disk does not have a boot partition.

          If you enable LVM, the feature does not take effect in the following scenarios:

          • The source server does not support lvm2, or the lvm2 package is not installed.

          • The source server runs a Debian system with a kernel version of 3.x or earlier and has a disk with an XFS file system mounted.

        Configure mount targets

        • Migrate: Specifies whether to migrate the mount target based on your business requirements.

        • Enable Block Replication: This option is visible only for SMC client versions before 3.2.0. Block replication improves the stability of the transfer speed and ensures that the destination partition structure is identical to the source, but you cannot modify the partition size. SMC determines whether to support block replication based on the status of the source disk partitions.

          • If the source partition does not support Block Replication, this option cannot be enabled. File-level replication is used by default, which allows the partition size to be modified.

          • If the source partition supports Block Replication, this option is enabled by default to perform a partition-level disk migration.

          Note
          • If the source server runs a Windows operating system, block replication is enabled by default and cannot be disabled.

          • If LVM is enabled for the disk and the partition size is not a multiple of 4 MiB, block replication does not take effect. File-level replication is used instead.

        • Set Partition Size: If block replication is disabled, you can set the partition size. The sum of partition sizes cannot exceed the total size of the disk.

          • Windows operating systems: You cannot adjust the partition size.

          • Linux operating systems: You can set the partition size based on your requirements, but the sum of partition sizes cannot exceed the disk size.

            For SMC client versions earlier than 3.2.0, ensure that block replication is disabled.
        Note

        If the disk sizes of the destination instance do not match the source disks, you cannot create the job. In this case, the system automatically adjusts the mount target locations to meet the disk size requirements. If the requirements are still not met after the adjustment, resolve the issue as prompted on the UI.

        You can also manually drag and drop mount targets to meet the disk size requirements. However, you cannot move boot or system partitions. To do this, perform the following steps:

        1. Hover the pointer over the image icon next to the mount target.

        2. Drag the mount target to another disk.

    3. (Conditionally required) To configure network mode, compression ratio, and other advanced parameters, click Advanced Settings. The following table describes the parameters.

      Parameter

      Description

      Migration Job Name

      Name of the migration task.

      Job Description

      Description of the migration task.

      Transmission Speed Limit

      Limits the data transfer speed, in Mbit/s. If Compression Ratio is set to a value greater than 0, the actual network transfer speed for the compressed data is lower than the speed displayed in Real-time Migration Status.

      Compression Ratio

      Sets the data compression level for migration.

      • In environments with limited bandwidth, a higher compression ratio can increase data transfer speed.

      • In environments with high bandwidth, we recommend that you do not compress data to reduce CPU usage on the source server.

      Valid values: 0 to 10. The default value is 7. A value of 0 indicates that data is not compressed.

      Checksum Verification

      This feature is disabled by default. Enabling it enhances data consistency checks but may decrease transfer speed.

      SSL encrypted transfer

      The default value is Auto. SSL encryption for data transfer improves security and data integrity.

      Tag

      Add tags (key-value pairs) to the migration job for easier searching and management. Use tags to manage migration sources and jobs. Implement fine-grained permission management by using tags.

      Note

      You can add a maximum of 20 tags to a single migration job.

      Report diagnostic logs

      Automatically uploads SMC client logs to the SMC server for diagnostic analysis. This helps troubleshoot issues if a migration error occurs. This feature is enabled by default.

      SMC client logs are typically stored in the /smc/go2aliyun_client*/Logs directory within the installation path.

  3. In the dialog box that appears, read the notes and click Got It.

  4. On the Server Migration page, monitor the real-time migration status.

    Migration duration depends on source data size and network bandwidth. Wait patiently for the task to complete.

    Note
    • Speed: The amount of uncompressed migration data transferred per second. If the Compression Ratio for the migration job is greater than 0, the displayed speed is higher than the actual network transfer speed of the compressed data.

    • Time Remaining for Synchronization: Calculated as (Total Data Volume - Transferred Data Volume) / Speed.

    • If the transfer speed is too slow, consider temporarily increasing the fixed bandwidth of the source and destination servers. Estimate migration time and test transfer speed.

    Subscribe to migration error events, and modify or pause the migration

    • To avoid interruptions from migration errors, you can subscribe to SMC job error notifications in CloudMonitor to receive timely SMS and email alerts.

    • While the migration job status is Synchronizing, you can perform the following operations as needed:

      • To edit a migration task, in the Actions column, click Modify Migration Job. You can modify parameters such as transfer throttling, compression ratio, and Checksum verification.

      • Pause the migration job: In the Actions column, click Pause Migration Job to pause the migration.

  5. (Optional) To view migration details, follow these steps.

    View migration details

    In the Migration Source ID/Name column for your migration source, click the source ID.

    The migration details page includes two sections: Basic information and Task configuration. Basic information shows task ID/name, status, dry run status, creation time, start time, end time, progress, delivery object, destination region, destination instance ID, tags, resource group, and disk info. Task configuration shows network mode, destination VPC, destination vSwitch, compression level, transfer rate limit, checksum verification, license type, and task type.

Verify migration results

  • When the Real-time Migration Status shows Completed, migration succeeded.

  • When the Real-time Migration Status shows InError, the migration task encountered an error.

    Troubleshoot the issue and retry the migration:

    1. In the Actions column, click Troubleshoot Errors. Use the error code and error message to resolve the issue. For more information, see SMC FAQ and Troubleshooting.

    2. After resolving the issue, click Retry Migration Job in the Actions column. The migration resumes from where it left off.

References