Server Management - Remote Server Management
1752739 Members
5577 Online
108789 Solutions
New Discussion

Re: Ilo5 - Change hostname of the server in python redfish

 
Bruniche
Advisor

Ilo5 - Change hostname of the server in python redfish

Hello,

According the official doc : https://hewlettpackard.github.io/ilo-rest-api-docs/ilo5
It's possible to edit the server hostname through Redfish.

Mainly, my code is like this :

 

url = 'https://%s/redfish/v1/Systems/1' %(login_host)
body = {"HostName": "new_hostname"}
req = requests.patch(url, data=json.dumps(body), headers=headers, verify=False)

 

On a iLO4 (in last version), its working great.

I used the same on a iLO5 (in 2.10 version).
I have the following 400 error :
@Message.ExtendedInfo":[{"MessageArgs":["Cannot modify HostName - possibly in POST"],"MessageId":"iLO.2.13.InternalErrorWithParam"}]}}'

If i used a POST instead of PATCH :
"@Message.ExtendedInfo":[{"MessageArgs":["Action"],"MessageId":"Base.1.4.PropertyMissing"}]}}'

Do you have the good path/payload to update the hostname of a Gen10 server please ?

Thanks a lot.

1 REPLY 1
Suvamay
HPE Pro

Re: Ilo5 - Change hostname of the server in python redfish

Hello,

It is mandatory to initialize the HostName property before the OS deployment or boot process because once set, Redfish caches it to make it persistent across reboots. Perform this configuration with an HTTP PATCH toward /redfish/v1/Systems/{item}/ and a payload similar to: {"HostName": ""}

Note that this resource can only be modified when the system is Off or in FinishedPost state. Said differently it cannot be modified in InPost or InPostDiscoveryComplete states. This gives the assurance that only a limited number of entities can modify it: An end-user through the iLO GUI, the Redfish API and the Operating System.

 

Please refer: https://developer.hpe.com/blog/master-the-redfish-server-states-to-improve-your-monitoring-and-manageme

 

Thanks,

 

I'm an HPE employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo