- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Server Management - Remote Server Management
- >
- Change iLO hostname using RedFish API
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
Forums
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
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
04-17-2023 04:40 AM - last edited on 04-17-2023 06:59 AM by support_s
04-17-2023 04:40 AM - last edited on 04-17-2023 06:59 AM by support_s
I'm searching through iLO RedFish API , but have not found the answer yet. We have about 600 new servers with iLO interface names as set at the factory. We want to change them to our naming convention. I know how to change it with hponcfg, but don't want to have to log in to every server to run that. Does anyone know the correct RedFish API call to change the ilO hostname?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 06:29 AM
04-17-2023 06:29 AM
SolutionOK, I found :
curl --insecure --silent --header "X-auth-Token: ${iLOAuth}" --request GET ${iLOSSO}/redfish/v1?$expand=* | jq -r '.'
gives in part:
"Oem": {
"Hpe": {
"@odata.type": "#HpeiLOServiceExt.v2_0_0.HpeiLOServiceExt",
"Links": {
"ResourceDirectory": {
"@odata.id": "/redfish/v1/ResourceDirectory/"
}
},
"Manager": [
{
"DefaultLanguage": "en",
"FQDN": "edited",
"HostName": "ILO",
I'm just not sure how to get down to the Manager array under Oem/Hpe. Does anyone have an idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 06:57 AM
04-17-2023 06:57 AM
Re: Change iLO hostname using RedFish API
I figured it out. Can see the current iLO hostname with:
curl --insecure --silent --location --header "X-Auth-Token: ${iLOAuth}" --request GET ${iLOSSO}/redfish/v1/Managers/1/NetworkProtocol | jq -r '.'
Then to change, I ran:
SERVER=new-ilo-hostname
echo '{"HostName": "'${SERVER}'"}' > set-ilo
curl --insecure --silent --location --include --header "Content-Type: appliation/json" --header "X-Auth-Token: ${iLOAuth}" --data "@set-ilo" --request PATCH ${iLOSSO}/redfish/v1/Managers/1/NetworkProtocol
I got back:
HTTP/1.1 200 OK
When I ran the GET call again, the hostname has been changed!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 08:38 PM
04-17-2023 08:38 PM
Re: Change iLO hostname using RedFish API
Hello @bradawk1,
That's excellent!
We are glad to know you were able to find the solution and we appreciate you for keeping us updated.