All Products
Search
Document Center

Elastic Compute Service:Overview

Last Updated:Mar 27, 2024

This topic describes how to import Red Hat Enterprise Linux (RHEL) virtual machine (VM) images to Alibaba Cloud and use the 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 and later, and 8.0 and later.

Background information

The Red Hat Cloud Access procedure is applicable only to the following scenarios:

  • You import custom images to Alibaba Cloud ECS and set the License Type parameter to BYOL. For more information, see Import custom images.

  • You use Server Migration Center (SMC) to migrate images and set the License Type parameter to BYOL for all migration jobs. For more information, see Create a server migration job.

Requirements for ECS instances and RHEL custom images

When you import RHEL images to Alibaba Cloud ECS, take note of the following items:

  • 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 to allow you to 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 or later, or 8.0 or later, 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. If the file is modified, the distribution of the guest operating system cannot be identified as expected, and you may fail to create ECS instances.

  • The GRand Unified Bootloader (GRUB) configuration file is correctly configured. If the configuration file is incorrectly configured, the system may fail to start.

  • The /etc/fstab file is correctly configured. If the file is incorrectly configured, 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. If the default permissions on the file is not used, 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, such as /sbin, /bin, and /lib*, are correctly configured.

For more information about the requirements for ECS instances and RHEL custom images, see Instructions for importing images.

Prerequisites

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

  • You have a Red Hat account and an Alibaba Cloud account.

    • If you do not have an Alibaba Cloud account, create an Alibaba Cloud account. For more information, see Sign up with Alibaba Cloud.

      Note

      If you want to create an ECS instance that resides in a region in the Chinese mainland, sign up with Alibaba Cloud by using your real name.

    • If you do not have a Red Hat account, create an account in the Red Hat Customer Portal.

  • You have a physical RHEL 7 server as an offline environment to tailor the downloaded virtual image to the image requirements of Alibaba Cloud. For more information, see Step 2: Create a RHEL image.

Procedure

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

image

Steps

  1. Step 1: Enroll in the Red Hat Cloud Access program

  2. Step 2: Create a RHEL image

  3. Step 3: (Optional) Convert the format of an image

  4. Step 4: Import the image to Alibaba Cloud ECS

  5. Step 5: Create an ECS instance from the RHEL image