第6章 Azure への RHEL AI のインストール


Azure に Red Hat Enterprise Linux AI をインストールしてデプロイする方法は複数あります。

VHD を使用して Azure に Red Hat Enterprise Linux AI をインストールしてデプロイするには、まず RHEL AI イメージを Azure イメージに変換する必要があります。その後、Azure イメージを使用してインスタンスを起動し、Azure マシンに RHEL AI をデプロイできます。

6.1. RHEL AI イメージの Azure イメージへの変換

Azure で起動可能なイメージを作成するには、Azure アカウントを設定し、Azure ストレージコンテナーを作成し、RHEL AI VHD イメージを使用して Azure イメージを作成する必要があります。

前提条件

手順

  1. 次のコマンドを実行して、Azure にログインします。

    $ az login

    ログインの出力例

    $ az login
    A web browser has been opened at https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with `az login --use-device-code`.
    [
      {
        "cloudName": "AzureCloud",
        "homeTenantId": "c7b976df-89ce-42ec-b3b2-a6b35fd9c0be",
        "id": "79d7df51-39ec-48b9-a15e-dcf59043c84e",
        "isDefault": true,
        "managedByTenants": [],
        "name": "Team Name",
        "state": "Enabled",
        "tenantId": "0a873aea-428f-47bd-9120-73ce0c5cc1da",
        "user": {
          "name": "user@example.com",
          "type": "user"
        }
      }
    ]

  2. 次のコマンドを使用して、azcopy ツールでログインします。

    $ keyctl new_session
    $ azcopy login
  3. Azure イメージを作成する前に、さまざまな Azure 設定をセットアップし、Azure Storage Container を作成する必要があります。

    1. 次のコマンドを使用して、インスタンスのロケーションを定義する環境変数を作成します。

      $ az_location=eastus
    2. リソースグループを作成し、その名前を az_resource_group という名前の環境変数に保存します。次の例では、eastus のロケーションに Default という名前のリソースグループを作成します。(既存のリソースグループを使用する場合は、この手順を省略できます)。

      $ az_resource_group=Default
      $ az group create --name ${az_resource_group} --location ${az_location}
    3. 次のコマンドを実行して、Azure ストレージアカウントを作成し、az_storage_account という名前の環境変数に名前を保存します。

      $ az_storage_account=THE_NAME_OF_YOUR_STORAGE_ACCOUNT
      $ az storage account create \
          --name ${az_storage_account} \
          --resource-group ${az_resource_group} \
          --location ${az_location} \
          --sku Standard_LRS
    4. 次のコマンドを使用して、環境変数 az_storage_container という名前の Azure Storage Container を作成します。

      $ az_storage_container=NAME_OF_MY_BUCKET
      $ az storage container create \
          --name ${az_storage_container} \
          --account-name ${az_storage_account} \
          --public-access off
    5. 次のコマンドを実行すると、Azure アカウントリストからサブスクリプション ID を取得できます。

      $ az account list --output table
    6. サブスクリプション ID を使用して `az_subscription_id` という名前の変数を作成します。

      $ az_subscription_id=46c08fb3-83c5-4b59-8372-bf9caf15a681
    7. ユーザーにストレージコンテナーへの azcopy 書き込み権限を付与します。この例では、ユーザー user@example.com に権限を付与します。

      $ 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}
  4. Azure ストレージコンテナーがセットアップされました。Red Hat Enterprise Linux AI ダウンロードページ から Azure VHD イメージをダウンロードする必要があります。
  5. 次のコマンドで vhd.gz ファイルを展開します。

    $ gunzip <downloaded-azure-gz-image>
  6. RHEL AI Azure イメージとして使用する名前を設定します。

    $ image_name=rhel-ai-1.5
  7. 次のコマンドを実行して、VHD ファイルを Azure Storage Container にアップロードします。

    $ az_vhd_url="https://${az_storage_account}.blob.core.windows.net/${az_storage_container}/$(basename ${vhd_file})"
    $ azcopy copy "$vhd_file" "$az_vhd_url"
  8. 次のコマンドを使用して、アップロードしたばかりの VHD ファイルから Azure イメージを作成します。

    $ 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
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat
トップに戻る