2.5. Redfish API を使用した HTTP ホスト ISO イメージからの起動
Redfish Baseboard Management Controller (BMC) API を使用してインストールした ISO を使用して、ネットワーク内のホストをプロビジョニングできます。
この手順例では、Dell サーバーでの手順を示します。
ハードウェアと互換性のある iDRAC の最新ファームウェアバージョンがあることを確認してください。ハードウェアまたはファームウェアに問題がある場合は、プロバイダーに連絡する必要があります。
前提条件
- インストール Red Hat Enterprise Linux CoreOS (RHCOS) ISO をダウンロードしている。
- iDRAC9 と互換性のある Dell PowerEdge サーバーを使用している。
手順
- ネットワークでアクセス可能な HTTP サーバーに ISO ファイルをコピーします。
ホストされている ISO ファイルからホストを起動します。以下に例を示します。
次のコマンドを実行して、Redfish API を呼び出し、ホストされている ISO を
VirtualMedia
ブートメディアとして設定します。$ curl -k -u <bmc_username>:<bmc_password> -d '{"Image":"<hosted_iso_file>", "Inserted": true}' -H "Content-Type: application/json" -X POST <host_bmc_address>/redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD/Actions/VirtualMedia.InsertMedia
ここでは、以下のようになります。
- <bmc_username>:<bmc_password>
- ターゲットホスト BMC のユーザー名とパスワードです。
- <hosted_iso_file>
-
ホストされたインストール ISO の URL です (例:
http://webserver.example.com/rhcos-live-minimal.iso
)。ISO は、ターゲットホストマシンからアクセスできる必要があります。 - <host_bmc_address>
- ターゲットホストマシンの BMC IP アドレスです。
次のコマンドを実行して、
VirtualMedia
デバイスから起動するようにホストを設定します。$ curl -k -u <bmc_username>:<bmc_password> -X PATCH -H 'Content-Type: application/json' -d '{"Boot": {"BootSourceOverrideTarget": "Cd", "BootSourceOverrideMode": "UEFI", "BootSourceOverrideEnabled": "Once"}}' <host_bmc_address>/redfish/v1/Systems/System.Embedded.1
ホストを再起動します。
$ curl -k -u <bmc_username>:<bmc_password> -d '{"ResetType": "ForceRestart"}' -H 'Content-type: application/json' -X POST <host_bmc_address>/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset
オプション: ホストの電源がオフになっている場合は、
{"ResetType": "On"}
スイッチを使用して起動できます。以下のコマンドを実行します。$ curl -k -u <bmc_username>:<bmc_password> -d '{"ResetType": "On"}' -H 'Content-type: application/json' -X POST <host_bmc_address>/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset