Installing


Red Hat Enterprise Linux AI 3.2

Install Red Hat Enterprise Linux AI on bare metal or in the Cloud

Red Hat RHEL AI Documentation Team

Abstract

Install Red Hat Enterprise Linux AI on bare metal or in the Cloud for use with NVIDIA CUDA and AMD ROCm AI accelerators.

Preface

Red Hat Enterprise Linux AI is distributed as a bootc container image. The RHEL AI image is built on Red Hat Enterprise Linux (RHEL) 9.6. You deploy the Red Hat AI Inference Server 3.2.5 container image as a quadlet systemd service in RHEL AI.

Chapter 1. Installing RHEL AI on bare metal

You can deploy Red Hat Enterprise Linux AI with the RHEL AI ISO image by using any of the following installation methods:

  • RHEL GUI
  • Kickstart with embedded container image
  • Kickstart with custom container image

Prerequisites

  • You have downloaded and unzipped the x86_64 or aarch64 Red Hat Enterprise Linux AI ISO image from the RHEL AI download page.
  • You have access to a bare-metal host with compatible NVIDIA CUDA or AMD ROCm AI accelerators installed.
Important

Red Hat Enterprise Linux AI requires additional storage for the RHEL AI data.

  • The minimum recommendation for data storage in the /home directory is 1 TB.
  • During updates, the bootc command needs extra space to store temporary data.
  • The minimum storage recommendation for the root / partition is 120 GB.

Procedure

  • Optional: Install using the graphical installer

    You can use the interactive RHEL graphical installer and the RHEL AI ISO image to deploy RHEL AI on your machine. For more information about booting a RHEL ISO by using the RHEL installation program, see Interactively installing RHEL from installation media.

  • Optional: Install using Kickstart with an embedded container image. You customize the RHEL AI installation by using your own Kickstart file.

    1. Create the Kickstart file with your preferred parameters. For more information, see Creating a Kickstart file with the Kickstart configuration tool.

      Sample rhelai-bootc.ks Kickstart file with embedded container image for NVIDIA CUDA AI accelerators

      ostreecontainer --url=/run/install/repo/container --transport=oci --no-signature-verification
      
      # Switch bootc to point to Red Hat container image for upgrades
      %post
      bootc switch --mutate-in-place --transport registry registry.redhat.io/rhelai3/bootc-cuda-rhel9:3.0.0
      touch /etc/cloud/cloud-init.disabled
      %end
      
      # Customize target system network environment
      network --bootproto=dhcp --device=link --activate
      
      # Customize target system disk partitioning
      clearpart --all --initlabel --disklabel=gpt
      reqpart --add-boot
      part / --grow --fstype xfs
      
      # Optional: customize services
      firewall --disabled
      services --enabled=sshd
      
      # Optional: add a user
      user --name=cloud-user --groups=wheel --plaintext --password <YOUR_PASSWORD>
      sshkey --username cloud-user "<SSH_PUB_KEY>"
      
      # Optional: add a root user SSH public key
      rootpw --iscrypted locked
      sshkey --username root <SSH_ROOT_PUB_KEY>"
      reboot
      Copy to Clipboard Toggle word wrap

      Sample rhelai-bootc.ks Kickstart file with embedded container image for AMD ROCm AI accelerators

      ostreecontainer --url=/run/install/repo/container --transport=oci --no-signature-verification
      
      # Switch bootc to point to Red Hat container image for upgrades
      %post
      bootc switch --mutate-in-place --transport registry registry.redhat.io/rhelai3/bootc-rocm-rhel9:3.0.0
      touch /etc/cloud/cloud-init.disabled
      %end
      
      # Customize target system network environment
      network --bootproto=dhcp --device=link --activate
      
      # Customize target system disk partitioning
      clearpart --all --initlabel --disklabel=gpt
      reqpart --add-boot
      part / --grow --fstype xfs
      
      # Optional: customize services
      firewall --disabled
      services --enabled=sshd
      
      # Optional: add a user
      user --name=cloud-user --groups=wheel --plaintext --password <YOUR_PASSWORD>
      sshkey --username cloud-user "<SSH_PUB_KEY>"
      
      # Optional: add a root user SSH public key
      rootpw --iscrypted locked
      sshkey --username root <SSH_ROOT_PUB_KEY>"
      reboot
      Copy to Clipboard Toggle word wrap

      The sample Kickstart uses the embedded container image in the ISO file, signaled by the ostreecontainer command with the --url=/run/install/repo/container parameter. The bootc switch parameter points to the Red Hat registry for future updates and then you can add your own customizations.

    2. Embed the Kickstart into the RHEL AI ISO so your machine can restart and deploy RHEL AI. Use the mkksiso utility to embed the rhelai-bootc.ks Kickstart file in the boot ISO. The mkksiso utility is in the lorax rpm package.

      $ mkksiso rhelai-bootc.ks <DOWNLOADED-RHELAI-ISO> rhelai-bootc-ks.iso
      Copy to Clipboard Toggle word wrap
    3. Boot the machine using the updated ISO. After the installation is complete, the host reboots and you can login to the system using the credentials you added in the Kickstart file.

      Important

      Be aware that having a custom Kickstart in your ISO will automatically start the installation, and disk partitioning, without prompting the user. Based on the disk configuration, local storage might be completely wiped or overwritten.

  • Optional: Install using Kickstart with custom container image

    • Follow the procedure as above for embedding the container image, but instead customize the Kickstart file to include your custom container image, for example:

      Sample rhelai-bootc.ks Kickstart file with custom container image

      # Customize target system network environment
      network --bootproto=dhcp --device=link --activate
      
      # Customize target system disk partitioning
      clearpart --all --initlabel --disklabel=gpt
      reqpart --add-boot
      part / --grow --fstype xfs
      
      # Apply the custom bootc container
      ostreecontainer --url <CUSTOM_CONTAINER_IMAGE_REGISTRY_URL>
      
      # Optional: customize services
      firewall --disabled
      services --enabled=sshd
      
      # Optional: add a user
      user --name=cloud-user --groups=wheel --plaintext --password <YOUR_PASSWORD>
      sshkey --username cloud-user "<SSH_PUB_KEY>"
      
      # Optional: add a root user SSH public key
      rootpw --iscrypted locked
      sshkey --username root <SSH_ROOT_PUB_KEY>"
      reboot
      Copy to Clipboard Toggle word wrap

Chapter 2. Installing RHEL AI on AWS

There are 2 ways you can install and deploy Red Hat Enterprise Linux AI on AWS:

2.1. Converting the RHEL AI RAW image to an AMI

Before deploying RHEL AI on an AWS machine, you must set up an Amazon S3 bucket, convert the RHEL AI image to an Amazon Machine Image (AMI), and create the following resources:

  • S3 bucket with the RHEL AI image
  • AWS EC2 snapshot
  • AWS AMI
  • AWS instance

Prerequisites

Procedure

  1. Create an S3 bucket and set the permissions to allow image file conversion to AWS snapshots.

    1. Create the necessary environment variables. Open a shell prompt and run the following commands:

      $ export BUCKET=<CUSTOM_BUCKET_NAME>
      $ export RAW_AMI=nvidia-bootc.ami
      $ export AMI_NAME="rhel-ai"
      $ export DEFAULT_VOLUME_SIZE=1000
      Copy to Clipboard Toggle word wrap
    2. Create the S3 bucket by running the following command:

      $ aws s3 mb s3://$BUCKET
      Copy to Clipboard Toggle word wrap
    3. Create the trust-policy.json file with the necessary configuration for generating an S3 role for your bucket:

      $ printf '{
        "Version": "2012-10-17",
        "Statement": [
          {
            "Effect": "Allow",
            "Principal": {
              "Service": "vmie.amazonaws.com"
            },
            "Action": "sts:AssumeRole",
            "Condition": {
              "StringEquals": {
                "sts:Externalid": "vmimport"
              }
            }
          }
        ]
      }' > trust-policy.json
      Copy to Clipboard Toggle word wrap
    4. Create the S3 role for your bucket. Run the following command:

      $ aws iam create-role --role-name vmimport --assume-role-policy-document file://trust-policy.json
      Copy to Clipboard Toggle word wrap
    5. Create the role-policy.json file with the necessary configurations for generating a policy for your bucket:

      $ printf '{
        "Version": "2012-10-17",
        "Statement": [
          {
            "Effect": "Allow",
            "Action": [
              "s3:GetBucketLocation",
              "s3:GetObject",
              "s3:ListBucket"
            ],
            "Resource": [
              "arn:aws:s3:::%s",
              "arn:aws:s3:::%s/*"
            ]
          },
          {
            "Effect": "Allow",
            "Action": [
              "ec2:ModifySnapshotAttribute",
              "ec2:CopySnapshot",
              "ec2:RegisterImage",
              "ec2:Describe*"
            ],
            "Resource": "*"
          }
        ]
      }' $BUCKET $BUCKET > role-policy.json
      Copy to Clipboard Toggle word wrap
    6. Create the policy for your bucket by running the following command:

      $ aws iam put-role-policy --role-name vmimport --policy-name vmimport-$BUCKET --policy-document file://role-policy.json
      Copy to Clipboard Toggle word wrap
  2. Copy the x86_64 RAW image URL from the Download Red Hat Enterprise Linux AI page and download the image using curl:

    $ curl -Lo disk.raw.gz <RAW_IMAGE_URL>
    Copy to Clipboard Toggle word wrap
  3. Unzip the raw.gz file:

    $ gunzip disk.raw.gz
    Copy to Clipboard Toggle word wrap
  4. Upload the image to the S3 bucket with the following command:

    $ aws s3 cp disk.raw s3://$BUCKET/$RAW_AMI
    Copy to Clipboard Toggle word wrap
  5. Convert the image to a snapshot and store it in the TASK_ID variable name by running the following commands:

    $ printf '{
       "Description":"rhelai-image",
       "Format":"raw",
       "UserBucket":{
          "S3Bucket":"%s",
          "S3Key":"%s"
       }
    }' $BUCKET $RAW_AMI > containers.json
    Copy to Clipboard Toggle word wrap
    $ TASK_ID=$(aws ec2 import-snapshot --disk-container file://containers.json | jq -r .ImportTaskId)
    Copy to Clipboard Toggle word wrap
  6. Follow the progress of the disk image to snapshot conversion job with the following command:

    $ aws ec2 describe-import-snapshot-tasks --filters Name=task-state,Values=active
    Copy to Clipboard Toggle word wrap
  7. Get the snapshot ID and store it the SNAPSHOT_ID variable by running the following command:

    $ SNAPSHOT_ID=$(aws ec2 describe-import-snapshot-tasks | jq -r '.ImportSnapshotTasks[] | select(.ImportTaskId=="'${TASK_ID}'") | .SnapshotTaskDetail.SnapshotId')
    Copy to Clipboard Toggle word wrap
  8. Add a tag name to the snapshot by running the following command:

    $ aws ec2 create-tags --resources $SNAPSHOT_ID --tags Key=Name,Value="$AMI_NAME"
    Copy to Clipboard Toggle word wrap
  9. Register the AMI from the snapshot with the following command:

    $ AMI_ID=$(aws ec2 register-image \
    --name "$AMI_NAME" \
    --description "$AMI_NAME" \
    --architecture x86_64 \
    --root-device-name /dev/sda1 \
    --block-device-mappings "DeviceName=/dev/sda1,Ebs={VolumeSize=${DEFAULT_VOLUME_SIZE},SnapshotId=${SNAPSHOT_ID}}" \
    --virtualization-type hvm \
    --ena-support \
    | jq -r .ImageId)
    Copy to Clipboard Toggle word wrap
  10. Add a tag name to identify the AMI by running the following command:

    $ aws ec2 create-tags --resources $AMI_ID --tags Key=Name,Value="$AMI_NAME"
    Copy to Clipboard Toggle word wrap

2.2. Deploying on AWS using the CLI

You can launch the Red Hat Enterprise Linux AI AWS instance by using the RHEL AI Amazon Machine Image (AMI) from the AWS web console or by using the awscli CLI.

The following procedure describes how to use the awscli CLI to launch the AWS instance with the custom AMI.

Prerequisites

  • You have created the RHEL AI AMI.
  • You have installed the awscli CLI, and configured it with your aws_access_key_id and aws_secret_access_key variables.
  • You have configured your Virtual Private Cloud (VPC).
  • You have created a subnet for your instance.
  • You have created an SSH key pair.
  • You have created an AWS security group on.

Procedure

  1. Configure the various AWS parameters.

    1. Set the AMI variable. Run the following command and copy the required AMI ID:

      $ aws ec2 describe-images --owners self
      Copy to Clipboard Toggle word wrap
      $ AMI=<AMI_ID>
      Copy to Clipboard Toggle word wrap
    2. Set the SECURITY_GROUP variable. Run the following command and copy the required security group ID:

      $ aws ec2 describe-security-groups
      Copy to Clipboard Toggle word wrap
      $ SECURITY_GROUP=<SECURITY_GROUP_ID>
      Copy to Clipboard Toggle word wrap
    3. Set the SUBNET variable. Run the following command and copy the required subnet:

      $ aws ec2 describe-subnets
      Copy to Clipboard Toggle word wrap
      $ SUBNET=<SUBNET>
      Copy to Clipboard Toggle word wrap
    4. Set the INSTANCE_TYPE variable:

      $ INSTANCE_TYPE=<INSTANCE_TYPE_SIZE>
      Copy to Clipboard Toggle word wrap
    5. Set the INSTANCE_NAME variable:

      $ INSTANCE_NAME=rhel-ai-instance
      Copy to Clipboard Toggle word wrap
    6. Set the disk size variable:

      $ DISK_SIZE=<REQUIRED_DISK_SIZE>
      Copy to Clipboard Toggle word wrap
    7. Set the KEY_NAME variable:

      $ KEY_NAME=<KEY_PAIR_NAME>
      Copy to Clipboard Toggle word wrap
  2. Create the instance by running the following command:

    $ aws ec2 run-instances \
    --image-id $AMI \
    --instance-type $INSTANCE_TYPE \
    --key-name $KEY_NAME \
    --security-group-ids $SECURITY_GROUP \
    --subnet-id $SUBNET \
    --block-device-mappings DeviceName=/dev/sda1,Ebs='{VolumeSize='$DISK_SIZE'}' \
    --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value='$INSTANCE_NAME'}]'
    Copy to Clipboard Toggle word wrap
    Important

    The default user account in the RHEL AI AMI is cloud-user. The cloud-user account has passwordless sudo access.

Chapter 3. Installing RHEL AI on IBM Cloud

Before you can deploy Red Hat Enterprise Linux AI on IBM Cloud, you must first convert the RHEL AI image into an IBM Cloud image.

To create a bootable image in IBM Cloud you must configure your IBM Cloud accounts, set up a Cloud Object Storage (COS) bucket, and create an IBM Cloud image based on the RHEL AI image.

Prerequisites

Procedure

  1. Log in to IBM Cloud. Run the following command:

    $ ibmcloud login
    Copy to Clipboard Toggle word wrap

    When prompted, select the account to log in to.

  2. Set up various required IBM Cloud configurations, create the COS bucket, and then generate the required QCOW2 image.

    1. Install the required IBM Cloud plugins by running the following command:

      $ ibmcloud plugin install cloud-object-storage infrastructure-service
      Copy to Clipboard Toggle word wrap
    2. Set the preferred resource group, for example:

      $ ibmcloud target -g Default
      Copy to Clipboard Toggle word wrap
    3. Set the preferred region, for example:

      $ ibmcloud target -r us-east
      Copy to Clipboard Toggle word wrap
    4. Select a deployment plan for the service instance.

      1. You can list the available deployment plans by running the following command:

        $ ibmcloud catalog service cloud-object-storage --output json | jq -r '.[].children[] | select(.children != null) | .children[].name'
        Copy to Clipboard Toggle word wrap
      2. Set the COS_DEPLOY_PLAN environment variable with the required deployment plan, for example:

        $ COS_DEPLOY_PLAN=premium-global-deployment
        Copy to Clipboard Toggle word wrap
      3. Create a COS service instance. Run the following commands:

        $ COS_SI_NAME=<YOUR_SERVICE_INSTANCE>
        Copy to Clipboard Toggle word wrap
        $ ibmcloud resource service-instance-create ${COS_SI_NAME} cloud-object-storage standard global -d ${COS_DEPLOY_PLAN}
        Copy to Clipboard Toggle word wrap
    5. Create the Cloud Resource Name (CRN) COS_CRN variable and create the resource. Run the following commands:

      $ COS_CRN=$(ibmcloud resource service-instance ${COS_SI_NAME} --output json| jq -r '.[] | select(.crn | contains("cloud-object-storage")) | .crn')
      Copy to Clipboard Toggle word wrap
      $ ibmcloud cos config crn --crn ${COS_CRN} --force
      Copy to Clipboard Toggle word wrap
    6. Create the COS bucket:

      $ COS_BUCKET=<YOUR_BUCKET_NAME>
      Copy to Clipboard Toggle word wrap
      $ ibmcloud cos bucket-create --bucket ${COS_BUCKET}
      Copy to Clipboard Toggle word wrap
    7. Allow the infrastructure service to read the buckets that are in the service instance ${COS_SI_GUID} variable by running the following commands:

      $ COS_SI_GUID=$(ibmcloud resource service-instance ${COS_SI_NAME} --output json| jq -r '.[] | select(.crn | contains("cloud-object-storage")) | .guid')
      Copy to Clipboard Toggle word wrap
      $ ibmcloud iam authorization-policy-create is cloud-object-storage Reader --source-resource-type image --target-service-instance-id ${COS_SI_GUID}
      Copy to Clipboard Toggle word wrap
  3. Copy the QCOW2 image URL from the Download Red Hat Enterprise Linux AI page.
  4. Download the QCOW2 image:

    $ curl -Lo disk.qcow2 <QCOW2_IMAGE_URL>
    Copy to Clipboard Toggle word wrap
  5. Set the name you want to use as the RHEL AI IBM Cloud image. Run the following command:

    $ IMAGE_NAME=rhel-ai-3-2025v0
    Copy to Clipboard Toggle word wrap
  6. Upload the QCOW2 image to the COS bucket with your selected region:

    $ ibmcloud cos upload --bucket ${COS_BUCKET} --key ${IMAGE_NAME}.qcow2 --file disk.qcow2 --region <REGION>
    Copy to Clipboard Toggle word wrap
  7. Convert the QCOW2 image that you just uploaded to an IBM Cloud image and set the IBM Cloud image configuration IMAGE_ID variable:

    $ IMAGE_ID=$(ibmcloud is image-create ${IMAGE_NAME} --file cos://<REGION>/${COS_BUCKET}/${IMAGE_NAME}.qcow2 --os-name red-ai-9-amd64-nvidia-byol --output json | jq -r '.id')
    Copy to Clipboard Toggle word wrap

Verification

  1. View the progress of the job by running the following command:

    $ while ibmcloud is image --output json ${IMAGE_ID} | jq -r .status | grep -xq pending; do sleep 1; done
    Copy to Clipboard Toggle word wrap
  2. View information about the newly created image:

    $ ibmcloud is image ${IMAGE_ID}
    Copy to Clipboard Toggle word wrap

3.2. Deploying on IBM Cloud using the CLI

You can launch a Red Hat Enterprise Linux AI instance image from the IBM Cloud web console or the CLI. You can use whichever method of deployment you want to launch your instance. The following procedure describes using the IBM Cloud CLI to launch an RHEL AI instance.

Prerequisites

Procedure

  1. Log in to your IBM Cloud account, selecting the Account, Region and Resource Group by running the following command:

    $ ibmcloud login -c <ACCOUNT_ID> -r <REGION> -g <RESOURCE_GROUP>
    Copy to Clipboard Toggle word wrap
  2. Before launching the IBM Cloud instance, you need to create several configuration variables.

    1. Install the infrastructure-service plugin for IBM Cloud by running the following command:

      $ ibmcloud plugin install infrastructure-service
      Copy to Clipboard Toggle word wrap
    2. Create an SSH public key for your IBM Cloud account. IBM Cloud supports RSA and ed25519 keys.

      $ ssh-keygen -f ibmcloud -t ed25519
      Copy to Clipboard Toggle word wrap
    3. Upload the public key to your IBM Cloud account.

      $ ibmcloud is key-create <YOUR_IBMCLOUD_SSH_PUB_KEY> --key-type ed25519
      Copy to Clipboard Toggle word wrap
    4. Create a floating IP for the IBM Cloud instance:

      $ ibmcloud is floating-ip-reserve my-public-ip --zone <PREFERRED_REGION>
      Copy to Clipboard Toggle word wrap
  3. Select the instance profile that you want to use for the deployment. List all the profiles by running the following command:

    $ ibmcloud is instance-profiles
    Copy to Clipboard Toggle word wrap

    Make a note of your preferred instance profile.

  4. Create environment variables for the IBM Cloud instance, for example:

    NAME=<INSTANCE_NAME>
    VPC=<YOUR_VPC>
    ZONE=<YOUR_IBM_CLOUD_ZONE>
    SUBNET=<ZONE_SUBNET>
    INSTANCE_PROFILE=<YOUR_CLOUD_INSTANCE_PROFILE>
    IMAGE=<YOUR_IBM_CLOUD_RHELAI_IMAGE>
    SSHKEY=<YOUR_IBMCLOUD_SSH_PUB_KEY>
    FLOATING_IP=<PUBLIC_IP>
    DISK_SIZE=250
    Copy to Clipboard Toggle word wrap
  5. You can now launch your instance, by running the following command:

    $ ibmcloud is instance-create \
        $NAME \
        $VPC \
        $ZONE \
        $INSTANCE_PROFILE \
        $SUBNET \
        --image $IMAGE \
        --keys $SSHKEY \
        --boot-volume '{"name": "'${NAME}'-boot", "volume": {"name": "'${NAME}'-boot", "capacity": '${DISK_SIZE}', "profile": {"name": "general-purpose"}}}' \
        --allow-ip-spoofing false
    Copy to Clipboard Toggle word wrap
  6. Link the Floating IP to the instance by running the following command:

    $ ibmcloud is floating-ip-update $FLOATING_IP --nic primary --in $NAME
    Copy to Clipboard Toggle word wrap

3.3. Adding more storage to the IBM Cloud instance

In IBM Cloud, there is a size restriction of 250 GB of storage in the main IBM Cloud disk. You might require more disk space for model storage. You can add more storage by attaching an extra disk to your instance.

Prerequisites

Procedure

  1. Create the NAME environment variable:

    $ NAME=rhelai-instance
    Copy to Clipboard Toggle word wrap
  2. Create the DATA_VOLUME_SIZE variable:

    $ DATA_VOLUME_SIZE=1000
    Copy to Clipboard Toggle word wrap
  3. Create the volume and attach it the instance by running the following command:

    $ ibmcloud is instance-volume-attachment-add data ${NAME} \
    --new-volume-name ${NAME}-data \
    --profile general-purpose \
    --capacity ${DATA_VOLUME_SIZE}
    Copy to Clipboard Toggle word wrap
  4. Review the disks attached to the instance:

    $ lsblk
    Copy to Clipboard Toggle word wrap
  5. Create a DISK variable for the newly provisioned disk path, for example:

    $ DISK=/dev/vdb
    Copy to Clipboard Toggle word wrap
  6. Create a partition on the disk by running the following command:

    $ sgdisk -n 1:0:0 $DISK
    Copy to Clipboard Toggle word wrap
  7. Format and label the partition:

    $ mkfs.xfs -L rhelai-data ${DISK}1
    Copy to Clipboard Toggle word wrap
  8. Optional: Configure the system to auto-mount to the directory. To mount the disk to the /mnt folder, run the following command:

    $ echo LABEL=rhelai-data /mnt xfs defaults 0 0 >> /etc/fstab
    Copy to Clipboard Toggle word wrap
  9. Reload the systemd service:

    $ systemctl daemon-reload
    Copy to Clipboard Toggle word wrap
  10. Mount the disk:

    $ mount -a
    Copy to Clipboard Toggle word wrap
  11. Grant write permissions to all users in the new file system by running the following command:

    $ chmod 1777 /mnt/
    Copy to Clipboard Toggle word wrap

Chapter 4. Installing RHEL AI on Google Cloud

Before you can deploy Red Hat Enterprise Linux AI on Google Cloud, you must first convert the RHEL AI image into an Google Cloud image.

To create a bootable image in Google Cloud you must configure your Google Cloud account, create a Google Cloud Storage bucket, and convert the RHEL AI RAW image into a Google Cloud image.

Prerequisites

  • You have installed the gcloud CLI. See Install the gcloud CLI.
  • You have a host with RHEL version 9.2+ installed.
  • Your host has an additional 100GB of disk space available.

Procedure

  1. Log in to gcloud. Run the following command:

    $ gcloud auth login
    Copy to Clipboard Toggle word wrap
  2. Configure gcloud and create your Google Cloud storage container.

    1. Configure the gcloud CLI to use your project.

      $ GCLOUD_PROJECT=rhelai-gcloud-project
      Copy to Clipboard Toggle word wrap
      $ gcloud config set project $GCLOUD_PROJECT
      Copy to Clipboard Toggle word wrap
    2. Create an environment variable defining the region where you want to operate. For example:

      $ gcloud_region=us-central1
      Copy to Clipboard Toggle word wrap
    3. Create a storage container. Run the following commands:

      $ GCLOUD_BUCKET=<YOUR_BUCKET_NAME>
      Copy to Clipboard Toggle word wrap
      $ gsutil mb -l $gcloud_region gs://$GCLOUD_BUCKET
      Copy to Clipboard Toggle word wrap
  3. Download the tar.gz image from the Download Red Hat Enterprise Linux AI page.
  4. Unzip the tar.gz file with the following command:

    $ gunzip <DOWNLOADED_TAR_GZ_FILE>
    Copy to Clipboard Toggle word wrap
  5. Configure the IMAGE_NAME variable:

    $ IMAGE_NAME=rhel-ai-gcloud
    Copy to Clipboard Toggle word wrap
  6. Upload the tar.gz file to the Google Cloud Storage Container by running the following command:

    $ gsutil cp <DOWNLOADED_TAR_GZ_FILE> "gs://${GCLOUD_BUCKET}/$IMAGE_NAME.tar.gz"
    Copy to Clipboard Toggle word wrap
  7. Create a Google Cloud image from the tar.gz file:

    $ gcloud compute images create \
    "$IMAGE_NAME" \
    --source-uri="gs://${GCLOUD_BUCKET}/$IMAGE_NAME.tar.gz" \
    --family "rhel-ai" \
    --guest-os-features=GVNIC
    Copy to Clipboard Toggle word wrap

You can launch an Google Cloud instance from an uploaded Red Hat Enterprise Linux AI image by using the Google Cloud web console or the CLI. The following procedure describes how to use the gcloud CLI to launch the instance by using the custom image.

Prerequisites

  • You have created the RHEL AI image and made it available for installation in Google Cloud.
  • You have installed the gcloud CLI. See Install the gcloud CLI.

Procedure

  1. Log in to your Google Cloud account by running the following command:

    $ gcloud auth login
    Copy to Clipboard Toggle word wrap
  2. Create several gcloud configuration variables for the deployment.
  3. Select the instance profile that you want to use for the deployment. List all the profiles in the required region by running the following command:

    $ gcloud compute machine-types list --zones=<ZONE>
    Copy to Clipboard Toggle word wrap

    Make a note of the preferred machine type.

  4. Create Google Cloud instance variables, for example:

    NAME=rhelai-instance
    ZONE=us-central1-a
    MACHINE_TYPE=a3-highgpu-8g
    ACCELERATOR="type=nvidia-h100-80gb,count=8"
    IMAGE=custom-rhelai-image
    DISK_SIZE=1024
    SUBNET=default
    Copy to Clipboard Toggle word wrap
  5. Configure the zone.

    $ gcloud config set compute/zone $ZONE
    Copy to Clipboard Toggle word wrap
  6. Launch the Google Cloud instance:

    $ gcloud compute instances create \
        ${name} \
        --machine-type ${MACHINE_TYPE} \
        --image $IMAGE \
        --zone $ZONE \
        --subnet $SUBNET \
        --boot-disk-size ${DISK_SIZE} \
        --boot-disk-device-name ${NAME} \
        --accelerator=$ACCELERATOR
    Copy to Clipboard Toggle word wrap

Chapter 5. Installing RHEL AI on Microsoft Azure

You can deploy Red Hat Enterprise Linux AI on Microsoft Azure by first downloading the RHEL AI VHD file, converting it to an Azure image, and then installing with the az CLI.

To create a bootable image on Azure you must configure your Azure account, create an Azure storage container, and create an Azure image from the RHEL AI VHD image.

Prerequisites

Procedure

  1. Log in to Azure by running the following command:

    $ az login
    Copy to Clipboard Toggle word wrap
  2. Log in with the azcopy tool:

    $ keyctl new_session
    Copy to Clipboard Toggle word wrap
    $ azcopy login
    Copy to Clipboard Toggle word wrap
  3. Configure various Azure environment variables and create your Azure storage container.

    1. Create an environment variable defining the location of your instance with the following command:

      $ AZ_LOCATION=eastus
      Copy to Clipboard Toggle word wrap
    2. Create the AZ_RESOURCE_GROUP environment variable. For example:

      $ AZ_RESOURCE_GROUP=Default
      $ az group create --name ${AZ_RESOURCE_GROUP} --location ${AZ_LOCATION}
      Copy to Clipboard Toggle word wrap
    3. Create the Azure storage account:

      $ AZ_STORAGE_ACCOUNT=<YOUR_STORAGE_ACCOUNT_NAME>
      Copy to Clipboard Toggle word wrap
      $ az storage account create \
      --name ${AZ_STORAGE_ACCOUNT} \
      --resource-group ${AZ_RESOURCE_GROUP} \
      --location ${AZ_LOCATION} \
      --sku Standard_LRS
      Copy to Clipboard Toggle word wrap
    4. Create the Azure storage container. Run the following commands:

      $ AZ_STORAGE_CONTAINER=<BUCKET_NAME>
      Copy to Clipboard Toggle word wrap
      $ az storage container create \
      --name ${AZ_STORAGE_CONTAINER} \
      --account-name ${AZ_STORAGE_ACCOUNT} \
      --public-access off
      Copy to Clipboard Toggle word wrap
    5. Get the Subscription ID from the Azure account list by running the following command:

      $ az account list --output table
      Copy to Clipboard Toggle word wrap
    6. Create the AZ_SUBSCRIPTION_ID variable. For example:

      $ AZ_SUBSCRIPTION_ID=46c08fb3-83c5-4b59-8372-bf9caf15a681
      Copy to Clipboard Toggle word wrap
    7. Grant azcopy write permission to user into the storage container. For example:

      $ az role assignment create \
      --assignee user@example.com \
      --role "Storage Blob Data Contributor" \
      --scope /subscriptions/${AZ_SUBSCRIPTION_ID}/resourceGroups/${AZ_RESOURCE_GROUP}/providers/Microsoft.Storage/storageAccounts/${AZ_STORAGE_ACCOUNT}/blobServices/default/containers/${AZ_STORAGE_CONTAINER}
      Copy to Clipboard Toggle word wrap
  4. Download the Azure VHD image from Download Red Hat Enterprise Linux AI page.
  5. Unzip the vhd.gz file with the following command:

    $ gunzip <DOWNLOADED_AZURE_GZ_IMAGE>
    Copy to Clipboard Toggle word wrap
  6. Set the Azure image name:

    $ IMAGE_NAME=rhel-ai-azure
    Copy to Clipboard Toggle word wrap
  7. Upload the VHD file to the Azure storage container by running the following command:

    $ AZ_VHD_URL="https://${AZ_STORAGE_ACCOUNT}.blob.core.windows.net/${AZ_STORAGE_CONTAINER}/$(basename ${vhd_file})"
    $ azcopy copy "$vhd_file" "$AZ_VHD_URL"
    Copy to Clipboard Toggle word wrap
  8. Create an Azure image from the uploaded VHD file. Run the following command:

    $ az image create --resource-group $AZ_RESOURCE_GROUP \
    --name "$IMAGE_NAME" \
    --source "${AZ_VHD_URL}" \
    --location ${AZ_LOCATION} \
    --os-type Linux \
    --hyper-v-generation V2
    Copy to Clipboard Toggle word wrap

You can launch the Red Hat Enterprise Linux AI instance by using the RHEL AI image from the Azure web console or by using the az CLI.

The following procedure describes how to use the az CLI to launch the RHEL AI instance with the downloaded image.

Prerequisites

Procedure

  1. Log in to your Azure account:

    $ az login
    Copy to Clipboard Toggle word wrap
  2. Select the instance profile that you want to use for the deployment. List all the profiles in the required region by running the following command:

    $ az vm list-sizes --location <REGION> --output table
    Copy to Clipboard Toggle word wrap
  3. Creating the Azure instance.#

    1. Configure environment variables for the instance.

      NAME=my-rhelai-instance
      AZ_LOCATION=eastus
      AZ_RESOURCE_GROUP=<YOUR_AZURE_RESOURCE_GROUP>
      AZ_ADMIN_USERNAME=azureuser
      AZ_VM_SIZE=Standard_ND96isr_H100_v5
      AZ_IMAGE=my-rhelai-image
      SSHPUBKEY=$HOME/.ssh/id_rsa.pub
      DISK_SIZE=1024
      Copy to Clipboard Toggle word wrap
  4. Launch the RHEL AI instance by running the following command:

    $ az vm create \
    --resource-group $AZ_RESOURCE_GROUP \
    --name ${NAME} \
    --image ${AZ_IMAGE} \
    --size ${AZ_VM_SIZE} \
    --location ${AZ_LOCATION} \
    --admin-username ${AZ_ADMIN_USERNAME} \
    --ssh-key-values @$SSHPUBKEY \
    --authentication-type ssh \
    --nic-delete-option Delete \
    --accelerated-networking true \
    --os-disk-size-gb 1024 \
    --os-disk-name ${NAME}-${AZ_LOCATION}
    Copy to Clipboard Toggle word wrap

Chapter 6. Updating RHEL AI

You can update RHEL AI to the latest version.

Prerequisites

  • You have installed and deployed a Red Hat Enterprise Linux AI instance on one of the supported platforms.
  • You have created a Red Hat registry account.
  • You have root user access on the host.

Procedure

  1. Log in to your Red Hat registry account with podman or skopeo, for example:

    $ sudo podman login registry.redhat.io --username <USER_NAME> --password <PASSWORD> --authfile /etc/ostree/auth.json
    Copy to Clipboard Toggle word wrap
    $ sudo skopeo login registry.redhat.io --username <USER_NAME> --password <PASSWORD> --authfile /etc/ostree/auth.json
    Copy to Clipboard Toggle word wrap
  2. Update to the latest minor version of Red Hat Enterprise Linux AI by using the relevant bootc image for your machine, for example:

    $ sudo bootc switch registry.redhat.io/rhelai1/bootc-cuda-rhel9:{product-version}
    Copy to Clipboard Toggle word wrap
    1. Copy the /etc/skel/.config/containers/storage.conf storage configuration to your <USER_HOME>/.config/containers/storage.conf home directory before re-initializing. Run the following command:

      $ cp /etc/skel/.config/containers/storage.conf <USER_HOME>/.config/containers/storage.con
      Copy to Clipboard Toggle word wrap
  3. Alternatively, update to the latest z-stream version of Red Hat Enterprise Linux AI by running the following command:

    $ sudo bootc update --apply
    Copy to Clipboard Toggle word wrap
  4. Restart the system:

    $ sudo reboot -n
    Copy to Clipboard Toggle word wrap

Some cloud or bare-metal instances might not have enough storage on the default disk to run RHEL AI and store downloaded models. You can configure additional storage for Red Hat Enterprise Linux AI to store models and data.

Prerequisites

  • You have deployed a Red Hat Enterprise Linux AI instance.
  • You have attached and formatted an additional storage volume to your instance.

Procedure

  1. Review the disks attached to the instance:

    $ lsblk
    Copy to Clipboard Toggle word wrap
  2. Create a DISK variable for the newly provisioned disk path. For example:

    $ DISK=/dev/vdb
    Copy to Clipboard Toggle word wrap
  3. Configure the system to automatically mount the disk to the /mnt directory. Add an entry to /etc/fstab:

    $ echo "${DISK} /mnt xfs defaults 0 0" | sudo tee -a /etc/fstab
    Copy to Clipboard Toggle word wrap
    Note

    Replace xfs with your disk’s file system type if different (for example, ext4).

  4. Reload the systemd service:

    $ sudo systemctl daemon-reload
    Copy to Clipboard Toggle word wrap
  5. Mount the disk:

    $ sudo mount -a
    Copy to Clipboard Toggle word wrap
  6. Grant appropriate permissions to the mounted directory:

    $ sudo chmod 1777 /mnt/
    Copy to Clipboard Toggle word wrap

Verification

  • Verify that the disk is mounted correctly:

    $ df -h /mnt
    Copy to Clipboard Toggle word wrap

Legal Notice

Copyright © Red Hat.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat