- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Server Management - Remote Server Management
- >
- Ilo5 - Change hostname of the server in python red...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2020 02:24 AM
03-06-2020 02:24 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2020 10:25 PM
03-11-2020 10:25 PM
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,
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]