2.5. Redfish API를 사용하여 HTTP 호스팅 ISO 이미지에서 부팅
Redfish BMC(Baseboard Management Controller) API를 사용하여 설치하는 ISO를 사용하여 네트워크에 호스트를 프로비저닝할 수 있습니다.
이 예제 절차에서는 Dell 서버의 단계를 보여줍니다.
하드웨어와 호환되는 최신 펌웨어 버전의 iDRAC가 있는지 확인하십시오. 하드웨어 또는 펌웨어에 문제가 있는 경우 공급자에게 문의해야 합니다.
사전 요구 사항
- 설치 RHCOS(Red Hat Enterprise Linux CoreOS) 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
$ 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 다음과 같습니다.
- <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> -X PATCH -H 'Content-Type: application/json' -d '{"Boot": {"BootSourceOverrideTarget": "Cd", "BootSourceOverrideMode": "UEFI", "BootSourceOverrideEnabled": "Once"}}' <host_bmc_address>/redfish/v1/Systems/System.Embedded.1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 호스트를 재부팅합니다.
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
$ 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 선택 사항: 호스트의 전원이 꺼지면
{"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
$ 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow