เปลี่ยนลําดับการบูตโดยใช้คําสั่ง Redfish ในระบบเซิร์ฟเวอร์ Intel®ตระกูล M50CYP
คําสั่ง Redfish ต่อไปนี้สามารถใช้เพื่อเปลี่ยนลําดับการบู๊ตของระบบจากระยะไกลได้
คําสั่ง CURL ในระบบ Linux* เพื่ออ่านรายละเอียด Redfish API ของระบบระยะไกล
ต้องติดตั้งกิจกรรม Python3*, Curl* และ jq ในระบบ
- ใช้ คําสั่งด้านล่างเพื่อรับ ID ระบบ:
คําสั่ง:
[root@ocsbesrhlrepo01 ~]# curl -k -u username: password https:// /redfish/v1/Systems -H "content-type:application/json" -X GET | python3 -m json.toolเอาต์พุต:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 460 100 460 0 0 218 0 0:00:02 0:00:02 --:--:-- 218
{
"@odata.context": "/redfish/v1/$metadata#ComputerSystemCollection.ComputerSystemCollection",
"@odata.id": "/redfish/v1/Systems",
"@odata.type": "#ComputerSystemCollection.ComputerSystemCollection",
"Name": "Computer System Collection",
"Members@odata.count": 1,
"Members": [
{
"@odata.id": "/redfish/v1/Systems/............"
}
],
- ตรวจ สอบ ตัวเลือกการบูตที่มีอยู่โดยใช้คําสั่งด้านล่าง.
คำ สั่ง:
[root@ocsbesrhlrepo01 ~]# curl -k -u username: password https:///redfish/v1/Systems/............ -H "content-type:application/json" -X GET | python3 -m json.toolผลลัพธ์:
"BootOrder": [
"UEFI INTEL SSDSCKKB240G8 PHYH02610986240J ",
"Enter Setup",
"Boot Device List",
"Network Boot",
"UEFI Internal Shell" - เปลี่ยน คําสั่ง boot โดยใช้คําสั่งด้านล่าง ตัวอย่างเช่น เปลี่ยน อุปกรณ์บู๊ตเครื่องแรกไปยัง UEFI Internal Shell
คําสั่ง:
curl -k -u username: password https:///redfish/v1/Systems/............ -H "content-type:application/json" --data '{"Boot":{"BootSourceOverideEnabled":"Continuous", "BootSourceOverrideTarget":"None", "BootOrder":["UEFI Internal Shell"]}}' -X PATCH | python3 -m json.tool - รี สตาร์ท ระบบ
คำ สั่ง:
curl -k -u username: password https:///redfish/v1/Systems/............/Actions/ComputerSystem.Reset -H "content-type:application/json" --data '{"ResetType":"ForceRestart"}' -X POST | python3 -m json.tool