Chapter 5. Installing RHEL AI on Microsoft Azure


There are two ways you can install and deploy Red Hat Enterprise Linux AI on Microsoft Azure:

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
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

© 2025 Red Hat