The image check feature verifies validates custom images and determines whether they can be used to create full-featured Elastic Compute Service (ECS) instances. You can use this feature during image creation or import. After an image is checked, you can view the check results in the ECS console and resolve identified issues based on recommended solutions to improve image quality and ensure that ECS instances created from the image can run as expected.
An image check is performed after image creation or import. The check does not affect the process even if it fails.
Image check is free.
Images that pass the check are tagged with the operating system version (
acs:ecs:image:osVersion
) and kernel version (acs:ecs:image:kernelVersion
).
We recommend that you configure the image check feature when you create or import images. It provides the following benefits:
You can view the check results to understand the actual operating system configurations, such as the kernel version and partition configurations. For more information, see Image check items.
The image check feature provides recommended solutions to identified issues, helping improve image quality.
The image check feature optimizes images based on check results to reduce startup time, increase the startup success rate, and improve the system configuration stability for ECS instances. After an image is optimized by the image check feature, new images derived from it inherit its optimization capabilities.
Limits
The image check feature is available only for custom images created from non-encrypted snapshots or from instances without encrypted disks.
The image check feature does not support the Linux and Windows operating systems in the following tables.
Configure the image check feature
Configure the image check feature during image creation
Use the ECS console
By default, the Check After Creation option is selected when you create a custom image in the ECS console. Do not change this setting. For more information, see Create a custom image from an instance and Create a custom image from a snapshot.
Call an API operation
Call the CreateImage operation with DetectionStrategy
parameter set to Standard
to create and check an image. You can call this operation in OpenAPI Explorer. OpenAPI Explorer automatically calculates the signature value and dynamically generates the sample code of the operation for different SDKs.
Configure the image check feature during image import
Use the ECS console
By default, the Check After Import option is selected when you import a custom image in the ECS console. Do not change this setting. For more information, see Import a custom image.
Call an API operation
Call the ImportImage operation in with DetectionStrategy
set to Standard
to import and check an image. You can call this operation in OpenAPI Explorer. OpenAPI Explorer automatically calculates the signature value and dynamically generates the sample code of the operation for different SDKs.
View image check results
Use the ECS console
On the Custom Images tab of the Images page, find the created image. When the image enters the Available state, the image check task is automatically executed.
Move the pointer over Checked and click View More to view the check result details.
(Conditionally required) To repair specific image check items, perform one of the following operations:
For Linux images, click Repair to repair items by using the CloudOps Orchestration Service (OOS) ACS-ECS-RepairImage public template.
Manually repair images based on the recommended solutions in the check results. For more information about image check items and repair suggestions, see Image check items.
Call an API operation
Call the DescribeImages operation to query a checked image by image ID. You can call this operation in OpenAPI Explorer. OpenAPI Explorer automatically calculates the signature value and dynamically generates the sample code of the operation for different SDKs.
In the response, DetectionOptions
indicates the image check results, Status
indicates the check task status, and Item
indicates the result of each check item.
Image check items
Linux check items
The following table describes the check items for Linux images and provides solutions for identified issues.
Check item | Description | Recommended solution |
GUESTOS.Platform | The Linux operating system. | None. |
GUESTOS.OSVersion | The operating system version. | None. |
GUESTOS.Architecture | The operating system architecture. | None. |
GUESTOS.RtcTimeMode | The time standard of the real-time clock (RTC), which can be Coordinated Universal Time (UTC) or local time. We recommend that you set this item to UTC. | For more information, see Linux time and time zones. |
GUESTOS.BootMode | The image boot mode, which can be Legacy or Unified Extensible Firmware Interface (UEFI). | None. |
GUESTOS.KernelVersion | The kernel version. | None. |
GUESTOS.Virtio | Whether the virtio driver is installed on the image. ECS instances run based on virtualized device drivers. If the virtio driver is not installed, system startup exceptions may occur on ECS instances that use the image. | For information about how to install the virtio driver, see Install the virtio driver. |
GUESTOS.Nvme | Whether the Non-Volatile Memory Express (NVMe) driver is installed on the image. To use this image on ECS instance types with NVMe disks, such as ecs.g7se instance types, make sure that the NVMe driver is installed on the image. | For information about how to install the NVMe drive, see How do I install the NVMe driver for a custom image? |
GUESTOS.Fstab | The mount information of file systems in the image's /etc/fstab file. Mount information errors, such as nonexistent devices and incorrect universally unique identifiers (UUIDs), may cause system startup exceptions. | For information about how to configure the /etc/fstab file, see Configure UUIDs in the fstab file to automatically mount data disks. |
GUESTOS.Grub | Whether the GRand Unified Bootloader (GRUB) file is properly configured in the image. Issues, such as device configuration exceptions, nonexistent devices, and incorrect UUIDs, may cause system startup exceptions. | None |
GUESTOS.Dhcp | Whether Dynamic Host Configuration Protocol (DHCP) is specified as the method for assigning IP addresses to network devices in the image's network configuration files. If Static IP is set as the method for assigning IP addresses to network devices, network configuration exceptions may occur after ECS instances that use the image are started. | For information about how to configure DHCP in the network configuration of a Linux image, see How to Configure the Network as DHCP in a Linux Image. |
GUESTOS.Selinux | Whether Security-Enhanced Linux (SELinux) is disabled for the image. We recommend that you disable it to prevent system startup exceptions. | For information about how to disable SELinux, see Enable or disable SELinux. |
GUESTOS.OnlineResizeFS | Whether the image allows automatic extension of the root partition. Cloud-init and growpart are installed in the image. When an ECS instance is created from the image, the root partition of the instance is automatically extended. For example, if you use an image of 20 GB and specify a system disk size of 100 GB to create an ECS instance, the root partition is automatically extended to 100 GB upon instance creation. | For information about how to configure an image to support automatic resizing, see Install cloud-init. |
GUESTOS.SystemImage | Whether the image is a valid system disk image. Do not import invalid images, such as ISO or empty images. | None. |
GUESTOS.CloudAssistant | Whether Cloud Assistant Agent is installed. Cloud Assistant is a native automated O&M tool developed for ECS. You can use it to batch maintain ECS instances and batch run scripts on or send files to ECS instances without the need for passwords, instance logon, or jump servers. The scripts can be Shell, PowerShell, or batch scripts. We recommend that you install Cloud Assistant Agent on the image. | For information about how to install Cloud Assistant Agent, see Install Cloud Assistant Agent. |
GUESTOS.CloudInit | Whether cloud-init is installed on the image. cloud-init is a standard tool for cloud servers to initialize system configurations. You can use it to configure hostnames and keys for ECS instances and configure automatic extension of root partitions. | For information about how to install cloud-init, see Install cloud-init. |
GUESTOS.SecurityCenterAgent | Whether the Security Center agent is installed in the image. Security Center is a security management system that can detect and analyze risks and generate alerts in real time. It provides features, such as security overview, anti-ransomware, antivirus, web tamper proofing, and compliance checks, to detect risks and protect your servers and web applications. | For information about how to install the Security Center agent, see Install the client. |
GUESTOS.SupportMocInstanceTypes | Support for SHENLONG-based instance types. The latest ECS instance types are typically SHENLONG-based, such as ecs.g6 and ecs.g7. If the operating system and kernel versions of an image are outdated, startup exceptions may occur when you use it on such instance types. For more information about instance types, see Overview of instance families. |
|
Windows check items
The following table describes the check items for Windows images and provides solutions for the identified issues.
Check item | Description | Repair suggestion |
GUESTOS.Platform | The Windows operating system. | None. |
GUESTOS.OSVersion | The operating system version. | None. |
GUESTOS.Architecture | The operating system architecture. | None. |
GUESTOS.KernelVersion | The kernel version. | None. |
GUESTOS.Virtio | Whether the virtio driver is installed on the image. ECS instances runs based on virtualized device drivers. If the virtio driver is not installed, startup exceptions may occur on ECS instances that use the image. | For information about how to install the virtio driver, see Install the virtio driver. |
GUESTOS.BCD | Whether the Boot Configuration Data (BCD) file in the image is correct. If the BCD file is missing or damaged, ECS instances that use the image may fail to start. | Use the correct BCD file. |
GUESTOS.Registry | Whether the registry file in the image is correct. If the registry file is missing or damaged, instances that use the image may fail to start. | Use the correct registry file. |
GUESTOS.Hotfix | Whether patches in the image are correct. If a required patch is missing or an invalid patch is installed, ECS instances that use the image may fail to start. |
|
GUESTOS.Disk | Whether the disk configurations of the image are correct. If a residual driver remains on a disk in the image, ECS instances that use the image may fail to start. | |
GUESTOS.Sysprep | Whether the Sysprep process is complete during image creation. If the Sysprep process is terminated due to operations, such as forced system shutdown, instances that use the image may fail to start. | Recreate the image and do not interrupt the Sysprep process. For more information, see Create a virtual machine and install an operating system. |
GUESTOS.Update | Whether the Update process is complete during image creation. If the Update process is terminated due to operations, such as forced system shutdown, instances that use the image may fail to start. | Recreate the image and do not interrupt the Update process. For more information, see Create a virtual machine and install an operating system. |
GUESTOS.Xen | Whether a residual Xen driver exists. If a residual Xen driver remains on a disk in the image, the operating systems of ECS instances that use the image may fail to start. | |
GUESTOS.CloudAssistant | Whether Cloud Assistant Agent is installed. Cloud Assistant is a native automated O&M tool developed for ECS. You can use it to batch maintain ECS instances and batch run scripts on or send files to ECS instances without the need for passwords, instance logon, or jump servers. The scripts can run include Shell, PowerShell, and batch scripts. We recommend that you install Cloud Assistant Agent on the image. | For information about how to install Cloud Assistant Agent, see Install Cloud Assistant Agent. |
GUESTOS.Server | Whether service configurations in the image are correct. If driver installation is disabled in the image, instances that use the image cannot update drivers. | |
GUESTOS.DesktopConfig | Whether the desktop configuration file (desktop.ini) is missing. If so, the desktop configuration becomes invalid. | Use a correct desktop.ini file. |
GUESTOS.BootMgr | Whether Windows Boot Manager (BootMgr) is missing. If so, the system cannot start. | Correctly configure BootMgr. |
Solutions to image issues
This section describes the suggested solutions to common issues in Windows images.
Delete residual drivers from the registry
Disable the Xen driver
Enable driver installation
References
Before image service providers publish images in Alibaba Cloud Marketplace or create custom images, they must meet the specification requirements for compatibility with ECS instance types. For more information, see Alibaba Cloud image specifications (Linux) and Alibaba Cloud image specifications (Windows).
CloudOps Orchestration Service (OOS) is a free cloud-based automated operations and maintenance platform that uses templates to define operations you want to orchestrate. OOS provides public templates that you can directly use or reference. You can also create custom templates. For more information, see Overview of templates.