Start a Conversation

Unsolved

This post is more than 5 years old

11194

May 18th, 2017 08:00

Power Cycle System (Cold Boot) via rest api

Hello,

How to do Power Cycle System (Cold Boot) via rest api

Below is example in ILO 

https://hewlettpackard.github.io/ilo4-rest-api-docs/#log-out-of-a-session

curl -H "Content-Type: application/json" -X POST --data "@data.json" https://{iLO}/redfish/v1/Systems/1/Actions/ComputerSystem.Reset/ -u username:password --insecure

Contents of data.json

{“ResetType”: “ColdBoot”}

30 Posts

May 29th, 2017 04:00

Hi YONI386,

The command should be similar to the one you used for ILO. Just replace the URI with this - 

4 Posts

May 29th, 2017 07:00

Post to https://IP/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset 

{
"error": {
"code": "1",
"message": {
"lang": "en-us",
"value": "failed: Unsupported Reset Type:ColdBoot"
}
}
}

{
"@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem",
"@odata.id": "/redfish/v1/Systems/System.Embedded.1",
"@odata.type": "#ComputerSystem.v1_0_2.ComputerSystem",
"Actions": {
"#ComputerSystem.Reset": {
"ResetType@Redfish.AllowableValues": [
"On",
"ForceOff",
"GracefulRestart",
"PushPowerButton",
"Nmi"
],
"target": "/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset"
}
},
"AssetTag": "",
"BiosVersion": "2.3.4",
"Boot": {
"BootSourceOverrideEnabled": "Once",
"BootSourceOverrideTarget": "None",
"BootSourceOverrideTarget@Redfish.AllowableValues": [
"None",
"Pxe",
"Cd",
"Floppy",
"Hdd",
"BiosSetup",
"Utilities",
"UefiTarget",
"SDCard"
],
"UefiTargetBootSourceOverride": ""
},
"Description": "Computer System which represents a machine (physical or virtual) and the local resources such as memory, cpu and other devices that can be accessed from that machine.",
"EthernetInterfaces": {
"@odata.id": "/redfish/v1/Systems/System.Embedded.1/EthernetInterfaces"
},
"HostName": "",
"Id": "System.Embedded.1",
"IndicatorLED": "Off",
"Links": {
"Chassis": [
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1"
}
],
"Chassis@odata.count": 1,
"CooledBy": [
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.1A"
},
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.2A"
},
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.3A"
},
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.4A"
},
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.5A"
},
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.6A"
},
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.7A"
},
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.1B"
},
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.2B"
},
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.3B"
},
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.4B"
},
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.5B"
},
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.6B"
},
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Sensors/Fans/0x17||Fan.Embedded.7B"
}
],
"CooledBy@odata.count": 14,
"ManagedBy": [
{
"@odata.id": "/redfish/v1/Managers/iDRAC.Embedded.1"
}
],
"ManagedBy@odata.count": 1,
"PoweredBy": [
{
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Power/PowerSupplies/PSU.Slot.1"
}
],
"PoweredBy@odata.count": 1
},
"Manufacturer": "Dell Inc.",
"MemorySummary": {
"Status": {
"Health": "OK",
"HealthRollUp": "OK",
"State": "Enabled"
},
"TotalSystemMemoryGiB": 256
},
"Model": "PowerEdge R630",
"Name": "System",
"PartNumber": "",
"PowerState": "On",
"ProcessorSummary": {
"Count": 2,
"Model": "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz",
"Status": {
"Health": "OK",
"HealthRollUp": "OK",
"State": "Enabled"
}
},
"Processors": {
"@odata.id": "/redfish/v1/Systems/System.Embedded.1/Processors"
},
"SKU": "",
"SerialNumber": "",
"SimpleStorage": {
"@odata.id": "/redfish/v1/Systems/System.Embedded.1/Storage/Controllers"
},
"Status": {
"Health": "OK",
"HealthRollUp": "OK",
"State": "Enabled"
},
"SystemType": "Physical",
"UUID": ""
}

30 Posts

May 29th, 2017 21:00

Hi Yoni386,

  Since the valid options as per the output are as below, you could try first a "ForceOff" and then an "On".

"ResetType@Redfish.AllowableValues": [

"On",
"ForceOff",
"GracefulRestart",
"PushPowerButton",
"Nmi"
],

Regards,

Mondeep

4 Posts

May 30th, 2017 01:00

Yes, this is what is what I did. I read that five seconds are required between "off" and "on", to make sure all the memory is 100% cleared. 
The dell ui offer "cold boot". Could be rest api version is not new enough? I can find api reference for cold boot in a single operation. Could be the iDRAC ui is using the same way? off and wait for 5-6t six second and then on? 

30 Posts

May 30th, 2017 02:00

Hi Yoni386,

  The latest DMTF Redfish schema doc has these as the supported values for ResetType. "ColdBoot" is not one of them. The iDRAC GUI does give the option of "ColdBoot" but I do not know about the implementation.





























Regards,

Dell-Mondeep

No Events found!

Top