All Products
Search
Document Center

Elastic Compute Service:Overview

Last Updated:Nov 02, 2023

The image check feature checks whether an image is valid and whether the image can be used to create full-featured Elastic Compute Service (ECS) instances. You can use the image check feature when you create or import an image. After the image is checked, you can view the check results in the ECS console and fix the identified issues based on the recommended solutions that are provided in the check results.

Note
  • An image check is performed when an image is built, and does not affect the image creation process or image import process even if the image check fails.

  • The image check feature is provided free of charge.

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

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 of 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 of 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 for the identified issues and required tools to help you improve image quality.

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

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

Configure image check

Configure image check when you create an image

Use the ECS console

By default, image check is selected when you create a custom image in the ECS console. Do not modify 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 DetectionStrategy to Standard to call the CreateImage operation. 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 ECS console

By default, image check is selected when you import a custom image in the ECS console. Do not modify this setting. For more information, see Import a custom image.

Call an API operation

Set DetectionStrategy to Standard to call the ImportImage operation. 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 ECS console

  1. Find a new custom image that you created on the Custom Images tab in the ECS console. When the image enters the Available state, an image check task is performed. Wait for the image check task to be completed.

  2. Click Details in the Status column to view the image check results and use the recommended solutions to resolve the identified issues. For information about image check items and recommended solutions, see the Image check items of this topic.

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 task, 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 the identified issues.

Check item

Description

Recommended solution

GUESTOS.Platform

The Linux operating system.

None.

GUESTOS.OSVersion

The operating system version.

None.

GUESTOS.Architecture

The system architecture.

None.

GUESTOS.RtcTimeMode

The time standard of the real-time clock (RTC) that 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 that 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 no virtio driver is installed in an image, startup exceptions may occur on the instances that use the image.

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

GUESTOS.Nvme

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

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

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 How to Configure File Disk Identification Mode to UUID in fstab File.

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.

For information about how to correctly configure the GRUB file in an image, see How to Modify the File Disk Identifier to UUID in a Linux Image Grub File.

GUESTOS.Dhcp

Whether Dynamic Host Configuration Protocol (DHCP) is configured in the network configuration file of the image to assign dynamic IP addresses to instances. If a static IP address is configured in the image, network configuration exceptions may occur after the 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 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. When an 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 instance, the root partition is automatically extended 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 the 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 or send files to ECS instances in a password-free manner without the need to log on or use jump servers. The scripts can be Shell, PowerShell, or batch scripts. We recommend that you install the Cloud Assistant Agent in the image to perform efficient O&M on ECS.

For information about how to install the Cloud Assistant Agent, see Install the 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 the tool to configure hostnames and keys for instances, and configure root partitions to be automatically extended.

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. 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, see Install the Security Center agent.

GUESTOS.SupportMocInstanceTypes

Check whether the image supports 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 are earlier than expected, exceptions may occur on the related instances. For information about instance types, see Overview of instance families.

  • If your 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 deprecated versions that have reached their end of life (EOL) and are no longer maintained. We recommend that you upgrade the operating systems at your earliest opportunity and use operating systems that are maintained and updated by distributors.

Check items for Windows images

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

Check item

Description

Recommended solution

GUESTOS.Platform

The Windows operating system.

None.

GUESTOS.OSVersion

The operating system version.

None.

GUESTOS.Architecture

The system architecture.

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 no virtio driver is installed in an image, startup exceptions may occur on the instances that use the image.

For information about how to install the virtio driver in 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, the 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 instance 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, the instance 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 operating systems, the KB3033929 patch is required.

GUESTOS.Disk

Whether the disk configurations in the image are correct. If a residual driver is retained on a disk, the 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, 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 is retained on a disk, the system may be unable to restart.

Disable the Xen driver.

GUESTOS.CloudAssistant

Whether the 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 or send files to ECS instances in a password-free manner without the need to log on or use jump servers. The scripts can be Shell, PowerShell, or batch scripts. We recommend that you install the Cloud Assistant Agent in the image to perform efficient O&M on ECS.

For information about how to install the Cloud Assistant Agent, see Install the Cloud Assistant Agent.

GUESTOS.Server

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

Configure the driver to enable installation.

GUESTOS.DesktopConfig

Whether the desktop configuration file (desktop.ini) is missing. If the desktop.ini file is missing, the desktop configuration becomes invalid.

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