All Products
Document Center

How to import a Red Hat image to Alibaba Cloud

Last Updated: Dec 13, 2018

This article describes how to import a Red Hat Enterprise Linux (RHEL) virtual machine image to Alibaba Cloud, a Red Hat certified cloud and service provider, and use it to create an ECS instance in the console. This article applies to RHEL 6.9, 6.10, 7.4, and 7.5.

Limitations of custom RHEL image to run in Alibaba Cloud

The RHEL image to be imported to Alibaba Cloud must meet the following requirements:

  • Image import does not support multiple network interfaces or IPv6 addresses.

  • Confirm that the SSHD service is enabled for remote access.

  • The firewall is disabled and SSH port 22 is open. Otherwise, you cannot connect to the instance after it is created. You can create a security group to act as virtual firewall to control inbound and outbound traffic for the ECS instance after it is created.

  • Confirm that the operating system is RHEL 6.9, RHEL 6.10, RHEL 7.4, or RHEL 7.5, and the latest cloud-init and security updates are installed.

  • Confirm that one of the following file systems is used on root partition: xfs, ext3, and ext4.

  • Confirm that MBR is used.

  • Images in the RAW, qcow2, or VHD format are supported. We recommend that you import images in the qcow2 or VHD format, which has a smaller transmission capacity. To import an image in other format, use qemu-img to convert the format before importing the image.

  • The /etc/issue* file is not modified. Otherwise, the distribution of the guest operating system cannot be properly recognized and you may be unable to create an ECS instance.

  • (RHEL6) /boot/grub/menu.lst or (RHEL7) /boot/grub/grub.cfg file must be correctlly configured. Otherwise, the system may fail to start up.

  • The /etc/fstab is correct. Otherwise, an exception may occur preventing partitions from being loaded, leading to system startup failure.

  • The default permissions on /etc/shadow are used. Otherwise, the password file cannot be modified and the system startup fails.

  • Only a single root partition on the system disk exists and the system disk has a sufficient space for the image file.

  • The critical system files, such as /sbin, /bin, and /lib*, are correctly configured.


Before you begin, make sure of the following:


The following figure and steps illustrates how to import a RHEL virtual machine image and create RHEL instances from it in the ECS console.



  1. Enroll in the Red Hat Cloud Access program.
  2. Make a RHEL image.
  3. Convert image to one of the supported formats.
  4. Import image to Alibaba Cloud.
  5. Create and test RHEL instances.