This tutorial describes how to import Red Hat Enterprise Linux (RHEL) virtual machine images to Alibaba Cloud ECS and use the imported images to create ECS instances in the ECS console. Alibaba Cloud is a Red Hat certified cloud and service provider. This tutorial is applicable to RHEL 6.9, 6.10, 7.4, and 7.5.
The RHEL images to be imported to Alibaba Cloud ECS must meet the following requirements:
- Images can be imported over a single network interface and cannot be imported from IPv6 addresses.
- The Secure Shell Daemon (SSHD) service is activated for remote access.
- Firewalls are disabled and SSH port 22 is enabled on an instance so that you can connect to the instance. Otherwise, you will not be able to connect to the instance. Security groups can act as virtual firewalls to control inbound and outbound traffic for one or more instances.
- The operating system is RHEL 6.9, 6.10, 7.4, or 7.5, which includes the latest cloud-init and security updates.
- One of the following file systems is used on the root partition: xfs, ext3, and ext4.
- Master Boot Record (MBR) is used for partitioning.
- Images in the RAW, QCOW2, or VHD format are supported. We recommend that you import images in the QCOW2 or VHD format. These images have a smaller transmission footprint. If you want to import images in other formats, you can 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 the ECS instance may fail to be created.
- The /boot/grub/menu.lst file is correctly configured for RHEL 6, or the /boot/grub/grub.cfg file is correctly configured for RHEL 7. Otherwise, the system may fail to start.
- The /etc/fstab file is correctly configured. Otherwise, exceptions that prevent the loading of partitions may occur, which can 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 may fail to 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.
Before you begin, make sure that the following operations are complete:
- You register an account to sign up with the Red Hat Cloud Access program.
- 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.
- You have both a Red Hat Customer Portal account and an Alibaba Cloud account. If not, sign up with Alibaba Cloud, add a payment method, and create a Red Hat Customer Portal account on the official Red Hat website.
- If you want to create an ECS instance within a mainland China region, you must sign up with Alibaba Cloud by using your real name.