The image check feature checks whether a custom image is valid and can be used to create fully functional ECS instances. You can use this feature when you create or import an image. After the check is complete, you can view the results in the ECS console and improve the image quality based on the repair suggestions. This helps ensure that your ECS instances run in a stable and efficient manner.
An image check is triggered after you create or import an image. The process is not affected if the check fails.
The image check feature 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.
Limits
The image check feature is available only if the snapshots used to create the custom image do not include encrypted snapshots, or if the source instance does not use encrypted disks.
The image check feature does not support certain Linux and Windows operating systems. For more information, see the following tables.
Configure the image check feature
Configure the image check feature during image creation
Use the console
When you create a custom image in the ECS console, the image check feature is enabled by default. You can keep the default setting. For more information, see Create a custom image from an instance and Create a custom image from a snapshot.
Use an API
You can call the CreateImage operation and set the DetectionStrategy=Standard
parameter. You can also call this operation in OpenAPI Explorer, which eliminates the need to calculate signatures and automatically generates SDK example code.
Configure the image check feature during image import
Use the console
When you import a custom image in the console, the image check feature is enabled by default. You can keep the default setting. For more information, see Import a custom image.
Use an API
You can call the ImportImage operation and set the DetectionStrategy=Standard
parameter. In OpenAPI Explorer, you can call this operation to avoid calculating signatures and automatically generate SDK code samples.
View image check results
Use the console
On the Custom Images page, find the image. When its status changes to Available, an image check task automatically runs.
Hover over Checked and click View Details to view the detailed results of the image check.
(Conditionally required) If any items require repair, repair them as prompted.
(For Linux only) You can click One-click Repair to repair the items using the ACS-ECS-RepairImage public template from CloudOps Orchestration Service (OOS).
You can also manually repair the image based on the suggestions provided in the image details. For more information about the image check items and repair suggestions, see Image check items and repair suggestions.
Use an API
You can call the DescribeImages operation to query the checked image by its image ID. You can call this operation in OpenAPI Explorer to avoid calculating signatures and to automatically generate SDK code samples.
In the return value, DetectionOptions
indicates the check results, Status
indicates the status of the check task, and Item
indicates the result for each check item.
Image check items and repair suggestions
Linux operating systems
Check item | Description | Repair suggestion |
GUESTOS.Platform | The system platform. This must be a Linux operating system. | None. |
GUESTOS.OSVersion | The system version. | None. |
GUESTOS.Architecture | The system architecture. | None. |
GUESTOS.RtcTimeMode | The time zone of the hardware clock (Real-Time Clock (RTC)) for the image. The value can be UTC or local. We recommend that you set the time zone to UTC. | For information about how to set the time standard of the hardware clock to UTC, see Linux time and time zones. |
GUESTOS.BootMode | The boot mode of the image. The value can be LEGACY or UEFI. | None. |
GUESTOS.KernelVersion | The kernel version. | None. |
GUESTOS.Virtio | Checks whether the virtio driver is installed in the image. ECS instances require virtualization device drivers to run. If this driver is not installed, instance startup may fail. | For information about how to install the virtio driver for an image, see Install the virtio driver. |
GUESTOS.Nvme | Checks whether the NVMe driver is installed in the image. Some ECS instance families, such as ecs.g7se, use disks that are attached based on the NVMe protocol. The NVMe driver must be installed in the image. | For information about how to install the NVMe driver for an image, see How do I install an NVMe drive for an existing custom image?. |
GUESTOS.Fstab | Checks the `/etc/fstab` file in the image, which contains mount information for system disk devices. Incorrect configurations, such as non-existent mount devices or incorrect device UUIDs, can cause system startup to fail. | For information about how to correctly configure /etc/fstab, see Configure UUIDs in the fstab file to automatically mount a data disk. |
GUESTOS.Grub | Checks whether the GRUB boot file in the image is valid. Issues such as incorrect device configurations, non-existent devices, or incorrect UUIDs can cause system startup to fail. | None |
GUESTOS.Dhcp | Checks whether the network configuration file in the image is set to use DHCP. If the image is configured with a static IP address, network configuration issues will occur after the instance starts. | For information about how to set the network configuration mode of an image to DHCP, see How to configure the network as DHCP in a Linux image. |
GUESTOS.Selinux | Checks whether SELinux is disabled for the image. We recommend that you disable SELinux for cloud images. Otherwise, system startup may fail. | For information about how to disable SELinux, see Enable or disable SELinux. |
GUESTOS.OnlineResizeFS | Checks whether the image supports automatic resizing of the root partition. If commands such as `cloud-init` and `growpart` are installed in the image, the root partition is automatically resized after an instance is created from the image. For example, if your image size is 20 GB and you create an instance with a 100 GB system disk, the root partition is automatically resized to 100 GB after the instance is created. | For information about how to configure an image to support automatic resizing, see Install cloud-init. |
GUESTOS.SystemImage | Checks whether the image is a valid system disk image. Do not import invalid images, such as ISO images or empty images. | None. |
GUESTOS.CloudAssistant | Checks whether Cloud Assistant is installed in the image. Cloud Assistant is a native automated O&M tool for ECS. You can use Cloud Assistant to perform batch operations, run commands (such as Shell, PowerShell, and Bat commands), and send files to ECS instances without requiring passwords, logons, or jump servers. We recommend that you install Cloud Assistant in your image to efficiently perform O&M on your ECS instances. | For information about how to install Cloud Assistant, see Install Cloud Assistant Agent. |
GUESTOS.CloudInit | Checks whether cloud-init is installed in the image. cloud-init is a standard initialization service for cloud servers. It configures instance hostnames, keys, and root partition resizing. | For information about how to install cloud-init for an image, see Install cloud-init. |
GUESTOS.SecurityCenterAgent | Checks whether the Security Center Agent is installed in the image. Security Center is a unified security management system that detects, analyzes, and provides early warnings for security threats in real time. It provides security capabilities such as security overview, anti-ransomware, anti-virus, tamper-proofing, and compliance checks to comprehensively detect 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 | Checks whether the image supports Alibaba Cloud ECS Bare Metal Instance types. The latest ECS instances from Alibaba Cloud are often Bare Metal Instances, such as ecs.g6 and ecs.g7. If the system and kernel versions of the image are too old, errors may occur when you start instances of these types. For more information about instance families, see Instance families. |
|
Windows operating systems
Check item | Description | Repair suggestion |
GUESTOS.Platform | The system platform. This must be a Windows operating system. | None. |
GUESTOS.OSVersion | The system version. | None. |
GUESTOS.Architecture | The system architecture. | None. |
GUESTOS.KernelVersion | The kernel version. | None. |
GUESTOS.Virtio | Checks whether the virtio driver is installed in the image. ECS instances require virtualization device drivers to run. If this driver is not installed, instance startup may fail. | For information about how to install the virtio driver for an image, see Install the virtio driver. |
GUESTOS.BCD | Checks whether the Boot Configuration Data (BCD) file in the image is correct. A missing or corrupted BCD file can prevent an instance from starting. | Use a correct BCD file. |
GUESTOS.Registry | Checks whether the registry file in the image is correct. A missing or corrupted registry file can prevent an instance from starting. | Use a correct registry file. |
GUESTOS.Hotfix | Checks whether the patches in the image are correct. Missing required patches or installing problematic patches can prevent an instance from starting. |
|
GUESTOS.Disk | Checks whether the disk settings in the image are correct. If residual driver entries exist on the disk, the instance may fail to start. | |
GUESTOS.Sysprep | Checks whether the Sysprep process was completed when the image was created. If the Sysprep process was aborted, for example by a forced system shutdown, the instance may fail to start. | Create the image again. Make sure that you do not interrupt the Sysprep process of the system. For more information, see Create a virtual machine and install an operating system. |
GUESTOS.Update | Checks whether the Windows Update process was completed when the image was created. If the update process was aborted, for example by a forced system shutdown, the instance may fail to start. | Create the image again. Make sure that you do not interrupt the update process of the system. For more information, see Create a virtual machine and install an operating system. |
GUESTOS.Xen | Checks for residual Xen drivers, which can prevent the system from starting. | |
GUESTOS.CloudAssistant | Checks whether Cloud Assistant is installed in the image. Cloud Assistant is a native automated O&M tool for ECS. You can use Cloud Assistant to perform batch operations, run commands (such as Shell, PowerShell, and Bat commands), and send files to ECS instances without requiring passwords, logons, or jump servers. We recommend that you install Cloud Assistant in your image to efficiently perform O&M on your ECS instances. | For information about how to install Cloud Assistant, see Install Cloud Assistant Agent. |
GUESTOS.Server | Checks whether the service configurations in the image are correct. If driver installation is disabled, the instance cannot update its drivers. | |
GUESTOS.DesktopConfig | Checks whether the desktop configuration file (desktop.ini) is missing. If this file is missing, the desktop configuration is invalid. | Configure a correct desktop.ini file. |
GUESTOS.BootMgr | Checks whether the system boot manager (BootMgr) file is missing. If this file is missing, the system cannot start. | Configure a correct BootMgr. |
Clear residual drivers from the registry
Configure the Xen driver to not take effect
Configure drivers to be installable
What to do next
You can use the custom image that has passed the image check and been repaired to create fully functional ECS instances. For more information, see Create an instance from a custom image.