All Products
Search
Document Center

Elastic Compute Service:Overview

Last Updated:Aug 01, 2024

The image check feature allows you to checks whether an image is valid and whether you can use the image to create full-featured Elastic Compute Service (ECS) instances. You can use the image check feature when you create or import an image. You can view the check results in the ECS console and resolve identified issues based on the recommended solutions that are provided in the results. The feature helps improve the image quality and ensure that ECS instances created from the image run as expected.

Note
  • An image check is performed when you create or import an image. The image check does not affect the image creation process or the image import process even if the image check fails.

  • You can use the image check feature free of charge.

  • After an image passes an image check, the acs:ecs:image:osVersion tag, which indicates the operating system version, and the acs:ecs:image:kernelVersion tag, which indicates the kernel version, are automatically added to the image.

Benefits

When you create or import an image, we recommend that you configure the image check feature. For more information, see the Configure image check section of this topic. The image check feature provides the following benefits:

  • You can view the check results about an image to obtain information about the actual configurations, such as the kernel version and partition configurations, of the operating system in the image. For information about how to view the check results about an image, see the View image check results section of this topic. For information about image check items, see the Image check items section of this topic.

  • The image check feature provides recommended solutions to identified issues to help you improve image quality.

  • The image check feature optimizes images based on image check results to reduce startup time, increase the startup success rate, and improve the system configuration stability of ECS instances.

  • Images that are derived from an image that is optimized by the image check feature inherit the capabilities of the image.

Limits

The image check feature is supported by most operating systems. Select a suitable operating system version when you use the image check feature. For information about the operating systems that do not support the image check feature, see Operating system limits for image check.

Configure the image check feature

  • Configure the image check feature when you create an image

Use the ECS console

By default, the Image Check 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

Set the DetectionStrategy request parameter to Standard to call the CreateImage operation. You can call the CreateImage 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 when you import an image

Use the ECS 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.

Call an API operation

Set the DetectionStrategy request parameter to Standard to call the ImportImage operation. You can call the ImportImage 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

  1. On the Custom Images tab of the Images page in the ECS console, find a custom image. When the image enters the Available state, an image check is performed on the image. Wait for the image check to complete. When Checked is displayed in the Check Result column, the image check is complete.

    image.png

  2. Move the pointer over Checked. In the message that appears, click View More to view the details of the check results.

  3. (Conditionally required) If you need to repair specific image check items, repair the items by performing one of the following operations:

    • For Linux images, click Repair to automatically repair the images by using the ACS-ECS-RepairImage public template provided by What is OOS?.

    • Manually repair images based on the recommended solutions provided in the image check results. For information about image check items and recommended solutions, see the Image check items section of this topic.

    image.png

Call an API operation

Call the DescribeImages operation and view image information by image ID. 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.

Note

DetectionOptions in the response indicates image check results. Status indicates the status of the image check, and Item indicates the result of each check item.

Image check items

Check items for Linux images

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 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 RTC to UTC, see Linux time and time zones.

GUESTOS.BootMode

The boot mode of the image, which can be Legacy BIOS 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 require the installation of virtual device drivers. If the virtio driver is not installed on an image, startup exceptions may occur on ECS instances that use the image.

For information about how to install the virtio driver on an image, see Install the virtio driver.

GUESTOS.Nvme

Whether the Non-Volatile Memory Express (NVMe) driver is installed on the image. If you want to use disks that are attached based on the NVMe protocol to ECS instances of specific instance types, such as ecs.g7se, make sure that the NVMe driver is installed on the images of the instances.

For information about how to install the NVMe driver on an image, see Adapt Linux custom images to NVMe-based system disks.

GUESTOS.Fstab

The mount information of file systems that is specified in the /etc/fstab file of the image. Incorrect mount information on file systems may cause system startup exceptions. Examples of incorrect mount information: 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 How to Configure File Disk Identification Mode to UUID in fstab File.

GUESTOS.Grub

Whether the GRand Unified Bootloader (GRUB) file of the image is correct. 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 in the network configuration file of an 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 do not enable SELinux for images in the cloud. If you enable SELinux for an image in the cloud, system startup exceptions may occur on ECS instances that use the image.

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 on 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 that is 20 GB in size and specify a system disk size of 100 GB to create an ECS instance, the root partition is automatically extended to 100 GB when the instance is created.

For information about how to configure automatic resizing for an image, 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. 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 on the image to perform efficient O&M on ECS instances.

For information about how to install Cloud Assistant Agent on an image, see Install Cloud Assistant Agent.

GUESTOS.CloudInit

Whether cloud-init is installed on the image. Cloud-init is the standard tool that can be used by cloud servers to initialize system configurations. You can use cloud-init to configure hostnames and keys for ECS instances, and configure automatic extension of root partitions.

For information about how to install cloud-init on an image, see Install cloud-init.

GUESTOS.SecurityCenterAgent

Whether the Security Center agent is installed on 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 on an image, see Install the Security Center agent.

GUESTOS.SupportMocInstanceTypes

Support for instance types that are based on the SHENLONG architecture.

In most cases, the instance types of the latest instances, such as ecs.g6 and ecs.g7, are based on the SHENLONG architecture. If the operating system version and kernel version of an image do not meet the requirements, exceptions may occur on ECS instances that use the image. For information about instance types, see Overview of instance families.

  • If your ECS instances run CentOS 5, we recommend that you upgrade the operating system to the latest minor release CentOS 5.11. For more information, see How do I resolve downtime issues with migrated instances?

  • In most cases, operating system versions that do not support SHENLONG based instance types are earlier versions that reached end of life (EOL) and are no longer supported. We recommend that you upgrade the operating system versions at the earliest opportunity and use operating system versions that are supported and updated by distributors.

Check items for Windows images

The following table describes the check items for Windows images and provides solutions for identified issues.

Check item

Description

Recommended solution

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 on the image. ECS instances depend on virtualized device drivers to run. If the virtio driver is not installed on an image, startup exceptions may occur on ECS instances that use the image.

For information about how to install the virtio driver on an image, see Install the virtio driver.

GUESTOS.BCD

Whether the Boot Configuration Data (BCD) file of 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 of the image is correct. If the registry file is missing or damaged, ECS instances that use the image may be unable to start.

Use the correct registry file.

GUESTOS.Hotfix

Whether the patches of 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.

  • Uninstall invalid patches. Invalid patches: KB5009624, KB5009595, KB5009546, KB5009557, KB5009555, KB5014738, KB5014702, KB5014692, and KB5014678.

  • For Microsoft Windows Server 2008 R2 64-bit, install the KB3033929 patch.

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.

Delete residual drivers from the registry.

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, ECS instances that use the image may be unable to start.

Recreate the image and do not interrupt the Sysprep process during image creation. 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, ECS instances that use the image may be unable to start.

Recreate the image and do not interrupt the Update process during image creation. 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.

Disable the Xen driver.

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 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.Server

Whether the service configurations of the image are correct. If the image is configured to prohibit drivers from being installed, ECS instances that use the image cannot update the drivers.

Allow drivers to be installed.

GUESTOS.DesktopConfig

Whether the desktop configuration file (desktop.ini) is missing. If the desktop.ini 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 may be unable to start.

Correctly configure BootMgr.

References

  • CloudOps Orchestration Service (OOS) is a free, comprehensive, and automated O&M service that allows you to create and run O&M tasks by using templates. OOS provides public templates that you can apply and use for reference. You can also use templates to create O&M tasks and define the running sequence of the tasks. For more information, see Template overview.

  • Before an independent software vendor (ISV) can release images in Alibaba Cloud Marketplace, the images must meet image requirements to be compatible with ECS instance types. For more information, see Alibaba Cloud Marketplace Linux image requirements and Alibaba Cloud Marketplace Windows image requirements.