此内容没有您所选择的语言版本。

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:

5.1. Converting the RHEL AI VHD image into a Azure image

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
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat