RSS 피드 구독하기

I was involved in a demo of Red Hat Enterprise Linux (RHEL) for Edge, and I experienced some problems with the network driver for Raspberry Pi 4 in RHEL 8. To solve this problem, I decided to create a custom image based on RHEL 9 instead, where the Ethernet network driver works.

(Note: At the time of this writing, there is no RHEL support for Raspberry Pi. RHEL for ARM is available only for larger 64-bit ARMv8 platforms. However, this is based on a demo, and if you need a supported Linux system, try Fedora on Raspberry Pi. Fedora 29 and later versions support the Raspberry Pi Model 2B and 3 series of devices, including the 3B, 3B+, 3A+, 3CM, and 3CM+.) 

There was no RHEL 9 Amazon Machine Image (AMI) in the AWS marketplace when I was working on these problems. AMIs are standard prepackaged images required to launch instances on AWS. Even if there is a RHEL 9 AMI by the time you're reading this article, it's worth understanding how to build a custom image.

Key technologies

There are three key technologies involved in this process:

  • Qcow2 is the most common (and the native) format of disk images used by QEMU. The AWS import-image tool cannot import qcow2 images directly (at the time of writing).
  • AWS CLI, the AWS command-line interface, is a unified tool to manage AWS services. It enables you to control multiple AWS services from the command line and automate them through scripts.
  • Red Hat Enterprise Linux for ARM 64 is designed to meet the needs of the hybrid cloud environment. It can be deployed on physical infrastructure, as a guest operating system on supported hypervisors, in public cloud environments, and in containers using the RHEL Unified Base Image (UBI).

I used RHEL 8 as my workstation and the RHEL 9.0 KVM Guest Image to create my custom image. If you do not have an active Red Hat Customer Portal account but you are interested in following this tutorial, you can use the no-cost RHEL for developers subscription. Here, you can download the ISO, boot or full (for offline or disconnected environments) version, and convert it to qcow2 thanks to qemu-img convert.

I'll assume you're familiar with routine AWS and Linux tasks, such as assigning the correct permissions to the AWS Simple Storage Service (S3) bucket, installing tools such as AWS CLI, and so on. If you're new to AWS and Linux, you can follow the steps in my Git repository.

[ Learn how to modernize your IT with managed cloud services. ]

Convert qcow2 to RAW

Use the qemu-img to convert the qcow2 image into the RAW format:

$ qemu-img convert rhel-baseos-9.0-beta-5-aarch64-kvm.qcow rhel-baseos-9.0-beta-5-aarch64-kvm.raw

Create an S3 bucket

Create the S3 bucket, copy the RAW image into it, and import the image:

$ aws s3api create-bucket \
--bucket my-rhel9-img \
--region eu-west-1 \
--create-bucket-configuration LocationConstraint=eu-west-1

$ aws s3 cp rhel-baseos-9.0-beta-5-aarch64-kvm.raw s3://my-rhel9-img

$ aws ec2 import-snapshot \
--description "Red Hat Enterprise Linux 9.0 Beta Update 5 KVM Guest Image" \
--disk-container "file://container.json"

[ Try Red Hat's interactive scenarios to learn Red Hat OpenShift at your own pace. ]

Register the image

Finally, register your image with AWS:

$ aws ec2 register-image \
--name RHEL9-baseos-arm64 --architecture arm64 \
--virtualization-type hvm --ena-support \
--root-device-name /dev/xvda \
--block-device-mappings DeviceName=/dev/xvda,Ebs={SnapshotId=snap-0d3e61728b16d7f48}

Run your image

Using the aws ec2 run-instances command, you can run EC2 instances of your custom golden image.

In my next article, I'll explain how to build MicroShift into your custom image. MicroShift is an exploratory project from Red Hat's edge computing team. It tailors Red Hat OpenShift for field-deployed devices, providing a consistent development and management experience across all footprints.

[ You might also be interested in reading How MicroShift and Kubernetes help manage edge devices at scale. ]


저자 소개

UI_Icon-Red_Hat-Close-A-Black-RGB

채널별 검색

automation icon

오토메이션

기술, 팀, 인프라를 위한 IT 자동화 최신 동향

AI icon

인공지능

고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트

open hybrid cloud icon

오픈 하이브리드 클라우드

하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요

security icon

보안

환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보

edge icon

엣지 컴퓨팅

엣지에서의 운영을 단순화하는 플랫폼 업데이트

Infrastructure icon

인프라

세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보

application development icon

애플리케이션

복잡한 애플리케이션에 대한 솔루션 더 보기

Virtualization icon

가상화

온프레미스와 클라우드 환경에서 워크로드를 유연하게 운영하기 위한 엔터프라이즈 가상화의 미래