This topic describes how to import on-premises image files to your ECS environment to create ECS instances or change system disks.
- You have understood the limitations of importing an on-premises image after reviewing the notes for importing images, customize Linux images, and convert image format.
- You have activated OSS.
- (Optional) If you are using a RAM sub-account, you have obtained the permission for the AliyunECSImageImportDefaultRole role from the master account.
To import custom images in the ECS console, follow these steps:
- Use an OSS third-party client or OSS API to upload the prepared custom image. If the file you want to upload is larger than 5 GiB, see Multipart upload and resumable upload.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- Click Import Image.
- In the Import Image dialog box, click Confirm Address.
- In the Cloud Resource Access Authorization window, select
AliyunECSExportDefaultRole, then click Confirm Authorization Policy to allow the ECS service to access your OSS resources.
- Go back to the Images page and click Import Image again.
- In the Import Image dialog box, enter the following information:
- Region of Image: Select the region where the OSS Bucket of the image file to upload is located.
- OSS Object Address: Copy the object address of the image file from the OSS console. For more information, see Download an object.
- Image Name: Enter a name for the custom image. The name must be 2 to 128 characters in length and start with a letter. It can contain letters, numbers, periods (.), underscores (_), colons (:), and hyphens (-).
- Operating System: Select Windows or Linux according to the operating system of your image. If you want to import a non-standard platform image, select Linux.
- System Disk Size: The system disk size, which ranges from 40 GiB to 500 GiB.
- System Architecture: Choose x86_64 for 64-bit operating systems and choose i386 for 32-bit operating systems.
- Platform: The options depend on the Operating System you chose.
- Windows: Windows Server 2003, Windows Server 2008, and Windows Server 2012.
- Linux: CentOS, SUSE, Ubuntu, Debian, FreeBSD, CoreOS, Aliyun, Customized Linux, and Others Linux (open a ticket to confirm the selected edition is supported).
- If your image operating system is a custom edition developed from Linux kernel, open a ticket to contact us.
- Image Format: Supports QCOW2, RAW, and VHD. QCOW2 or VHD is recommended.
- Image Description: Enter a description of the custom image.
- Add Images of Data Disks: Choose this option if you want to import an image that contains data disks. Supported data disk capacity ranges from 5 GiB to 2,000 GiB.
- Click OK.
- (Optional) You can view the task progress in the image list of the import region. Before the task is completed, you can find the imported custom image through Tasks management, and, if needed, cancel the import task.
The time it takes to import a custom image depends on the size of the image file and the number of image import tasks in the queue.