cancel
Showing results for 
Search instead for 
Did you mean: 

iLO MAC

 
SOLVED
Go to solution
Highlighted
Respected Contributor

iLO MAC

I can't find the iLO MAC in the server hardware information.  Am I looking in the wrong place?  Since OneView talks to the iLO interface, it must know the MAC?

6 REPLIES 6
Highlighted
HPE Pro
Solution

Re: iLO MAC

OneView does not inventory the iLO MAC address.  The appliance only "knows" the MAC address if the iLO is on the same VLAN/Subnet and performs standard ARP lookup and maintains that information within the OS ARP table.

For what purpose do you need to know the iLO MAC address?


I am an HPE employee

Accept or Kudo

Highlighted
Respected Contributor

Re: iLO MAC

Hi Chris,

Just for inventory.  We keep a confluence page with critical information for each server.  I need the on-board MACs (which I can get easily from OneView) to populate our dhcpd configuration file.  I guess I'll have to look to IPMI or hponcfg to pull in the iLO MACs.  Thanks for the info!

Highlighted
HPE Pro

Re: iLO MAC

I wouldn't suggest either.  You can get an iLO SSO token from OneView.  Then use iLO Redfish to get the MAC address:

/redfish/v1/managers/{item}/EthernetInterfaces/{item}

where {item} is:

/PermanentMACAddress
/MACAddress

 This is from the iLO Redfish REST API documentation. 


I am an HPE employee

Accept or Kudo

Highlighted
Respected Contributor

Re: iLO MAC

Thanks Chris.  I'll give that a try next week. 

Highlighted
Respected Contributor

Re: iLO MAC

Hi Chris,

Not sure what I am doing wrong?  I can't seem to get PermanentMACAdress directly, but can grab it with jq:

# Download all of the server hardware to a file.
# Get session credentials for OneView.
HARDW=hardw-all
# Select server to query:
SERVER=my-test-server-ilo
UUID=$(jq -r '.members[] | select(.name == "'${SERVER}'") | "\(.uuid)"' ${HARDW})
read iLOSSO iLOAuth <<< $(curl --insecure --header "X-API-Version: ${currentVersion}" \
  --header "auth: ${sessionID}" --request GET ${OneView}/rest/server-hardware/${UUID}/remoteConsoleUrl | \
  jq -r '.remoteConsoleUrl' | sed -e 's|hplocons|https|' -e 's|addr=||' -e 's|^\(.*\)&sessionkey=\(.*\)|\1 \2|')
MAC=$(curl --insecure --header "X-Auth-Token: ${iLOAuth}" --request GET ${iLOSSO}/redfish/v1/manaers/1/EthernetInterfaces/1/ | jq -r '.PermanentMACAddress')

which works.  Just curious why --request GET ${iLOSSO}/redfish/v1/manaers/1/EthernetInterfaces/1/PermanentMACAdress/ returns Base.1.4.ResourceMissingAtURI?

Highlighted
HPE Pro

Re: iLO MAC

Not sure.  I copied straight from the Redfish API docs.  If you get an HTTP 404 error, then it is likely a property of an object, not a relative URI.


I am an HPE employee

Accept or Kudo