All Products
Search
Document Center

Elastic Compute Service:Create an instance from a custom or shared image

Last Updated:Jun 16, 2026

Batch-deploy ECS instances with custom or shared images for rapid environment replication.

Region limitations

The instance must be created in the same region as the image.

Procedure

Console

  1. Go to the ECS console - Images page. Select your resource group and region.

  2. On the Custom Images or Shared Images tab, find the image and click Create Instance in the Actions column.

  3. The Region and Image are pre-filled. Complete the remaining configuration items and click Confirm Order.

CLI

Call the RunInstances or CreateInstance operation and set ImageId to your custom image ID.

This command creates an instance with custom image m-bp1******pi.
aliyun ecs RunInstances \
--region cn-hangzhou \
--RegionId 'cn-hangzhou' \
--ImageId 'm-bp1******pi' \
--InstanceType 'ecs.g7.large' \
--VSwitchId 'vsw-bp1******trg' \
--SecurityGroupId 'sg-bp1******dgl' \
--SystemDisk.Size 40 \
--SystemDisk.Category cloud_essd \

API

Call the RunInstances or CreateInstance operation and set ImageId to your custom image ID.

Next steps

Billing

Creating an ECS instance from a custom or shared image based on a paid image may incur image software license fees.

FAQ

What should I do if my custom image is in a different account or region?

Scenario

Solution

The image is on a local device.

Import the image as an Alibaba Cloud custom image.

The image is in another region.

Copy the image to the target region.

The image is in another Alibaba Cloud account.

Share the image with the target account.

Why can't I see certain images (including custom images) when I create an ECS instance?

  • The image features do not match the instance type: An instance type that supports NVMe can use only an image that supports NVMe. Make sure the NVMe driver is installed in the image and change the NVMe Driver attribute of the image to Supported so that the image appears in the image list. In addition, an instance type that supports only the UEFI boot mode can use only a UEFI image. For a custom image, change the boot mode of the image to resolve the issue.

  • The operating system is incompatible with the processor of the instance type: Some instance types, such as 8th-generation instances, support only specific operating systems.

  • Windows operating system versions have limits on the number of vCPUs and the memory size: To use a Windows image, the instance memory must be 1 GiB or larger. An instance with less than 1 GiB of memory can use only a Linux image.

  • Red Hat images support only instance types certified by Red Hat.

  • Some bare metal and local SSD instances have requirements on the drivers and kernel of the operating system: Select an image that matches the processor of the instance type.

For more information, see Why can't I see certain images when I create an ECS instance?