This topic provides answers to commonly asked questions about ECS images.

Can I replace the selected image of an ECS instance?

Yes, you can replace the image of your ECS instance by selecting Replace System Disk in the ECS console. Note that replacing an image will result in the loss of system disk data. Make sure that you have backed up your data before you replace the system disk. For more information, see Change the operating system.

Do the system disks of ECS instances support KMS encryption? How do I use KMS encryption through Terraform or Packer?

  • The system disks of ECS instances can be encrypted with BYOK and CMKs hosted in KMS. For more information, see Encryption overview.
  • Support for Packer-based encryption will be added soon.
  • In Terraform, you can set the encrypted parameter to enable or disable KMS encryption. For more information, see alicloud_disks.

What are the differences and relationships between snapshots and images?

Images and snapshots differ in the following ways:
  • Images can be used to create ECS instances, whereas snapshots cannot.
  • A snapshot can be a data backup of either the system disk or a data disk of an ECS instance, whereas an image must contain the system disk data of an ECS instance.
  • A snapshot can be used only to restore data of the current ECS instance disk, whereas an image can be used to replace the system disk of any ECS instance or create a new ECS instance.
  • Snapshots cannot be used across regions. To restore instance data in other regions, you can use a custom image. For more information, see Copy custom images.
  • Images and snapshots apply to different scenarios. Here are some of the scenarios where snapshots and custom images are used:
    Scenarios for snapshots
    • Regular backup of data. Automatically create snapshots to back up data on a daily, weekly, or monthly basis based on automatic snapshot policies.
    • Temporary backup of data. Examples:
      • Manually create a snapshot to back up the system data before a temporary system change such as system update or application release.
      • Create a snapshot to back up data before the system disk is resized.
      • To migrate data to another disk, create a snapshot of the source disk and use the snapshot to overwrite the data on the destination disk.
    Scenarios for custom images
    • Back up systems that will not change in a short term, such as applications and systems that have been released or updated.
    • Create new ECS instances. For example, you can use a custom image to create an ECS instance with multiple applications deployed.
    • Migrate systems and data. For example, you can migrate ECS instances from the classic network to VPCs.
    • Restore systems across regions and zones.
The relationships between snapshots and images are as follows:

Which instance families do Red Hat Enterprise Linux (RHEL) images support?

Red Hat Enterprise Linux (RHEL) images support the following instance families. For more information about the instance families, see Instance families.

  • ecs.r6 (supported only by RHEL 7.7 and later)
  • ecs.c6 (supported only by RHEL 7.7 and later)
  • ecs.g6 (supported only by RHEL 7.7 and later)
  • ecs.r5
  • ecs.c5
  • ecs.g5
  • ecs.re4
  • ecs.t5
  • ecs.hfc5
  • ecs.hfg5
  • ecs.i2
  • ecs.sn1ne
  • ecs.sn2ne
  • ecs.se1ne
  • ecs.sn1
  • ecs.sn2
  • ecs.se1
For more information, see the following topics:

Can I use a snapshot of a data disk to create a custom image?

Only system disks can be used to create custom images. Data disks cannot be used to create custom images.

However, you can add a snapshot of a data disk when you use a snapshot of a system disk to create a custom image. For more information, see Create a custom image from a snapshot.

How do I view the data disk usage?

You can run the df command to view the data disk usage and where file systems are mounted. Example: df -lh.

You can run the fdisk command to view the partition information of a data disk. Example: fdisk -l.

How do I unmount file systems and delete disk table data?

Assume that /dev/hda5 is mounted to /mnt/hda5. You can run one of the following commands to unmount the mounted file systems:
  • umount /dev/hda5
  • umount /mnt/hda5
  • umount /dev/hda5 /mnt/hda5
/etc/fstab is an important profile in Linux systems. It contains detailed information about file systems and storage devices that are mounted to the system at system startup.
If you do not want to mount a partition when you start an instance, you must delete the corresponding statement from the /etc/fstab file. For example, after the following statement is deleted from the /etc/fstab file, xvdb1 will not be loaded at system startup.
/dev/xvdb1 /leejd ext4 defaults 0 0
The following table lists other important profiles in Linux systems.
Profile Description Risk of modifying the profile
/etc/issue*, /etc/*-release, /etc/*_version The system release profile Modifying /etc/issue* will cause system creation and release recognition failures.
/boot/grub/menu.lst, /boot/grub/grub.conf The system boot profile Modifying /boot/grub/menu.lst will cause kernel load and system boot failures.
/etc/fstab The profile for mounting partitions at system startup Modifying /etc/fstab will cause partition load and system boot failures.
/etc/shadow The system password-related profile Changing /etc/shadow to read-only will cause password file modification and system creation failures.
/etc/selinux/config The system security policy profile Modifying /etc/selinux/config to enable SELinux will cause system boot failures.

How do I confirm that a data disk has been unmounted and that a new custom image can be created?

  1. Confirm that the statement used to automatically mount data disk partitions has been deleted from the /etc/fstab file.
  2. Run the mount command to view the mount information of all devices. Confirm that the information about corresponding data disk partitions is not displayed in the command output.

Does a custom image still exist after the instance from which the image was created is released?

Yes, the custom image still exist after the instance from which the image was created is released.

Is the custom image from which an instance was created affected when the instance expires or its data is deleted? Are instances created from the custom image affected?

No. The custom image and instances created from it are not affected.

Can I replace the operating system of an instance created from a custom image? Can the custom image still be used after the operating system is replaced?

Yes, you can replace the operating system of an instance created from a custom image. The custom image can still be used after the operating system is replaced.

Can I select a custom image with a different operating system when I replace the system disk of an instance?

Yes. For more information, see Replace the system disk (non-public images).
Note When a custom image is used to replace a system disk, all of the original system disk data is overwritten.

Can I use a custom image to overwrite the system disk data of an ECS instance?

Yes, you can use a custom image to overwrite the system disk data of an ECS instance. For more information, see Replace the system disk (non-public images).
Note The custom image will overwrite all data in the system disk of the ECS instance.

Can I upgrade the CPU, memory, bandwidth, and hard disks of an ECS instance created from a custom image?

Yes, you can upgrade the CPU, memory, bandwidth, and hard disks of an ECS instance created from a custom image. For more information, see Overview of instance upgrade and downgrade.

Can I use a custom image across regions?

No, a custom image cannot be used across regions. For example, a custom image created from an instance in the China (Hangzhou) region cannot be used to create an ECS instance in the China (Shanghai) region.

If you want to use a custom image across regions, you can copy the image to the destination region. For more information, see Copy custom images.

Can a custom image created from a subscription instance be used to create a pay-as-you-go instance?

Yes, a custom image created from a subscription instance can be used to create a pay-as-you-go instance. The usage of custom images has nothing to do with the billing methods of instances.

I created an ECS instance from a custom image and specified a greater capacity for the instance system disk than that specified in the image. However, when I log on to the new ECS instance, I find that the system disk capacity is not expanded. What can I do?

The system disk capacity of an instance created from a custom image may fail to expand due to any of the following reasons: The cloud-init service is not installed, the cloud-init service has failed, or the file systems do not support the capacity expansion.

You can manually expand the system disk capacity.

Why do I need to comment out mounted items when I create a custom image or an ECS instance?

When you create an ECS instance from a custom image, the following conditions can cause disks to fail to be mounted:
  • The ECS instance that is created does not have a data disk.
  • The data disk is a new disk and is not formatted or partitioned.
  • The mounted disks are not commented out in the /etc/fstab file in the custom image that is created.
The following content describes an example of data disk mount failure. In this example, the data disk of an ECS instance created from a custom image is not partitioned, and the mounted disks are not commented out in the /etc/fstab file in the custom image.
  1. The data disk of the ECS instance is not partitioned, as shown in the following figure.Data disk not partitioned
  2. In the ECS instance, the mounted disks are not commented out in the /etc/fstab file, as shown in the following figure.Mounted disks
  3. When the instance starts, the data disk is mounted based on the configurations in the /etc/fstab file. However, the mount operation fails because the data disk is not partitioned, as shown in the following figure.Data disk mount failure

When you are creating an ECS instance with data disks from the snapshots of partitioned and formatted data disks, you do not need to comment out the mounted disks.

If you have further questions, submit a ticket.

How do I configure and use a private Docker image registry?

Image management is at the core of Docker. To allow organizations to share images internally, Docker has created the open source docker-registry on GitHub to act as a repository of private Docker images.

Start docker-registry that supports Alibaba Cloud OSS. You can download docker-registry from GitHub and install it, and run the pip install docker-registry-driver-alioss command to install the OSS driver.
  1. Run docker-registry.
     docker run -e OSS_BUCKET=-e STORAGE_PATH=/docker/ -e OSS_KEY=-e OSS_SECRET=-p 5000:5000 -d chrisjin/registry:ali_oss
  2. Configure config.yml.
     ```local: &local
     <<: *common
     storage: alioss
     storage_path: _env:STORAGE_PATH:/devregistry/
     oss_bucket: _env:OSS_BUCKET[:default_value]
     oss_accessid: _env:OSS_KEY[:your_access_id]
     oss_accesskey: _env:OSS_SECRET[:your_access_key]```
  3. Start docker-registry.
     DOCKER_REGISTRY_CONFIG=[your_config_path] gunicorn -k gevent -b 0.0.0.0:5000 -w 1 docker_registry.wi:application

If you have further questions, submit a ticket.

How do I clone an ECS instance?

You can clone the environment and data of an existing ECS instance under your account to create identical ECS instances within the same region.
  1. Log on to the ECS console.
  2. Select the ECS instance that you want to clone and create snapshots for its system disk and data disks. For more information, see Create a normal snapshot.
    Note To ensure data consistency, only create snapshots while the instance is in the Stopped state.
  3. Use the system disk snapshot to create a custom image. In the Create Custom Image dialog box, select Add Data Disk Snapshot and click Add to add one or more data disk snapshots to the image. For more information, see Create a custom image from a snapshot.
  4. Create an ECS instance by following the instructions in Create an instance by using the provided wizard. During the creation process, note the following parameters:
    • Region: You must select the same region as that of the cloned instance.
    • Image: Select Custom Image as the image type. Then, select the custom image that you created in the previous step from the drop-down list.
      Note If the selected custom image contains one or more data disk snapshots, an equal number of data disks are automatically created from these snapshots. Each disk has the same size as the snapshot from which it is created. You can increase the size of a data disk but cannot decrease it.
In addition, you can use Operation Orchestration Service (OOS) to perform automated cloning:
  • For cross-region cloning, go to ACS-ECS-CloneInstancesAcrossRegion. In the top navigation bar, select the region where the instance is located. Use the ACS-ECS-CloneInstancesAcrossRegion public template to clone the ECS instance across regions.
  • For cloning within a region, go to ACS-ECS-CloneInstancesAcrossAZ. In the top navigation bar, select the region where the instance is located. Use the ACS-ECS-CloneInstancesAcrossAZ public template to clone the ECS instance across zones.

Some custom images cannot be used to create I/O optimized instances. What can I do?

Some custom images cannot be used to create I/O optimized instances. If you want to use such a custom image to create an I/O optimized instance, we recommend that you submit a ticket that contains the image name.

Where do I view the progress of an image being imported? How long does it take to import an image?

You can view the progress of an image being imported on the Images page in the ECS console. It may take an extended period of time to import a custom image. The amount of time it takes to import an image depends on the image size and the number of concurrent import tasks in the queue.

Where do I view the progress of an image being created? How long does it take to create an image?

You can view the progress of an image being created on the Images page in the ECS console. The amount of time it takes to create an image depends on the size of the disk from which the image is created.

When do I need to copy a custom image?

Custom images can be used only within the same region and cannot be used across regions. You can copy custom images to achieve the following goals:
  • Deploy applications in ECS instances to multiple regions.
  • Migrate ECS instances to other regions.
  • Use custom images across regions.
You can copy a custom image from one region to another and use the custom image to create the same application environment within the destination region.

Which images can be copied?

Only custom images can be copied. Public images, Alibaba Cloud Marketplace images, and images shared by others cannot be copied.

Which regions support copying custom images?

All Alibaba Cloud regions support copying custom images.

How long does it take to copy a custom image?

Copying a custom image will transmit the image files from one region to another over the network. The amount of time it takes to copy a custom image depends on the network transmission speed and the number of transmission tasks in the queue.

How am I charged when I copy a custom image?

You must perform the following operations to copy a custom image:
  1. Copy the snapshot from which the custom image was created from the source region to the destination region.
  2. Create a custom image from the snapshot in the destination region.
The preceding operations may incur the following fees:
  • Fees for traffic between the two regions. Alibaba Cloud does not currently charge for cross-region traffic. For the latest billing details, see the official Alibaba Cloud website for announcements.
  • The copied snapshot consumes snapshot capacity. Currently, snapshot capacity is billed. For more information, see Snapshot billing.

What are the limits on the original and new images during the copy process?

The original image cannot be deleted during the copy process. The copy process can be canceled, but the new image cannot be used to replace a system disk or create an ECS instance.

How do I copy the images under my Alibaba Cloud account to other regions under other Alibaba Cloud accounts?

You must copy your own images to the destination regions and then share the images to the intended Alibaba Cloud accounts. After the images are shared, they will be displayed in the shared image lists of those accounts.

Are there any size limits on copying an image?

No, there are no size limits on copying an image. However, if you click Copy Image in the ECS console to copy an image whose size exceeds 500 GiB, you will be prompted to submit a ticket.

Can I copy a custom image created from an Alibaba Cloud Marketplace image across regions?

If an Alibaba Cloud Marketplace image is available in the destination region, you can copy the custom image created from the Alibaba Cloud Marketplace image to the destination region. Otherwise, the following error message will be displayed when you copy the custom image.

Copy a custom image created from an Alibaba Cloud Marketplace image

How do I migrate data from regions outside mainland China to regions inside mainland China?

You can do this by copying custom images. For more information, see Copy custom images.

How many images can be shared to me?

100.

To how many users can an image be shared?

50.

I have accounts on different Alibaba Cloud sites. Can I share images between these accounts?

Yes, you can share images between the accounts. Any images (except for custom images created from Alibaba Cloud Marketplace images) can be shared between your accounts on the China site (aliyun.com), International site (alibabacloud.com), and Japan site (jp.alibabacloud.com).

Do shared images consume my image quota?

No. Shared images do not consume the image quota.

Are geographical limits available for creating instances from shared images?

Yes, instances can only be created within the same region as the shared images from which the instances are created.

What are the risks of creating an instance from a shared image?

The image owner can view how the image is shared and can delete the image. After a shared image is deleted by its owner, the system disks of ECS instances that use this image cannot be reinitialized.

Alibaba Cloud does not guarantee the integrity and security of images shared by other accounts. We recommend that you only select images shared by trusted accounts. After you create an ECS instance from a shared image, you must log on to the ECS instance to check the security and integrity of the shared image.

What are the risks if I share a custom image to other accounts?

There is a risk that data and software may be leaked or stolen. Before you share a custom image to other accounts, check whether the image contains any sensitive or important data. After you share your image to other accounts, they can use the shared image to create ECS instances, which can then be used to create more custom images. During this process, data can be spread repeatedly, creating a risk of data being disclosed beyond your original intentions.

After an account shares an image to me, can I share this image to another account?

No, only the owner of an image can share it to other accounts.

After I share an image, can I still use this image to create an instance?

Yes, after you share an image to another account, you can still use the image to create an ECS instance. You can also continue to create a custom image from the ECS instance created from the shared image.

Can an image created from Instance A in one region be used by Instance B in a different region?

  • If instances A and B belong to the same account, you can copy the image to the region of Instance B and apply it to Instance B. For more information, see Copy custom images.
  • If instances A and B belong to different accounts, you can copy the image to the region of Instance B and share the image to the account of Instance B. For more information, see Copy custom images and Share or unshare custom images.

Is Bring Your Own Licenses (BYOL) supported when I import custom images?

Yes, BYOL is supported when you import custom images. You can configure the license types by using the image import feature in the ECS console or by calling the ImportImage operation. For more information, see Import custom images and ImportImage.

What kinds of licenses can be used when I import custom images?

The following licenses can be used when you import custom images:
  • Aliyun licenses

    Aliyun licenses are provided by Alibaba Cloud and are mainly the licenses for Windows Server operating systems. If cloud-init is installed on the imported images, Alibaba Cloud will use Key Management Service (KMS) to activate the operating system and provide Windows Server Update Services (WSUS).

  • BYOL licenses
    BYOL licenses are mainly used in the following scenarios:
    • Microsoft
      Microsoft BYOL licenses are used in the following scenarios:
      • BYOL implemented through Software Assurance (SA)

        BYOL can be implemented for software programs that support License Mobility such as SQL Server and SharePoint when ECS instances are created.

      • Windows operating systems

        Windows client access licenses (CALs) do not support License Mobility. Therefore, existing Windows licenses cannot be used in the shared hardware environment. You must deploy the Windows operating system in a dedicated physical environment, which can be an Alibaba Cloud dedicated host or an ECS Bare Metal Instance. For more information, see the dedicated host documentation and ECS Bare Metal Instance documentation.

        For this ECS instance type, Alibaba Cloud does not provide KMS, WSUS, and software technical support. You can contact Microsoft for software technical support.

      • BYOL implemented through SA and No SA are not supported

        This scenario is similar to the Windows operating system scenario. You can reuse software licenses that you have purchased and download and deploy software programs in a dedicated hardware environment.

    • Red Hat

      Red Hat provides the Cloud Access program. If your Red Hat subscription to be migrated uses Bring Your Own Subscription (BYOS), you can register with Red Hat Cloud Access. For more information, see Enroll in the Red Hat Cloud Access program.

  • Auto licenses
    The default values are used. Depending on the operating system to be imported, a license type is configured automatically.
    • For operating systems that Alibaba Cloud has a signed licensing agreement to provide official licenses, such as Windows Server operating systems, the license type will be Aliyun.
    • For other operating systems, such as noncommercial Linux images, the license type will be BYOL. Alibaba Cloud does not provide software technical support for these operating systems.

How are images imported with BYOL licenses charged?

No fees are charged for operating system components of images that are imported with BYOL licenses. This rule is applicable to ECS instances that are newly created, renewed, or reinitialized, and ECS instances with their configurations changed.

How are BYOL licenses authenticated and subscribed through Alibaba Cloud when their subscription expires?

You can change images imported with BYOL licenses to images imported with Aliyun licenses.
  • For Windows Server operating systems, you can use the official Alibaba Cloud images. For more information about the official images of Alibaba Cloud, see Overview.
  • You can obtain SQL Server and Red Hat images in the Alibaba Cloud Marketplace. For more information, see Marketplace images.

I want to export an image to my local computer for testing. What can I do?

By default, image files are exported as .raw.tar.gz files from which you can extract .raw files. You can search for the relevant documentation for using images in .raw format. Alibaba Cloud has no limits on how to use images in .raw format.

Can I delete a custom image after I use it to create an ECS instance?

You can select Proceed to Forcibly Delete to forcibly delete the image. However, after you delete the image, the disks of the ECS instances created from the image cannot be reinitialized. For more information, see Reinitialize a cloud disk.

Can I delete a custom image from my account after I share the image to another account?

Yes, you can delete a custom image from your account after you share the image to another account. However, after you delete the shared image, the system disks of all ECS instances created from the image cannot be reinitialized. We recommend that you unshare the custom image before you delete it.

If I unshare Custom Image M to Account A, what will happen?

Account A will be unable to query Image M either in the ECS console or by calling ECS API operations, and cannot use Image M to create ECS instances or replace system disks. If Account A has created ECS instances from Image M before the image is unshared, the system disks of these instances cannot be reinitialized.

When attempting to delete an image, I am prompted with a message similar to "The specified image cannot be deleted because it is associated with instances." Why?

You may have created the image from a snapshot. To delete this image, you must select Proceed to Forcibly Delete. After you forcibly delete the image, instances created from it are still available, but their cloud disks cannot be reinitialized. For more information, see Delete custom images.

When I replace a system disk, can I select an image that contains data disks for the new system disk?

No, you cannot select an image that contains data disks for the new system disk when you replace a system disk. If you want to use this image to replace a system disk, we recommend that you use the image to create a pay-as-you-go ECS instance and create a snapshot for the system disk of the new instance. You can use the snapshot to create a custom image containing only the system disk, and then use that custom image to replace the system disk of the target instance.

I want to replace the operating system of my ECS instance by using an existing image. What can I do?

For information about how to use an existing image to replace the operating system of an ECS instance, see Change the operating system.
Note We recommend that you create snapshots to back up data before you proceed.

Can an image created from an instance under Account A be used to replace a system disk under Account B?

Yes, you can share the image to Account B and then replace the system disk. For more information, see Share or unshare custom images.
Notice To use an image to replace a system disk, ensure that the image only contains a system disk.

I am creating an ECS instance. Why is the total instance cost displayed when I select a custom image higher than that displayed when I select a public image?

This situation may occur in the following circumstances:
  • The custom image contains data disks. When such an image is selected, the costs of the data disks cause the total cost of the instance to be higher than that of an instance created using a public image.
  • The custom image was created based on a paid public image such as Windows Server or Red Hat Enterprise Linux (RHEL).

What features do Alibaba Cloud Marketplace images provide?

A software environment such as the PHP, .NET, JAVA, or LAMP runtime environment and a variety of features such as control panel and website building systems are pre-installed on the operating systems in Alibaba Cloud Marketplace images. You can use Alibaba Cloud Marketplace images to deploy runtime environments or software applications to ECS instances.

What are the benefits of Alibaba Cloud Marketplace images?

You can use an Alibaba Cloud Marketplace image to create an ECS instance and deploy the pre-installed system environment or software of the image to the ECS instance. This eliminates the need to configure the environment or install software manually and enables you to create a ready-to-run runtime environment and conveniently build and manage services.

What server environments and scenarios do Alibaba Cloud Marketplace images support?

Alibaba Cloud Marketplace provides hundreds of high-quality third-party images. These images not only cover the deployment of runtime environments such as PHP, .NET, JAVA, LAMP, and Docker virtual containers, but can also meet personalized demands for website building, application development, and visual management.

Are Alibaba Cloud Marketplace images safe?

Our image service providers have a wealth of experience in system maintenance and environment configuration. All images are made based on the official Alibaba Cloud operating systems that are installed with Alibaba Cloud Security. All images have passed strict security reviews and are safe to use.

What do I do if I encounter a problem when I am installing or using an Alibaba Cloud Marketplace image?

You can view the service information on the buy page and contact the image service provider by TradeManager, phone, or email. They will answer your questions promptly.

How do I purchase an Alibaba Cloud Marketplace image?

You can purchase an Alibaba Cloud Marketplace image either from Alibaba Cloud Marketplace, or from the ECS instance buy page when you create an ECS instance.

How long can I use a purchased image?

Theoretically, a purchased image can be used indefinitely. However, an image is a piece of software and has its own lifecycle. In addition, image providers only provide services over a limited period of time, which is described in the commodity details.

Are Alibaba Cloud Marketplace images refundable?

Alibaba Cloud Marketplace images support money-back guarantee refunds within a certain period of time based on the Alibaba Cloud Marketplace rules. However, you will be ineligible for a refund in the following situations:
  • You have deployed the purchased image to an ECS instance within the money-back guarantee period.
  • You have deployed the purchased image to an ECS instance before your application for a refund for this image is approved.
  • You can receive refunds only for images that have not been used.

Will any free Alibaba Cloud Marketplace images be available after Alibaba Cloud Marketplace images are commercially available?

A certain number of free Alibaba Cloud Marketplace images are still available. However, you must purchase them at a price of USD 0.00 before you can use them.

I bought an Alibaba Cloud Marketplace image in the China (Hangzhou) region. Can I use it to create an ECS instance or replace a system disk in the China (Beijing) region?

No, Alibaba Cloud Marketplace images are region-specific. You can only use an Alibaba Cloud Marketplace image in a region to create ECS instances or replace system disks within that region.

My ECS instance was created from an Alibaba Cloud Marketplace image. Do I need to make further payments when I upgrade or renew my ECS instance?

No, you do not need to make any further payments. You can use a purchased image to create as many instances as you like.

My ECS instance is created from an Alibaba Cloud Marketplace image. After my ECS instance is released, can I continue to use that image free of charge when I purchase a new ECS instance?

Yes, you can continue to use that image free of charge when you purchase a new ECS instance.

I created an ECS instance from an Alibaba Cloud Marketplace image and then created a custom image from the instance. Do I need to pay for the custom image when I use it to create an ECS instance?

Yes, you must pay the original price of the Alibaba Cloud Marketplace image.

If I copy an Alibaba Cloud Marketplace image that I bought to another region to create an ECS instance, do I need to pay for the image?

Yes, you must pay the original price of the Alibaba Cloud Marketplace image.

I created an ECS instance from an Alibaba Cloud Marketplace image and then created a custom image from that instance. If I share the custom image to Account B, does Account B need to pay for the custom image when it uses the image to create an ECS instance?

Yes, Account B must pay the original price of the Alibaba Cloud Marketplace image.

Is a fee charged if I replace a system disk by using an Alibaba Cloud Marketplace image or an image that derives from an Alibaba Cloud Marketplace image?

It depends. If the current image of your ECS instance is a different version of the replacement image, no fees are charged. Otherwise, a fee is charged.

My ECS instance is using an Alibaba Cloud Marketplace image. Is a fee charged if I replace the system disk of the instance?

No, no fees are charged if you replace the system disk of the instance.

How do I call an ECS API operation to use an Alibaba Cloud Marketplace image or a custom or shared image that derives from an Alibaba Cloud Marketplace image to create an ECS instance or replace a system disk?

  1. Check whether the image in use is an Alibaba Cloud Marketplace image or an image that derives from an Alibaba Cloud Marketplace image. You can call the DescribeImages operation to query the image information.

    If the product ID (ProductCode) of your image is not empty, your image is an Alibaba Cloud Marketplace image or a custom or shared image that derives from an Alibaba Cloud Marketplace image. For example, if the ProductCode of your image is abcd000111, you can access the image at http://market.aliyun.com/products/123/abcd000111.html.

  2. Select the version and region of the image and purchase the image.

    An image that is purchased in a region can only be used in ECS instances in that region. In addition, you can purchase only one image at a time. If you need to create multiple ECS instances, you must purchase multiple images.

  3. You can use the image that you purchase to create an ECS instance or replace a system disk.

If I do not purchase an Alibaba Cloud Marketplace image or an image that derives from an Alibaba Cloud Marketplace image, will an error be reported when I call an ECS API operation to use the image to create an ECS instance or replace a system disk?

Yes, an error will be reported with the QuotaExceed.BuyImage error code.

I have configured a scaling group with the minimum number of instances set to 10 and the maximum number of instances set to 100. What can I do with Alibaba Cloud Marketplace images to ensure that ECS instances are created to suit my computing needs?

If you need to automatically create n instances that use the same image, you must purchase n images from Alibaba Cloud Marketplace in advance.

Can I purchase multiple Alibaba Cloud Marketplace images at a time?

No, you cannot purchase multiple Alibaba Cloud Marketplace images at a time.

If an Alibaba Cloud Marketplace image such as jxsc000010 or jxsc000019 that was previously in use no longer exists, what can I do to ensure that ECS instances can continue to be created properly based on the corresponding scaling configuration within an existing scaling group?

We recommend that you select a suitable replacement image from Alibaba Cloud Marketplace to ensure that ECS instances are properly created in your scaling group.

Can one product code support images of different regions?

Yes, as long as the regions already support the images.

I bought 100 images with the same product code. Can I use them within any region?

Alibaba Cloud Marketplace images are region-specific. If you want to use an image within a specific region, we recommend that you purchase the image within that region.

After I select I/O Optimized, I cannot select Alibaba Cloud Marketplace images when I purchase an ECS instance. What is the cause and how can I resolve this issue?

The cause of and solution to this problem are as follows:
  • Problem description: When you purchase an ECS instance on the official Alibaba Cloud website, you cannot select any Alibaba Cloud Marketplace images.
  • Cause: If you select I/O Optimized when you purchase an ECS instance, you cannot select Alibaba Cloud Marketplace images.

    I/O optimized ECS instances provide better network capabilities between instances and disks compared with non-I/O optimized ECS instances, maximizing the storage performance of standard SSDs. However, not all images support I/O optimized instances because the related optimization operations involve the corresponding network, storage, and internal drives.

  • Solution: When you purchase an I/O optimized instance, we recommend that you select an official standard image supported by the instance and then deploy the business environment.

If the problem persists, we recommend that you submit a ticket.

What are yearly, monthly, and weekly subscription Alibaba Cloud Marketplace images?

Yearly, monthly, or weekly subscription Alibaba Cloud Marketplace images are images that are purchased from Alibaba Cloud Marketplace and billed on a subscription basis. These images are developed and maintained by image providers, who are responsible for both pre-sales consultation and after-sales services. In this topic, these images are collectively referred to as subscription images.

In which ECS instances can I use a subscription image?

A subscription image can only be used in a subscription instance with the same subscription period.

How do I purchase a subscription image? Can I purchase it separately?

No, you cannot purchase a subscription image separately.

You can purchase a subscription image in one of the following ways:
  • When you create an ECS instance, set Billing Method to Subscription, select an image from Alibaba Cloud Marketplace, and then set Duration.
    Note Then, you must pay for both the instance and image. The instance is created upon successful payment for both the image and instance.
  • If you want to use a subscription image in an existing subscription ECS instance, you can use this image to replace the operating system of the instance. In this case, you must set the image subscription period to be the same as the instance subscription period. For more information, see Replace the system disk (non-public images).
    Note In this case, you only need to pay for the image.

How do I pay for subscription images?

Subscription images require payment upfront. The subscription period of a subscription image must be the same as that of the subscription instance in which the image is used.

Image prices are set by the image providers.

Can I use a subscription image after it expires? How do I continue to use it?

When a subscription image expires, it cannot be used unless it is renewed in a timely manner.

You cannot renew a subscription image. If you want to continue using the image, you must renew the image with the corresponding ECS instance. You can resume use of the image after it is renewed.

After I purchase a subscription image, can I request a refund if I no longer want to use it?

The image provider will determine whether to make a refund. You can consult the image provider before your purchase the image.

What can I expect when a refund is made?

If a refund is available, the image provider will make the refund based on your usage.

Can a subscription image be converted to a pay-as-you-go image?

Subscription images cannot be converted to pay-as-you-go images. This function is currently under development for release in the future. Stay updated on the official Alibaba Cloud website.

Can I replace a subscription image with an image of another type or vice versa? How is the fee calculated?

Yes, you can replace images when you replace system disks of ECS instances. You can make the following replacements:
  • Replace an image of another type (such as public image, custom image, or shared image) with a subscription image. After the image is replaced, the system will calculate the actual cost based on the image cost and the remaining subscription period of the ECS instance.
  • Replace a subscription image with an image of another type (such as public image, custom image, or shared image). If the image provider allows for refunds, a refund will be made based on your actual usage.
  • Replace Subscription Image A with Subscription Image B. If a refund is available after the image is replaced, the refund will be made based on the refund policy. The actual cost of Image B will be calculated based on the image price and the remaining subscription period of the ECS instance.

Where do I view and manage the subscription images that I purchased?

You can log on to the ECS console. In the left-side navigation pane, choose Instances & Images > Images. Then, click the Marketplace Images tab to view and manage the subscription images that you purchased.

Is a fee charged for a custom image created based on a subscription image? How will the custom image be affected if the subscription image expires?

When you use a custom image created based on a subscription image to create an instance or replace a system disk, you are re-ordering the subscription image on Alibaba Cloud Marketplace. The custom image will not be affected regardless of whether the original subscription image expires.

Why am I unable to select a Windows operating system for certain ECS instances?

When you create an ECS instance from a Windows operating system, ensure that the instance memory is greater than or equal to 1 GiB. For ECS instances with less than 1 GiB of memory, you can only select Linux and Windows Server 1709 images.

Does Alibaba Cloud support Windows Server 2008 and Windows Server 2008 R2?

From January 14, 2020, Microsoft stopped providing support for Windows Server 2008 and Windows Server 2008 R2 operating systems. Therefore, Alibaba Cloud no longer provides technical support for ECS instances that use the preceding operating systems. If you have ECS instances that use the preceding operating systems, upgrade them to Windows Server 2012 or later in a timely manner.

The operating system of my instance is Windows Server. I am prompted with a message indicating that the operating system is not genuine. What can I do?

Activate the Windows operating system. For more information, see How to activate the VPC-connected Windows instances using KMS servers.

Is a fee charged for the operating system of an ECS instance?

The Windows Server and Red Hat public images are charged. The fees depend on instance types. Other public images are free of charge. For more information about the fees for other types of images, see Image types.

Can I install or upgrade my operating system?

No, you cannot install or upgrade your operating system. An ECS instance must use an image that is provided by Alibaba Cloud, which you cannot add or upgrade on your own. However, you can perform the following operations:

Do operating systems have a graphical interface?

Windows operating systems (except for the Windows Server Semi-Annual Channel instances) offer a management desktop. For more information about how to use Windows Server Semi-Annual Channel operating systems, see Manage Windows Server Semi-Annual Channel images and instances.

Linux operating systems offer a command line interface. You can install a graphical desktop as needed.

How do I choose an operating system?

See Select an image.

Do public images come with the FTP service?

No, you must configure the FTP service on your own. For more information, see Build an FTP site on a Windows instance and Build an FTP site on a Linux instance.

Which SUSE versions do Alibaba Cloud public images support?

Alibaba Cloud public images support SUSE versions. For more information, see the "Aliyun Linux images" section in Overview.

What service support is available for SUSE operating systems?

SUSE Linux Enterprise Server (SLES) operating systems that are sold on Alibaba Cloud Marketplace are synchronized with SUSE update sources on a regular basis. For instances that are created from Alibaba Cloud SLES public images, the support for their operating systems is covered by the Alibaba Cloud enterprise-level support service. If you have purchased the enterprise-level support service and encounter a problem when you use an SLES operating system, submit a ticket to contact the Alibaba Cloud technical support personnel.

If an image was manually created from an ECS instance, can I retrieve the instance data after the instance is released upon expiration?

Yes. You can retrieve instance data in one of the following ways:
  • Create a new instance from the previously created image. For more information, see Create an ECS instance by using a custom image.
  • Use the previously created image to replace the system disk of the current instance. For more information, see Replace the system disk (non-public images).
    Notice When you replace a system disk, note the following items:
    • All current system disk data will be lost, and the system disk will be restored to the state of the image.
    • The image must be in the same region as the current instance.

I have an ECS instance and I want to create another ECS instance from an image of the current ECS instance. What can I do?

You can create a custom image from the current ECS instance and then use the custom image to create a new ECS instance. For more information, see Create a custom image by using an instance and Create an ECS instance by using a custom image.

I have purchased an ECS instance. How do I restore my shared image to the newly purchased instance?

Make sure that you have shared the image to the account of the newly purchased instance. Use one of the following methods as needed:
  • If the shared image and the instance are located in the same region, replace the system disk of the instance and select the shared image for the new system disk. For more information, see Replace the system disk (non-public images).
  • If the shared image and the instance are not located in the same region, copy the image to the region where the instance is located. Then replace the instance system disk, and select this image for the new system disk. For more information, see Copy custom images and Replace the system disk (non-public images).
Notice The following risks are associated with replacing the system disk of an instance:
  • The original system disk will be released. We recommend that you create a snapshot to back up your data in advance.
  • Replacing the system disk requires stopping the instance, which can interrupt the services running on the instance.
  • After you replace the system disk, you must re-deploy the service environment on the new system disk. Services running on the instance may be interrupted for an extended period of time.
  • Replacing a system disk will re-allocate a system disk with a different disk ID to your instance. Snapshots of the original system disk cannot be used to roll back the new system disk.

I have multiple Alibaba Cloud accounts. I want to transfer an instance from Account A to Account B or migrate the environment and applications of an instance under Account A to an instance under Account B. What can I do?

You can perform the following steps:
  1. Create a custom image from the instance under Account A. For more information, see Create a custom image by using an instance.
  2. Share the image to Account B. For more information, see Share or unshare custom images.
  3. Create an instance under Account B from the shared image. For more information, see Create an ECS instance by using a custom image.

How do I migrate data between ECS instances?

You can perform the following steps to migrate data from one ECS instance to another:
  1. Create a custom image from the source ECS instance.
  2. Copy or share the custom image.
    • If the source and destination instances are located within the same region and belong to the same account, go to the next step.
    • If the source and destination instances are located in different regions but belong to the same account, copy the image to the region where the destination instance is located. For more information, see Copy custom images.
    • If the source and destination instances are located within the same region but belong to different accounts, share the custom image to the account of the destination instance. For more information, see Share or unshare custom images.
    • If the source and destination instances are located in different regions and belong to different accounts, copy the image to the region where the destination instance is located, and then share the image to the account of the destination instance. For more information, see Copy custom images and Share or unshare custom images.
  3. Use the shared image to create an ECS instance or replace the image of the destination instance. For more information, see Create an ECS instance by using a custom image or Change the operating system.
    Note If you want to replace the image of the destination instance, ensure that the original image does not contain any data disk snapshots.

If the preceding steps are not applicable, see Migrate your instance within Alibaba Cloud ECS for more information about how to migrate data between ECS instances.

Can ECS instances in different VPCs communicate with each other?

Express Connect and Cloud Enterprise Network (CEN) can be used to allow VPCs to connect to each other. For more information, see Step 1: Network planning. ECS instances in interconnected VPCs can then communicate with each other.

How do I handle a CentOS DNS resolution timeout?

The CentOS DNS resolution timeout problem is analyzed and fixed as follows:
  • Cause

    The DNS resolution mechanism of CentOS 6 and CentOS 7 has changed. A DNS resolution timeout may occur in CentOS 6 or CentOS 7 instances that were created before February 22, 2017 or created from custom images that were created before February 22, 2017.

  • Solution
    You can perform the following steps to fix this problem:
    1. Download the fix_dns.sh script.
    2. Place the downloaded script in the /tmp directory of the CentOS system.
    3. Run the bash /tmp/fix_dns.sh command to execute the script.
  • Script role

    The script determines whether the /etc/resolv.conf file contains the options > single-request-reopen configuration. For more information, see resolv.conf - resolver configuration file.

    The DNS resolution mechanism of CentOS 6 and CentOS 7 uses the same 5-tuple to send IPv4 and IPv6 DNS requests, for which purpose the single-request-reopen option must be added. When two requests from the same port need to be handled after the option is added, the resolver closes the socket after the resolver sends the first request and opens a new socket before the resolver sends the second request. The option will take effect immediately after being added. You do not need to restart the instance.

  • Script logic
    1. Determine whether the operating system of the instance is CentOS.
      • If the operating system is not CentOS (for example, the operating system is Ubuntu or Debian), the script stops working.
      • If the operating system is CentOS, the script continues working.
    2. Query the options configuration in the /etc/resolv.conf file.
      • If the options configuration is unavailable:
        Use the Alibaba Cloud options configuration (options timeout:2 attempts:3 rotate single-request-reopen).
      • If the options configuration is available:
        • If the single-request-reopen option does not exist, append this option to the options configuration.
        • If the single-request-reopen option exists, the script will stop working and the DNS nameserver configuration will not change.

Why does ECS disable virtual memory and leave swap partitions unconfigured by default?

When physical memory is insufficient, the memory manager will store memory data that has been inactive for an extended period of time to a swap partition or virtual memory file. This mechanism helps increase the available memory.

However, if memory usage is already high and I/O performance is poor, the mechanism will decrease the available memory instead. Alibaba Cloud ECS disks use distributed file systems for storage and provide multiple strongly consistent replicas for each piece of data. This mechanism ensures the security of user data but deteriorates the storage and I/O performance of local disks by tripling the number of I/O operations.

Because of this, virtual memory is not enabled for Windows, and swap partitions are not configured for Linux by default to avoid further decreasing I/O performance when the system resources are insufficient.

How do I enable the kdump service in a public image?

By default, the kdump service is disabled in public images. If you want your instance to generate a core file when the instance is down so that you can analyze the downtime cause based on the file, you can perform the following steps to enable the kdump service. These steps use the CentOS 7.2 public image as an example.
  1. Configure the directory in which to generate the core file.
    1. Run the vim /etc/kdump.conf command to open the kdump profile.
    2. Run the path command to configure the directory in which to generate the core file. In this example, the directory is /var/crash, and the following path command is used:
      path /var/crash
    3. Save and close the /etc/kdump.conf file.
  2. Enable the kdump service.
    Use one of the following methods based on the operating system to enable the kdump service. In this example, the kdump service in CentOS 7.2 is enabled in Method 1.
    • Method 1: Run the following commands to enable the kdump service:
      systemctl enable kdump.service
      systemctl start kdump.service
    • Method 2: Run the following commands to enable the kdump service:
      chkconfig kdump on
      service kdump start
  3. Run the following command to simulate the scenario in which the instance is down:
    echo c > /proc/sysrq-trigger
    Note After the command is run, the instance is disconnected from the network. You must reconnect the instance to the network to perform the subsequent operations.
  4. Analyze the core file.
    1. Run the following command to install the crash analysis tool:
      yum install crash
    2. Download the debug-info installation package.
      Run the uname -r command to view the operating system kernel version and download the debug-info installation package that matches the kernel version.
      • kernel-debuginfo-common-x86_64-<Kernel version>.rpm
      • kernel-debuginfo-<Kernel version>.rpm
      In this example, the kernel version is 3.10.0-514.26.2.el7.x86_64. The following download commands are used:
      wget http://debuginfo.centos.org/7/x86_64/kernel-debuginfo-common-x86_64-3.10.0-514.26.2.el7.x86_64.rpm
      wget http://debuginfo.centos.org/7/x86_64/kernel-debuginfo-3.10.0-514.26.2.el7.x86_64.rpm
    3. Run the following commands to install the debug-info package:
      rpm -ivh kernel-debuginfo-common-x86_64-3.10.0-514.26.2.el7.x86_64.rpm
      rpm -ivh kernel-debuginfo-3.10.0-514.26.2.el7.x86_64.rpm
    4. Run the following commands to use the crash analysis tool to analyze the core file:
      cd <core file directory>
      crash /usr/lib/debug/lib/modules/<Kernel version>/vmlinux vmcore
      In this example, the core file directory is /var/crash/127.0.0.1-2019-07-08-15:52:25, and the kernel version is 3.10.0-514.26.2.el7.x86_64. The following commands are used:
      cd /var/crash/127.0.0.1-2019-07-08-15:52:25
      crash /usr/lib/debug/lib/modules/3.10.0-514.26.2.el7.x86_64/vmlinux vmcore

How do I enable or disable the Meltdown and Spectre patches for Linux images?

For information about the security vulnerabilities and public images involved as well as how to enable or disable security vulnerability patches, see How do I enable or disable the Meltdown and Spectre patches for Linux images?.

After I use an ECS instance for an extended period of time without restarting it, the instance is disconnected from the network, the network is no longer available, or the public or private IP address of the instance cannot be pinged. What can I do?

For more information about the cause of and solution to this issue, see Troubleshoot IP address faults in CentOS 7 instances and Windows instances.

The "UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY." error is reported when an ECS instance starts. What can I do?

This indicates that a file system error occurs due to data loss in the memory of the ECS instance, which may be caused by conditions such as poweroff. For more information about the problem and the solution to the problem, see How to solve the "UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY." error returned when the ECS instance operating system fails to start.

How do I upgrade RHEL 7 to RHEL 8?

For more information, see Upgrading from RHEL 7 to RHEL 8.