To improve image the importing efficiency and availability of imported images, we recommend that you read the following instructions before you import an image. Make sure that the following operating types of images meet the specified requirements.

Windows Server images

Item Description
System-related item
  • Verify the integrity of file systems.
  • Do not modify critical system files.
  • Make sure that the system disk has sufficient free space.
  • Configure the system disk size based on the virtual disk size rather than the image size. The system disk size ranges from 40 GiB to 500 GiB.
  • Disable the firewall.
  • Allow traffic on Remote Desktop Protocol (RDP) port 3389.
  • Make sure that the logon password for the administrator account meets the password complexity requirements. The password must be 8 to 30 characters in length and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ( ) ` ~ ! @ # $ % ^ & * - _ + = | { } [ ] : ; ' < > , . ? /. The password cannot start with a forward slash (/).
  • If an operating system uses the Unified Extensible Firmware Interface (UEFI) mode, the system disk can have only the boot partision (drive C). If the system disk has other partitions, the instance cannot be started or the disk cannot be resized.
Items not supported
  • ISO images. Before you import ISO images to Elastic Compute Service (ECS), you must use tools such as VirtualBox to convert the images to the RAW, VHD, or QCOW2 format on your computer.
  • Installation of the QEMU guest agent (GA) in images. If the QEMU GA is installed, some services that ECS requires may be unavailable.
  • Installation of Community Edition virtio drivers in Windows Server operating systems. If Community Edition virtio drivers are installed, remove the read-only property of the following files:
    • C:\Windows\System32\drivers\netkvm.sys
    • C:\Windows\System32\drivers\balloon.sys
    • C:\Windows\System32\drivers\vioser.sys
    • C:\Windows\System32\drivers\viostor.sys
    • C:\Windows\System32\drivers\pvpanic.sys
Items supported
  • Multi-partition system disks.
  • Master boot record (MBR) and GUID Partition Table (GPT) partitions as well as New Technology File System (NTFS) file systems.
  • Images in the RAW, QCOW2, or VHD format. If the image that you want to import is not in one of the preceding formats, you must convert the image to a supported format before you can import the image. For more information, see Convert the image file format.
  • Images that run the following operating system versions:
    • Microsoft Windows Server 2022
    • Microsoft Windows Server 2019
    • Microsoft Windows Server 2016
    • Microsoft Windows Server 2012 R2
    • Microsoft Windows Server 2012
    • Microsoft Windows Server 2008 R2
    • Microsoft Windows Server 2008
    • Windows Server 2003 Service Pack 1 (SP1) or later

Linux images

Item Description
System-related item
  • Verify the integrity of file systems.
  • Do not modify critical system files such as /sbin, /bin, and /lib*.
    • Do not modify /etc/issue*. Otherwise, the distribution of the operating system cannot be identified by ECS and the instance operating system cannot be created.
    • Do not modify /boot/grub/menu.lst. Otherwise, the ECS instance cannot be started.
    • Do not modify /etc/fstab. Otherwise, abnormal partitions cannot be loaded and the ECS instance cannot be started.
    • Do not set /etc/shadow to read-only. Otherwise, the password file cannot be modified and the instance operating system cannot be created.
    • Do not modify /etc/selinux/config to enable SELinux. Otherwise, the instance operating system cannot be started. If you must enable SELinux, see Enable or disable SELinux.
  • Make sure that the system disk has sufficient free space.
  • Disable the firewall.
  • Allow traffic on SSH port 22.
  • Enable Dynamic Host Configuration Protocol (DHCP).
  • Install Xen or KVM virtualization drivers. For more information, see Install the virtio driver.
  • Install cloud-init to configure the hostname, NTP repositories, and YUM repositories. For more information, see Install cloud-init.
  • Make sure that the logon password for the root account meets the password complexity requirements. The password must be 8 to 30 characters in length and must contain three of the following character types: lowercase letters, uppercase letters, digits, and special characters. Special characters include ( ) ` ~ ! @ # $ % ^ & * - _ + = | { } [ ] : ; ' < > , . ? /.
  • If an operating system uses the UEFI mode, the system disk can have only the root partition. If the system disk has other partitions, the instance cannot be started or the disk cannot be resized.
Items not supported
  • ISO images. Before you import ISO images to Elastic Compute Service (ECS), you must use tools such as VirtualBox to convert the images to the RAW, VHD, or QCOW2 format on your computer.
  • Multiple network interfaces.
  • IPv6 addresses.
  • Adjustment of system disk partitions. Only disks with a single root partition are supported.
  • Installation of the QEMU GA in images. If the QEMU GA is installed, some services that ECS requires may be unavailable.
  • Creation of system disk partitions (the root partitions) across disks by using Logical Volume Manager (LVM), which makes ECS instances unable to start.
Operation
  • Images in the RAW, QCOW2, or VHD format. If the image that you want to import is not in one of the preceding formats, you must convert the image to a supported format before you can import the image. For more information, see Convert the image file format.
  • MBR and GPT partitions as well as XFS, ext3, and ext4 file systems.
  • However, the ext4 file system cannot contain the 64bit feature, and the project and quota features cannot be used together. You can run the following command to view the list of features contained in an ext4 file system:
    tune2fs -l <ext4 file system disk directory>  grep features
  • Images that run the following operating system versions:
    • Alibaba Cloud Linux
    • Anolis
    • CentOS 5/6/7/8
    • CentOS Stream
    • Debian 6/7/8/9/10
    • FreeBSD
    • OpenSUSE 13/42/15
    • RedHat
    • Red Hat Enterprise Linux (RHEL)
    • SUSE Linux 10/11/12/15
    • Ubuntu 10/12/13/14/16/18/20
    • CoreOS 681.2.0+
    • AlmaLinux
    • Rocky Linux

Note:

If the image that you want to import uses the ARM64 architecture or if the image contains the CentOS Stream, Anolis, AlmaLinux, or Rocky Linux operating system, take note of the following items:
  • To ensure that the password can be set or the key pair can be modified for an imported image, the image must meet the following requirements:
    • The kernel of the operating system must support the CONFIG_FW_CFG_SYSFS feature. By default, the Linux community kernel 4.6 and later and CentOS kernel 3.10.0-826.el7 and later support this feature. You can run the grep -nr CONFIG_FW_CFG_SYSFS /boot/config-$(uname -r) command in the server corresponding to the image. If the command output contains CONFIG_FW_CFG_SYSFS=y, the kernel of this image supports the CONFIG_FW_CFG_SYSFS feature.
    • The operating system is installed with the latest version of Alibaba Cloud cloud-init. If the version of cloud-init is 19.1, the minor version must be 19.1.3 or later. If the version of cloud-init is 0.7.6a in some early versions of operating systems, the minor version must be 0.7.6a15 or later. For more information, see Install cloud-init.
    • The operating system must support the SHA-512 encryption algorithm.
  • To ensure that the imported image supports resizing of disks and file systems, the image must meet the following requirements:
    • The kernel version of the operating system must be later than 3.6.
    • The image must support the growpart command. To support this command, you must install the cloud-utils-growpart package. The methods of installing the package vary based on the operating systems. For more information, see Resize partitions and file systems of Linux system disks.
    • The image must support the resize2fs command. To support this command, you must install the e2fsprogs package. By default, the package is installed on the operating system. If the package is not installed in the operating system, you must manually install it. For example, if you want to install the e2fsprogs package on a CentOS 7 operating system, run the yum install -y e2fsprogs command.
    • The operating system is installed with the latest version of Alibaba Cloud cloud-init. If the version of cloud-init is 19.1, the minor version must be 19.1.3 or later. If the version of cloud-init is 0.7.6a in some early versions of operating systems, the minor version must be 0.7.6a15 or later. For more information, see Install cloud-init.

Non-standard Linux images

Linux images that are not listed as ECS public images are considered as non-standard platform images. Such images are developed on a standard operating system platform, but their critical system configuration files, basic system environments, or applications do not comply with the standard operating system requirements of ECS. If you want to use a non-standard platform image, you must complete required configurations within the operating system contained in the image before and after the image is imported. The following section describes the non-standard platform image types that can be imported and how to configure these images:

  • Others Linux: ECS identifies all images of this type as other Linux images. If you import an Others Linux image and then use it to create instances, ECS does not process the created instances. If DHCP is disabled in the Others Linux image, you must connect to the instances by using the remote connection feature in the ECS console and then manually configure IP addresses, routes, and passwords for the instances. If DHCP is enabled in the Others Linux image, networks are automatically configured for the instances when you log on to the instances.
  • Customized Linux: Before a customized Linux image is imported, you can create instances from this image and configure networks and passwords for the instances in the same way as you do with instances created from standard ECS images. For more information, see Customize Linux images.