This topic describes how to import Red Hat Enterprise Linux (RHEL) virtual machine (VM) images to Alibaba Cloud and use the imported images to create Elastic Compute Service (ECS) instances in the ECS console. The procedure described in this topic is applicable to RHEL 6.9, 6.10, 7.4 to 7.9, and 8.0 to 8.6.

Background information

The Red Hat Cloud Access procedure is applicable only to the following scenarios:
  • When you import custom images to Alibaba Cloud ECS, select BYOL for the License Type. For more information, see Import custom images.
  • When you use Server Migration Center (SMC) to migrate images, select BYOL for License Type for all migration tasks. For more information, see Create and start a migration task.

Requirements for ECS instances and RHEL custom images

The RHEL images to be imported to Alibaba Cloud ECS must meet the following requirements:
  • Images cannot be imported over multiple network interfaces or IPv6 addresses.
  • The sshd service is enabled for remote access.
  • Firewalls are disabled and SSH port 22 is enabled so that you can connect to the instances that are created from the RHEL images.

    We recommend that you use security groups to control inbound or outbound traffic for one or more ECS instances. For more information, see Overview.

  • The operating system is RHEL 6.9, 6.10, 7.4 to 7.9, or 8.0 to 8.6, which includes the latest cloud-init version and security updates.

    For more information about RHEL versions, see Overview.

  • An xfs, ext3, or ext4 file system is used on the root partition
  • Only images in the RAW, QCOW2, or VHD format can be imported to ECS. We recommend that you import images in the QCOW2 or VHD format, which have smaller transmission footprints. If you want to import images in other formats, use the qemu-img tool to convert the images to the supported formats.
  • The /etc/issue* file is not modified. Otherwise, the distribution of the guest operating system cannot be properly identified, and you may fail to create ECS instances.
  • The GRand Unified Bootloader (GRUB) configuration file is correctly configured. Otherwise, the system may fail to start.
  • The /etc/fstab file is correctly configured. Otherwise, exceptions that prevent partitions from loading may occur, and cause the system to fail to start.
  • The default permissions on the /etc/shadow file must be used. Otherwise, the password file cannot be modified and the system cannot start.
  • A single root partition exists on the system disk and the system disk has sufficient space for the image files.
  • Critical system files are correctly configured, such as /sbin, /bin, and /lib*.
For more information about the requirements for ECS instances and RHEL custom images, see Instructions for importing images.


Before you start, make sure that the following requirements are met:

  • You have both a Red Hat account and an Alibaba Cloud account.
  • You have a physical RHEL 7 server as an offline environment to tailor the downloaded virtual image to the Alibaba Cloud image requirements. For more information, see Step 2: Create a RHEL image.
  • If you want to create an ECS instance that resides within a Chinese mainland region, you must sign up with Alibaba Cloud by using your real name.


The following figure shows how to import a RHEL VM image and create a RHEL instance from the imported image in the ECS console. Import RHEL images


  1. Step 1: Enroll in the Red Hat Cloud Access program
  2. Step 2: Create a RHEL image
  3. Step 3: (Optional) Convert the image to a supported format
  4. Step 4: Import the image to Alibaba Cloud ECS
  5. Step 5: Create an ECS instance from the RHEL image