The image check feature verifies the validity of custom images and determines whether they can create fully functional ECS instances. You can use this feature when creating or importing images. After the check completes, you can view the results in the ECS console and improve image quality based on repair suggestions to ensure your ECS instances run stably and efficiently.
Image check is triggered after an image is created or imported. The check does not affect the process even if it fails.
Image check is free of charge.
Images that pass the check are tagged with the operating system version (
acs:ecs:image:osVersion
) and kernel version (acs:ecs:image:kernelVersion
) tags .
We strongly recommend that you configure the image check feature when you create or import images. The image check feature provides the following benefits:
You can view the check results to understand the actual configuration information of the operating system, such as the kernel version and partition configuration. For more information, see Image check items.
The ECS image service provides repair suggestions for check items with issues to help improve image quality.
The image check feature optimizes images based on check results to reduce startup time, increase startup success rate, and improve system configuration stability for ECS instances. New images derived from the optimized ECS images inherit these optimization capabilities.
Limits
Image check is available only for custom images created from snapshots that do not include encrypted snapshots or from instances that do not include encrypted disks.
Image check does not support some Linux and Windows operating systems. The following table lists the unsupported operating systems.
Configure the image check feature
Configure image check when you create an image
Use the console
By default, image check 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.
Use API
You can set the DetectionStrategy parameter to Standard in the CreateImage operation: DetectionStrategy=Standard
. You can call the operation in OpenAPI Explorer. OpenAPI Explorer automatically calculates the signature value and dynamically generates the sample code of the operation for different SDKs.
Configure image check when you import an image
Use the console
By default, the Image Check option is selected when you import a custom image in the ECS console. Do not change this setting. For more information, see Import custom images.
Use API
You can set the DetectionStrategy parameter to Standard in the ImportImage operation: DetectionStrategy=Standard
. You can call the 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 console
On the Custom Images page, find the created image. After the image status changes to Available, the image check task is automatically executed.
Move the pointer over Check Completed and click View Details to view the detailed image check results.
(Conditionally required) If you need to repair specific image check items, repair the items by performing one of the following operations:
(Applicable only to Linux) You can click One-click Repair to use the ACS-ECS-RepairImage public template of CloudOps Orchestration Service (OOS) to repair the items.
You can also manually repair the items based on the repair suggestions in the image details. For more information about image check items and repair suggestions, see Image check items.
Use API
You can call the DescribeImages operation to query the image ID of the image that you want to check. You can call the operation in OpenAPI Explorer. OpenAPI Explorer automatically calculates the signature value and dynamically generates the sample code of the operation for different SDKs.
The DetectionOptions
parameter in the response contains the check results. The Status
parameter indicates the status of the check task, and the Item
parameter 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 the identified issues.
Check item | Description | Repair suggestion |
GUESTOS.Platform | The Linux operating system. | None. |
GUESTOS.OSVersion | The operating system version. | None. |
GUESTOS.Architecture | The architecture of the operating system. | 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 the time standard of the RTC to UTC. | For information about how to set the time standard of the hardware clock to UTC, see Linux time and time zone description. |
GUESTOS.BootMode | The boot mode of the image, 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 in the image. ECS instances depend on virtualized device drivers to run. 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 for an image, see Install the virtio driver. |
GUESTOS.Nvme | Whether the NVMe drive is installed in the image. Some ECS instance types, such as ecs.g7se, use disks that are mounted based on the NVMe protocol. The related driver must be installed in the image. | For information about how to install the NVMe drive for an image, see How do I install the NVMe driver for an existing custom image?. |
GUESTOS.Fstab | The mount information about file systems that is specified in the /etc/fstab file of the image. Mount information errors of file systems may cause system startup exceptions. Examples of the errors: nonexistent file systems whose mount information is included in the /etc/fstab file and incorrect universally unique identifiers (UUIDs) of file systems. | For information about how to correctly 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 correctly configured in the image. Issues such as device configuration exceptions, absent devices, and invalid UUIDs may cause system startup exceptions. | None |
GUESTOS.Dhcp | Whether Dynamic Host Configuration Protocol (DHCP) is configured in the network configuration file of the image to assign dynamic IP addresses to ECS instances. If a static IP address is configured for the image, network configuration exceptions may occur after ECS instances that use the image are started. | For information about how to configure DHCP for the network of a Linux image, see How do I configure DHCP for the network of a Linux image?. |
GUESTOS.Selinux | Whether Security-Enhanced Linux (SELinux) is disabled in the image. We recommend that you do not enable SELinux in images in the cloud. If you enable SELinux in an image in the cloud, system startup exceptions may occur. | For information about how to disable SELinux, see Enable or disable SELinux. |
GUESTOS.OnlineResizeFS | Whether the image allows the root partition to be automatically extended. Cloud-init and growpart are installed in the image. After an instance is created by using the image, the root partition of the system disk is automatically resized. For example, if you use an image that is 20 GB in size and specify a system disk size of 100 GB to create an instance, the root partition is automatically resized to 100 GB when the instance is created. | 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 images or empty images. | None. |
GUESTOS.CloudAssistant | Whether Cloud Assistant Agent is installed. Cloud Assistant is a native automated O&M tool that is developed for ECS. It allows you to batch maintain ECS instances and batch execute scripts on and send files to ECS instances in a password-free, logon-free manner without the use of jump servers. These scripts can be Shell, PowerShell, or batch scripts. We recommend that you install Cloud Assistant Agent on the image to perform efficient O&M on ECS instances. | For information about how to install Cloud Assistant Agent, see Install Cloud Assistant Agent. |
GUESTOS.CloudInit | Whether cloud-init is installed in the image. cloud-init is the standard tool that can be used by cloud servers to initialize system configurations. You can use it to configure hostnames and keys of instances and configure the root partitions of system disks to be automatically resized. | For information about how to install cloud-init for an image, 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. Security Center provides features such as security overview, anti-ransomware, antivirus, web tamper proofing, and compliance checks to help detect risks and protect your servers and web applications. | For information about how to install the Security Center agent for an image, see Install the client. |
GUESTOS.SupportMocInstanceTypes | Check whether the image supports instance types that are based on the SHENLONG architecture. The latest ECS instance types of Alibaba Cloud are typically based on the SHENLONG architecture, such as ecs.g6 and ecs.g7. If the operating system and kernel versions of an image are too early, startup exceptions may occur on the related instance types. For more information about instance types, see Instance family. |
|
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 architecture of the operating system. | None. |
GUESTOS.KernelVersion | The kernel version. | None. |
GUESTOS.Virtio | Whether the virtio driver is installed in the image. ECS instances depend on virtualized device drivers to run. If the virtio driver is not installed in an image, startup exceptions may occur on ECS instances that use the image. | For information about how to install the virtio driver for an image, 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 be unable 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, the instances that use the image may be unable to start. | Use the correct registry file. |
GUESTOS.Hotfix | Whether the 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 be unable to start. |
|
GUESTOS.Disk | Whether the disk configurations of the image are correct. If a residual driver remains on a disk contained in an image, ECS instances that use the image may be unable 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 when the image is being created, the instances that use the image may be unable 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 when the image is being created, the instances that use the image may be unable 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 contained in an image, the operating systems of ECS instances that use the image may be unable to start. | |
GUESTOS.CloudAssistant | Whether Cloud Assistant Agent is installed. Cloud Assistant is a native automated O&M tool that is developed for ECS. You can use Cloud Assistant to batch maintain ECS instances and batch run scripts on or send files to ECS instances in a password-free manner without the need to log on to the instances or use jump servers. The scripts that you can run include Shell, PowerShell, and batch scripts. We recommend that you install Cloud Assistant Agent in the image to perform efficient O&M on ECS. | 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 the image is configured to disallow drivers to be installed, the instances that use the image cannot update the drivers. | |
GUESTOS.DesktopConfig | Whether the desktop configuration file (desktop.ini) is missing. If the file is missing, the desktop configuration becomes invalid. | Use a correct desktop.ini file. |
GUESTOS.BootMgr | Whether Windows Boot Manager (BootMgr) is missing. If BootMgr is missing, the system cannot start. | Correctly configure BootMgr. |
Image check repair suggestions
The following section describes the repair suggestions for common Windows image check issues. You can refer to these repair suggestions if you encounter similar issues.
Delete residual drivers from the registry
Configure Xen drivers to be ineffective
Configure drivers to be installable
References
Before image service providers publish images in Alibaba Cloud Marketplace or create custom images on their own, 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 the operations you want to orchestrate. OOS provides public templates that you can use directly or reference. You can also create custom templates. For more information, see Overview of templates.