Migrate a simple application server to an ECS instance

更新时间:
复制 MD 格式

You can migrate a simple application server to an Elastic Compute Service (ECS) instance in the same or a different region under your Alibaba Cloud account for more flexible resource configuration.

Migration impacts

Item

Description

Authorized applications on the server

The virtual private clouds (VPCs) of simple application servers and ECS instances are not interconnected, so the VPC changes after migration. An ECS instance uses different underlying hardware, so application licenses bound to specific hardware may become invalid. Check and revalidate these licenses after migration.

Public IP address

The public IP address changes after migration. If you have a domain name bound to your simple application server, update the DNS record to point to the new public IP address of the ECS instance.

Procedure

Note

If you already have an ECS instance and your simple application server has a data disk attached, use Server Migration Center (SMC) for the migration. For more information, see Migrate a simple application server to an ECS instance.

You can migrate a server by using the shared image feature to create a new ECS instance or replace the system disk of an existing ECS instance.

  1. Go to the Servers page in the Simple Application Server console.

  2. Create a custom image of the server.

    1. On the instance card, choose More > Create Custom Image.

      You can also click the instance ID on the instance card. On the Server Overview tab, in the Basic Information section, click Create Custom Image next to Image Information.

    2. In the Create Custom Image dialog box, configure the parameters.

      Parameter

      Description

      Name

      Enter a unique name for the custom image. The name must be 2 to 128 characters long. It cannot start with a special character or a digit but can contain periods (.), underscores (_), hyphens (-), and colons (:).

      Description

      Enter a description for the custom image. The description must be 2 to 256 characters long and cannot start with http:// or https://.

    3. Click OK.

  3. (Conditionally required) If you need to migrate across regions, you must first copy the custom image to the destination region. If you are migrating within the same region, skip this step.

    In the Actions column for the custom image, choose Copy Image and follow the on-screen instructions to copy the custom image.

  4. Share the image and complete the migration.

    Migrate to a new ECS instance

    1. In the left-side navigation pane, click Image. In the image list, find the custom image that you created.

    2. In the Actions column, click Create ECS Instance.

    3. In the Create ECS Instance dialog box, click Confirm the sharing and go to the next step.

    4. Click Confirm.

      You are redirected to the Elastic Compute Service (ECS) purchase page. Follow the on-page instructions to create the ECS instance.

      When you create the ECS instance, note the following parameters:

      • Region, Image, System Disk, and Data Disk (if applicable): The corresponding configurations are selected by default.

      • Public IP Address: Select Assign Public IPv4 Address.

      • Security Group: Ensure that the inbound rules of the selected security group allow traffic on the required ports. We recommend that you keep the rules consistent with the firewall settings of the simple application server.

      Configure other parameters as needed. For more information, see Create an instance by using the wizard.

      After the ECS instance is created, go to the ECS console. In the left-side navigation pane, choose Instances & Images > Instance. You can view the newly created ECS instance on the page. Once the instance is successfully created, the migration is complete.

    Migrate to an existing ECS instance

    If you want to migrate to an existing ECS instance, you can replace its operating system. This method migrates data from the system disk of the simple application server but does not migrate data from the data disk.

    1. Share the image to ECS.

      In the left-side navigation pane, click Image, find the target custom image, and in the Actions column, click Share to ECS. Follow the on-screen instructions to share the image.

    2. Replace the system disk of the existing ECS instance.

      1. Go to the ECS console and in the left-side navigation pane, choose Instances & Images > Servers.

      2. Find the target instance. In the Actions column, click Stop. Select Standard Mode, and then click OK.

      3. After the instance status changes to Stopped, in the Actions column, click Replace Operating System. For Replacement Method, select Replace a system disk. After you confirm the risks, click Continue to Replace Operating System.

      4. On the Replace Operating System page, configure the following parameters (for more information, see Replace the operating system (change the system disk)):

        • Image: Click the Share Image tab and select the target custom image.

        • System Disk: The new capacity must be greater than the current capacity of the system disk. You cannot change the system disk type.

        The message Operating system replaced successfully indicates that the migration to the ECS instance is complete.

  5. Verify the migration.

    In this example, the simple application server has a web page file named test.html. Test whether test.html can be accessed on the ECS instance.

    Note

    After migration, log on to the new ECS instance to verify that its data matches the data on the source simple application server.

    1. Obtain the public IP address of the ECS instance.

      On the instance list page in the ECS console, find the target instance and view the elastic public IP (labeled as "Elastic") in the IP Address column.

    2. On your local computer, open a web browser and go to http://<Public IP address of the ECS instance>/test.html.

      Verify that the test website deployed on the ECS instance is accessible and that its content is identical to the test website on the source server (the simple application server).

      You have now successfully migrated the data from the simple application server to the ECS instance.

What to do next