During image creation and image import, you can use the image check feature to verify that a custom image can be used to create fully functional ECS instances. After the check is complete, you can view the results in the ECS console and follow the repair suggestions to improve image quality, which helps ensure that your ECS instances run stably and efficiently.
-
Creating or importing an image triggers an image check. The check doesn't interrupt the workflow, even if it fails.
-
Image check is free of charge.
-
Images that pass the check are automatically tagged with operating system version (
acs:ecs:image:osVersion) and kernel version (acs:ecs:image:kernelVersion) tags.
Limitations
Image check supports only custom images created from unencrypted snapshots or from instances without encrypted cloud disks.
Image check does not support some Linux and Windows operating systems, which are listed in the following tables.
Configure image check
During image creation
Console
When you create a custom image in the ECS console, an image check runs by default. No changes are needed. For more information, see Create a custom image by using an instance and Create a custom image by using a snapshot.
API
Set the DetectionStrategy=Standard parameter by calling the CreateImage operation. You can run this operation on OpenAPI Explorer, which saves you the trouble of calculating signatures and automatically generates SDK code examples.
During image import
Console
When you import a custom image in the ECS console, an image check runs by default. No changes are needed. For more information, see Import a custom image.
API
Set the DetectionStrategy=Standard parameter in the ImportImage operation. You can run this operation in OpenAPI Explorer, which saves you the trouble of calculating signatures and automatically generates SDK code examples.
Image check results
Console
-
On the Custom Images page, find the image you created. An image check task runs automatically after the image status changes to Available.
-
Hover over the check result and click View Details to view the detailed image check results. After the image check is complete, the Check Result column displays the check status. Hover over the check result to view the number of Critical, Suggested, and Passed items, and click View Details to view the complete check report.
-
If any items require fixes, follow the recommendations.
-
(For Linux images only) Click Fix and use the ACS-ECS-RepairImage public template in CloudOps Orchestration Service (OOS) to fix the issues.
-
Alternatively, fix the issues manually based on the recommendations in the image details. For details on the image check items and recommended fixes, see Image check items and repair suggestions.
The image check results page categorizes items into three types: items with no risks found, critical fixes, and recommended optimizations. Each category lists the specific check items and provides links for fixes or optimizations.
-
API
Call the DescribeImages operation and use the image ID to query the results. You can run this operation in OpenAPI Explorer. This tool simplifies the process by handling signature calculations and automatically generating SDK code examples.
In the response, DetectionOptions contains the detection results, Status indicates the task status, and Item contains the result for each check item.
Image checks and fixes
Linux
|
Check item |
Description |
Recommended fix |
|
GUESTOS.Platform |
The system platform. Must be a Linux operating system. |
Not applicable |
|
GUESTOS.OSVersion |
The operating system version. |
Not applicable |
|
GUESTOS.Architecture |
The system architecture. |
Not applicable |
|
GUESTOS.RtcTimeMode |
Specifies the time zone of the image's hardware clock (RTC). Valid values are UTC or local. We recommend setting the hardware clock to UTC. |
To set the hardware clock to UTC, see Linux time and time zones. |
|
GUESTOS.BootMode |
The boot mode of the image. Valid values are LEGACY or UEFI. |
Not applicable |
|
GUESTOS.KernelVersion |
The kernel version. |
Not applicable |
|
GUESTOS.Virtio |
Checks if the virtio driver is installed. ECS instances require this driver for virtualization and may fail to start without it. |
To install the virtio driver for an image, see Install virtio driver. |
|
GUESTOS.Nvme |
Checks if the NVMe driver is installed. Certain ECS instance families, such as ecs.g7se, use NVMe-attached cloud disks and require this driver in the image. |
To install the NVMe driver for an image, see How do I install the NVMe driver for an existing custom image?. |
|
GUESTOS.Fstab |
Checks the |
To correctly configure |
|
GUESTOS.Grub |
Checks the GRUB bootloader configuration. Incorrect settings, such as invalid device paths or UUIDs, can cause system startup failures. |
None |
|
GUESTOS.Dhcp |
Checks if the network is configured for DHCP. Using a static IP address in the image can cause network failures when the instance starts. |
To set the network configuration mode of the image to DHCP, see Configure DHCP for a Linux instance. |
|
GUESTOS.Selinux |
Checks if SELinux is disabled. We recommend disabling SELinux in cloud images to prevent potential startup failures. |
To disable SELinux, see Enable or disable SELinux. |
|
GUESTOS.OnlineResizeFS |
Checks if the image supports automatic resizing of the root partition. If the image has cloud-init, the |
To configure the image to support automatic resizing, see Install cloud-init. |
|
GUESTOS.SystemImage |
Checks if the image is a valid system disk image. Do not import invalid images, such as ISO images or empty images. |
Not applicable |
|
GUESTOS.CloudAssistant |
Checks if Cloud Assistant is installed. Cloud Assistant is a native automation and management tool for ECS that allows you to run batch operations, execute commands (such as Shell, PowerShell, and Bat commands), and transfer files on ECS instances without passwords, logins, or bastion hosts. Installing Cloud Assistant is recommended for efficient instance management. |
To install Cloud Assistant, see Install the Cloud Assistant Agent. |
|
GUESTOS.CloudInit |
Checks if cloud-init is installed in the image. cloud-init is the industry standard for cloud instance initialization, handling setup tasks such as configuring hostnames, SSH key pairs, and root partition resizing. |
To install cloud-init for an image, see Install cloud-init. |
|
GUESTOS.SecurityCenterAgent |
Checks if the Security Center agent is installed in the image. Security Center is a unified security management system that provides real-time threat detection and protection. Its features include security posture overview, anti-ransomware, anti-virus, anti-tampering, and compliance checks to comprehensively detect and protect your servers and web applications. |
To install the Security Center agent for an image, see Install the client. |
|
GUESTOS.SupportMocInstanceTypes |
Checks if the image supports ECS Bare Metal Instance families. The latest ECS instance families, such as ecs.g6 and ecs.g7, are often based on the ECS Bare Metal Instance architecture. An instance may fail to start on these families if the image's OS and kernel version are outdated. For more information about instance families, see Instance family. |
|
Windows
|
Check item |
Description |
Recommended fix |
|
GUESTOS.Platform |
The system platform. Must be a Windows operating system. |
Not applicable |
|
GUESTOS.OSVersion |
The operating system version. |
Not applicable |
|
GUESTOS.Architecture |
The system architecture. |
Not applicable |
|
GUESTOS.KernelVersion |
The kernel version. |
Not applicable |
|
GUESTOS.Virtio |
Checks if the virtio driver is installed. ECS instances require this driver to function correctly and may fail to start without it. |
To install the virtio driver for an image, see Install virtio driver. |
|
GUESTOS.BCD |
Checks whether the Boot Configuration Data (BCD) file in the image is valid. A missing or corrupted BCD file can cause instance startup failures. |
Use the correct BCD file. |
|
GUESTOS.Registry |
Checks if the registry files in the image are valid. Missing or corrupted registry files can cause instance startup failures. |
Use the correct registry files. |
|
GUESTOS.Hotfix |
Checks for correct patch installation. Missing required patches or installing known problematic patches can cause instance startup failures. |
|
|
GUESTOS.Disk |
Checks if the disk settings are correct. Residual driver entries in the registry can cause instance startup failures. |
|
|
GUESTOS.Sysprep |
Checks for successful Sysprep completion during image creation. An interrupted Sysprep process, such as from a forced shutdown, can cause the resulting instance to fail at startup. |
Create the image again. Make sure that the Sysprep process is not interrupted. For more information, see Create a virtual machine and install an operating system. |
|
GUESTOS.Update |
Checks if the Update process was completed during image creation. If the Update process was interrupted, for example, by a forced shutdown, the instance may fail to start. |
Create the image again. Make sure that the system update process is not interrupted. For more information, see Create a virtual machine and install an operating system. |
|
GUESTOS.Xen |
Checks for residual Xen drivers, which can cause system startup failures. |
|
|
GUESTOS.CloudAssistant |
Checks if Cloud Assistant is installed. Cloud Assistant is a native automation and management tool for ECS that allows you to run batch operations, execute commands (such as Shell, PowerShell, and Bat commands), and transfer files on ECS instances without passwords, logins, or bastion hosts. Installing Cloud Assistant is recommended for efficient instance management. |
To install Cloud Assistant, see Install the Cloud Assistant Agent. |
|
GUESTOS.Server |
Checks if the service configurations in the image are correct. If driver installation is disabled, the instance will fail to update drivers. |
|
|
GUESTOS.DesktopConfig |
Checks if the desktop configuration file (desktop.ini) is missing. If it is missing, desktop settings will not be applied. |
Configure the correct desktop.ini file. |
|
GUESTOS.BootMgr |
Checks if the system boot manager (BootMgr) is missing. A missing BootMgr prevents the system from booting. |
Configure the correct BootMgr. |
Clear residual drivers
Disable the Xen driver
Allow driver installation
Next steps
After you check and repair a custom image, you can use it to create an ECS instance. For more information, see Create an instance from a custom image or a shared image.