Use Case Examples and Macro Commands
This section outlines ready to use example commands, as well as some general use scenarios for obtaining and configuring iLO 4 (iLO 4 2.00+) and later systems through Redfish. Legacy modes are supported for older HPRest iLO 4 systems.
Quick Reference Table: Available scripts for Linux and Windows
Name | Description |
---|---|
Abort_Directory_Test.sh Abort_Directory_Test.bat |
Aborts the AD/LDAP directory test on HPE iLO 5 and later. |
Add_Federation_Group.sh Add_Federation_Group.bat |
Adds a Federation group membership and grant associated privileges on HPE iLO 4 and later. |
add_sso_rec.sh add_sso_rec.bat |
Adds an HPE SIM Single Sign-On (SSO) server record to the end of the database on HPE iLO 4 or later. |
Add_User.sh Add_User.bat |
Adds an iLO account to the server either locally or remotely. |
Administrator_reset_pw.sh Administrator_reset_pw.bat |
Sets the default HPE iLO Administrator account password. |
Boot_spp.sh Boot_spp.bat |
Mount a SPP media image, reboot the system, and boot to it. |
Cert_Request.sh Cert_Request.bat |
Gets a certificate signing request from an HPE iLO. |
Change_Password.sh Change_Password.bat |
Change an HPE iLO user's password in the iLO local users database. |
Clear_AHS_Data.sh Clear_AHS_Data.bat |
Clears AHS data. |
Clear_EventLog.sh Clear_EventLog.bat |
Clears the event log. |
Clear_IML.sh Clear_IML.bat |
Clears the Integrated Management Log (IML). |
Computer_Lock_Config.sh Computer_Lock_Config.bat |
Configures Computer Lock settings on HPE iLO 5 or later |
Delete_Federation_Group.sh Delete_Federation_Group.bat |
Deletes a Federation group membership. |
Delete_User.sh Delete_User.bat |
Deletes a user from the database of local users. |
delete_sso_rec.sh delete_sso_rec.bat |
Deletes an HPE SIM Single Sign-On (SSO) server record by index. |
Eject_Virtual_Media.sh Eject_Virtual_Media.bat |
Ejects virtual media. |
ERS_DC_SetWebProxy.sh ERS_DC_SetWebProxy.bat |
Set the Embedded Remote Support (ERS) Web proxy. |
ERS_Get_Settings.sh ERS_Get_Settings.bat |
Retrieves current ERS settings. |
Factory_Defaults.sh Factory_Defaults.bat |
Reset the HPE iLO to factory default settings. |
Get_AHS_Status.sh Get_AHS_Status.bat |
Provides the status of AHS being enabled or disabled. |
Get_All_Languages.sh Get_All_Languages.bat |
Get the list of iLO supported languages. |
Get_All_Licenses.sh Get_All_Licenses.bat |
Get iLO license information. |
Get_All_User_Info.sh Get_All_User_Info.bat |
Returns all local user's account information. |
Get_Asset_Tag.sh Get_Asset_Tag.bat |
Get the BIOS asset tag attribute. |
Get_Boot_Mode.sh Get_Boot_Mode.bat |
Obtains the pending boot mode. |
Get_Current_Boot_Mode.sh Get_Current_Boot_Mode.bat |
Obtains the current boot mode. |
Get_Directory_Test_Results.sh Get_Directory_Test_Results.bat |
Obtains directory test results. |
Get_Embedded_Health.sh Get_Embedded_Health.bat |
Retrieves the health information of the server. |
Get_EmHealth.sh Get_EmHealth.bat |
Retrieves the health information of the server. |
Get_Encrypt.sh Get_Encrypt.bat |
Returns the current encryption settings. |
Get_Federation_All_Groups_Info.sh Get_Federation_All_Groups_Info.bat |
Retrieves a list of all federation group memberships and granted privileges. |
Get_Federation_Group.sh Get_Federation_Group.bat |
Retrieves the privileges granted to a specified federation group. |
Get_Federation_Multicast_Options.sh Get_Federation_Multicast_Options.bat |
Retrieves the current federation multicast options. |
Get_FIPS_Status.sh Get_FIPS_Status.bat |
Returns the current FIPs mode. |
Get_FW_Version.sh Get_FW_Version.bat |
Returns the iLO current firmware version. |
Get_Global.sh Get_Global.bat |
Returns the current global settings. |
Get_Host_APO.sh Get_Host_APO.bat |
Obtains the automatic power on and power on delay settings of the server. |
Get_Host_Power.sh Get_Host_Power.bat |
Returns the current power state for the host server. |
Get_Host_Power_Saver.sh Get_Host_Power_Saver.bat |
Returns the current power state for the host server. |
Get_Hotkey_Config.sh Get_Hotkey_Config.bat |
Obtains the remote console hot keys. |
Get_IML.sh Get_IML.bat |
Retrieves the Integrated Management Log (IML). |
Get_LDAP_CA_Cert_Status.sh Get_LDAP_CA_Cert_Status.bat |
Obtains the LDAP CA certificate status on HPE iLO 4 and later. |
Get_Language.sh Get_Language.bat |
Reads the default language on iLO. |
Get_Network.sh Get_Network.bat |
Returns the current network settings. |
Get_OA_Info.sh Get_OA_Info.bat |
Returns the enclosure data for c-Class blade infrastructure. |
Get_One_Time_Boot_Order.sh Get_One_Time_Boot_Order.bat |
Retrieves the current state of the One Time Boot. |
Get_PS_Data.sh Get_PS_Data.bat |
Retrieves power supply information from the server. |
Get_Persistent_Boot_Order.sh Get_Persistent_Boot_Order.bat |
Retrieves the current state of the boot order. |
Get_Persmouse_Status.sh Get_Persmouse_Status.bat |
Obtains the persistent mouse and keyboard status. |
Get_PowerCap.sh Get_PowerCap.bat |
Returns the power cap setting on the host server. |
Get_Power_On_Time.sh Get_Power_On_Time.bat |
Obtains the server power on time. |
Get_Power_Readings.sh Get_Power_Readings.bat |
Obtains the power readings from the server. |
Get_Product_Name.sh Get_Product_Name.bat |
Obtains the product name. |
Get_Pwreg_Alert_Threshold.sh Get_Pwreg_Alert_Threshold.bat |
Obtains the power alert threshold. |
Get_Rack_Settings.sh Get_Rack_Settings.bat |
Returns the enclosure data for c-Class blade infrastructure. |
Get_SDCard_Status.sh Get_SDCard_Status.bat |
Provides information as to whether an SD card is connected to the server. Possible return values are "PRESENT", "Absent", and "UNKNOWN". |
Get_SNMP_IM.sh Get_SNMP_IM.bat |
Returns current SNMP and HPE Insight Manager security settings. |
Get_SSO_Settings.sh Get_SSO_Settings.bat |
Retrieves the HPE SIM Single Sign-On (SSO) settings. |
Get_Security_Msg.sh Get_Security_Msg.bat |
Retrieves the current security text message set in the iLO login banner. |
Get_Server_FQDN.sh Get_Server_FQDN.bat |
Obtains the fully qualified domain name from the host server. |
Get_Server_Name.sh Get_Server_Name.bat |
Obtains the host server name. |
Get_Supported_Boot_Mode.sh Get_Supported_Boot_Mode.bat |
Obtains the supported boot modes. |
Get_TPM_Status.sh Get_TPM_Status.bat |
Returns the status of the Trusted Platform Module (TPM). |
Get_UID_Status.sh Get_UID_Status.bat |
Returns the current state of the Unit ID LED of the host server. |
Get_User.sh Get_User.bat |
Returns data about the user account named in the GET_USER command. |
Get_VM_Status.sh Get_VM_Status.bat |
Obtains the status of the virtual media devices. |
Get_iLO_Log.sh Get_iLO_Log.bat |
Retrieves the event log. |
Hotkey_Config.sh Hotkey_Config.bat |
Configures a set of remote console hot keys for iLO. |
Import_Cert.sh Import_Cert.bat |
Imports a signed certificate into iLO. |
Import_LDAP_CA_Cert.sh Import_LDAP_CA_Cert.bat |
Imports an LDAP CA certificate on iLO 4 and iLO 5. |
Insert_Virtual_Media.sh Insert_Virtual_Media.bat |
Inserts a virtual media image. |
License.sh License.bat |
Applies the license key for the Integrated Lights-Out Advanced Pack. |
Mod_Encrypt_Settings.sh Mod_Encrypt_Settings.bat |
Configures the encryption settings for iLO. |
Mod_Federation_Group.sh Mod_Federation_Group.bat |
Modifies a federation group membership and associated privileges on iLO. |
Mod_Network_Settings.sh Script not available for Windows |
Configures the network settings for iLO. |
Mod_SNMP_IM_Settings.sh Mod_SNMP_IM_Settings.bat |
Configures the SNMP and HPE Insight Manager integration settings. |
Mod_SSO_Settings.sh Mod_SSO_Settings.bat |
Configures HPE SIM Single Sign-ON (SSO) settings on iLO. |
Mod_User.sh Mod_User.bat |
Modifies an existing password and privileges in the database of iLO users. |
Mod_VLAN.sh Mod_VLAN.bat |
Configures the iLO Shared Network Port with a user-defined VLAN ID. |
Mod_VM_Port_Settings.sh Mod_VM_Port_Settings.bat |
Configures the virtual media port functionality on iLO. |
RBSU_POST_IP.sh RBSU_POST_IP.bat |
Configures the management processor RBSU to display the IP address during POST |
Reset_RIB.sh Reset_RIB.bat |
Resets (reboots) the iLO. |
Reset_Server.sh Reset_Server.bat |
Power cycles (off and then on) the host server in which the iLO is operating. |
Send_Snmp_Test_Trap.sh Send_Snmp_Test_Trap.bat |
Sends a test SNMP trap to the alert destinations configured for the iLO. |
Set_AHS_Status.sh Set_AHS_Status.bat |
Enables or disables AHS logging. |
Set_Asset_Tag.sh Set_Asset_Tag.bat |
Sets the asset tag, which is limited to 32 characters. |
Set_Boot_Mode.sh Set_Boot_Mode.bat |
Sets the pending boot mode. |
Set_Brownout.sh Set_Brownout.bat |
Enables or disables brownout support. |
Set_FIPS_Enable.sh Set_FIPS_Enable.bat |
Enables FIPs mode. |
Set_Federation_Multicast_Options.sh Set_Federation_Multicast_Options.bat |
Sets the federation multicast options. |
Set_Host_APO.sh Set_Host_APO.bat |
Sets the automatic power on and power on delays settings of the server. |
Set_Host_Power.sh Set_Host_Power.bat |
Toggles the power of the host server in which iLO 4 or iLO5 is executing. |
Set_Host_Power_Saver.sh Set_Host_Power_Saver.bat |
Sets the Power Regulator feature on the host server in iLO. |
Set_Language.sh Set_Language.bat |
Sets the default language on iLO. |
Set_One_Time_Boot_Order.sh Set_One_Time_Boot_Order.bat |
Sets a one-time boot order. |
Set_Persistent_Boot_Order.sh Set_Persistent_Boot_Order.bat |
Sets a persistent boot order. |
Set_Persmouse_Status.sh Set_Persmouse_Status.bat |
Sets the persistent mouse and keyboard. |
Set_Power_Cap.sh Set_PowerCap.bat |
Sets the Power Cap feature on the host server. |
Set_Pwreg_Alert_Threshold.sh Set_Pwreg_Alert_Threshold.bat |
Sets the power alert threshold for iLO. |
Set_Security_Msg.sh Set_Security_Msg.bat |
Configures a security text message in the iLO login banner. |
Set_Server_Name.sh Set_Server_Name.bat |
Sets the host server name. |
Set_Virtual_Power_BTN.sh Set_Virtual_Power_BTN.bat |
Simulates a physical press of the server power button or simulates the physical press and hold of the server power button for a cold boot or warm boot. |
Shared_Network_Port.sh Shared_Network_Port.bat |
Configures the iLO device to pass network traffic on the shared host network port. |
Start_Directory_Test.sh Start_Directory_Test.bat |
Validates the configured directory settings. The directory test results are reset when directory settings are saved or when the directory tests are started. |
UID_Control.sh UID_Control.bat |
Toggles the UID on the host server. |
Update_Firmware.sh Update_Firmware.bat |
Updates the iLO firmware. |
Update_Language.sh Update_Language.bat |
Updates the language pack of HPE iLO. |
BIOS Attributes Examples
BIOS Attributes are configurable selections for the system BIOS. Configured attributes in iLO are transferred from a staging area for implementation into the current settings area upon the next system reboot.
Get the system asset tag BIOS attribute
Linux | Windows |
---|---|
Get_Asset_Tag.sh | Get_Asset_Tag.bat |
.\Get_Asset_Tag.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2020 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
ServerAssetTag="MySystem"
Logging session out.
Set the system asset tag BIOS attribute
Linux | Windows |
---|---|
Set_Asset_Tag.sh | Set_Asset_Tag.bat |
.\Set_Asset_Tag.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
Committing changes...
One or more properties were changed and will not take effect until system is reset.
Logging session out.
Set Server Name
Linux | Windows |
---|---|
Set_Server_Name.sh | Set_Server_Name.bat |
.\Set_Server_Name.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
Committing changes...
One or more properties were changed and will not take effect until system is reset.
Logging session out.
Changing BIOS Administrator Password
The Bios
type has two properties that both need to be used to change the administrator password, AdminPassword
and OldAdminPassword
. AdminPassword
is the new password you want to change to, and OldAdminPassword
is the current password you have.
NOTE
If there is no current password, you must include OldAdminPassword=""
If you perform a get
command to find the current AdminPassword
and OldAdminPassword
values, you will notice that their values are listed as None
, regardless of what their actual values are, as seen above.
In order to change the administrator password, you need to set the AdminPassword
(the new value you want) and the OldAdminPassword
(what the admin password was before), as well as include the –biospassword
flag if the system is iLO 4.
NOTE
The biospassword
value is the same as the OldAdminPassword
value.
After you've set the values for AdminPassword
and OldAdminPassword
, you need to commit your changes and reboot your server:
NOTE
To change the administrator password, AdminPassword
and OldAdminPassword
must be set in the same line.
Then when you log into the server again, the BIOS password will have been updated to the new value. However, you cannot see the values for AdminPassword
or OldAdminPassword
.
BIOS Boot Settings and Control
The following examples demonstrate methods to alter the boot configuration of the system.
NOTE
Redfish BIOS boot settings only support UEFI (Unified Extensible Firmware Interface). Legacy options are not supported, but may be available through configuration of BIOS attributes.
Get Current Boot Mode
Linux | Windows |
---|---|
Get_Boot_Mode.sh | Get_Boot_Mode.bat |
Get_Current_Boot_Mode.sh | Get_Current_Boot_Mode.bat |
.\Get_Boot_Mode.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
Logging session out.
Get Default Boot Order
Linux | Windows |
---|---|
Get_Persistent_Boot_Order.sh | Get_Persistent_Boot_Order.bat |
.\Get_Persistent_Boot_Order.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
PersistentBootConfigOrder=HD.SD.1.2
HD.EmbRAID.1.3
CD.RearUSB.4.2
Generic.USB.1.1
HD.EmbRAID.1.2
NIC.FlexLOM.1.1.Httpv4
NIC.FlexLOM.1.1.IPv4
NIC.FlexLOM.1.1.Httpv6
NIC.FlexLOM.1.1.IPv6
Logging session out.
Set Default Boot Order
Linux | Windows |
---|---|
Set_Persistent_Boot_Order.sh | Set_Persistent_Boot_Order.bat |
.\Set_Persistent_Boot_Order.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
Committing changes...
One or more properties were changed and will not take effect until system is reset.
Logging session out.
Set One Time Boot
Configure one time boot selection. A subsequent system reboot will return the boot settings to normal (property is automatically altered following POST by the BIOS provider)
Linux | Windows |
---|---|
Set_One_Time_Boot_Order.sh | Set_One_Time_Boot_Order.bat |
.\Set_One_Time_Boot_Order.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
Logging session out.
Get Supported Boot Mode
Linux | Windows |
---|---|
Get_Supported_Boot_Mode.sh | Get_Supported_Boot_Mode.bat |
.\Get_Supported_Boot_Mode.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
NAME
BootMode
DISPLAY NAME
Boot Mode
HELP TEXT
Use this option to select the boot mode of the system. Selecting
UEFI Mode configures the system to boot Unified Extensible
Firmware Interface (UEFI) compatible operating systems. Selecting
Legacy BIOS Mode configures the system to boot traditional
operating systems in Legacy BIOS compatibility mode. The operating
system can only boot in the mode in which it is installed. The
following options require booting in UEFI Mode: Secure Boot, IPv6
PXE Boot, boot > 2.2 TB Disks in AHCI SATA Mode, and Smart Array
SW RAID.
************************************************
WARNING
Boot Mode changes require a system reboot in order to take effect.
Changing the Boot Mode can impact the ability of the server to
boot the installed operating system. An operating system is
installed in the same mode as the platform during the
installation. If the Boot Mode does not match the operating system
installation, the system cannot boot. The following features
require that the server be configured for UEFI Mode: Secure Boot,
IPv6 PXE Boot, Boot > 2.2 TB Disks in AHCI SATA Mode, and Smart
Array SW RAID.
**********************************************
TYPE
Enumeration
READ-ONLY
False
POSSIBLE VALUES
Uefi
LegacyBios
Logging session out.
Set Boot Mode
.\Set_Boot_Mode.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
Committing changes...
Logging session out.
Configure system boot mode.
Linux | Windows |
---|---|
Set_Boot_Mode.sh | Set_Boot_Mode.bat |
BootOrder Command Examples
The bootorder
command is made up of a list of select, get,
and set commands. In order to demonstrate the order of these events,
the bootorder
command is manually stepped through one step at
a time to show that it only uses other provided commands to perform its task.
First the server is logged into, and the select
and get
commands are performed on the Bios
type and the BootMode
property,
respectively.
Next the select
and get
commands are used to retrieve the BootSourceOverrideSupported
property of the ComputerSystem
type.
NOTE
All of these operations, such as select
and get
,
are already implemented in the RESTful Interface Tool.
If the bootmode
retrieved earlier is UEFI, then the UefiTargetBootSourceOverrideSupported
property (one time boot settings) is retrieved with the get command. If the bootmode
is not UEFI,
then the one time boot settings would have been set to None
.
If this is not a one time boot or a continuous boot, and the disable boot
flag
has not been set, then the HpServerBootSettings
type is selected with
the select
command, and the PersistentBootConfigOrder
property is retrieved with the get
command.
Then, using this information along with the specified boot order provided
in the command, the new boot order is updated using the set
command.
After making all the changes to the boot order, the changes are finally committed with the commit command.
All of the commands shown here are executed the same way in the
actual bootorder
command, and are called in the same order to
execute the bootorder
command. You can write your own scripts
to combine commands just like bootorder did,
to use the provided commands in the RESTful Interface Tool for higher-level
functionality.
Resetting iLO
Linux | Windows |
---|---|
Reset_RIB.sh | Reset_RIB.bat |
.\Reset_RIB.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
After iLO resets the session will be terminated.
Please wait for iLO to initialize completely before logging in again.
This process may take up to 3 minutes.
A management processor reset is in progress.
Reboot the Server
Linux | Windows |
---|---|
Reset_Server.sh | Reset_Server.bat |
.\Reset_Server.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
After the server is rebooted the session will be terminated.
Please wait for the server to boot completely to login again.
Rebooting server in 3 seconds...
The operation completed successfully.
Logging session out.
Logging Examples
iLO Logs consist of Active Health System (AHS), Integrated Event Log (IEL), and an Integrated Management Log (IML). Logs can be retrieved for analysis or cleared to wipe the slate.
Set AHS Status
Linux | Windows |
---|---|
Set_AHS_Status.sh | Set_AHS_Status.bat |
.\Set_AHS_Status.bat 100.100..100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
------------------------------------------------------------------------------
Discovering data...Done
Logging session out.
Clear AHS Log
Linux | Windows |
---|---|
Clear_AHS_Data.sh | Clear_AHS_Data.bat |
.\Clear_AHS_Data.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2019 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
Logging session out.
Clear IML Log
Linux | Windows |
---|---|
Clear_IML.sh | Clear_IML.bat |
./Clear_IML.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2019 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
Logging session out.
Clear IEL Log
Linux | Windows |
---|---|
Clear_EventLog.sh | Clear_EventLog.bat |
./Clear_EventLog.bat 100.100.100.101 administrator password
word
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2019 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
Logging session out.
Directory Command Examples
HPE iLO based systems can be linked to domain controllers, usage of the the directory command can perform modification and tests against Lightweight Directory Access Protocol (LDAP) directory information services and Microsoft based active directory (AD) domain network controllers. The following examples are of interest:
Get LDAP CA Certificate State
.\Get_LDAP_CA_Cert_Status.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
Discovering data...Done
Oem=
Hpe=
Sessions=
LDAPAuthLicenced=True
Logging session out.
Start Directory Test
Linux | Windows |
---|---|
Start_Directory_Test.sh | Start_Directory_Test.bat |
.\Start_Directory_Test.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2020 Hewlett Packard Enterprise Development LP
------------------------------------------------------------------------------
Discovering data...Done
The operation completed successfully.
The operation completed successfully.
Logging session out.
Directory Test Abort
Linux | Windows |
---|---|
Abort_Directory_Test.sh | Abort_Directory_Test.bat |
.\Abort_Directory_Test.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2020 Hewlett Packard Enterprise Development LP
------------------------------------------------------------------------------
Discovering data...Done
The operation completed successfully.
Logging session out.
Directory Test Results
Linux | Windows |
---|---|
Get_Directory_Test_Results.sh | Get_Directory_Test_Results.bat |
.\Get_Directory_Test_Results.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2020 Hewlett Packard Enterprise Development LP
------------------------------------------------------------------------------
Discovering data...Done
The operation completed successfully.
Test: Directory Server DNS Name
------------------------
Status: Failed
Notes: Unable to resolve host name
Test: Ping Directory Server
------------------------
Status: Failed
Notes:
Test: Connect to Directory Server
------------------------
Status: Failed
Notes: Unable to connect to the directory server LDAP port within timeout. Verify directory server address.
Test: Connect using SSL
------------------------
Status: Failed
Notes: Unable to connect to directory server within timeout.
Test: Bind to Directory Server
------------------------
Status: NotRun
Notes:
Test: Directory Administrator login
------------------------
Status: NotRun
Notes:
Test: User Authentication
------------------------
Status: NotRun
Notes:
Test: User Authorization
------------------------
Status: Failed
Notes:
Test: Directory User Contexts
------------------------
Status: NotRun
Notes:
Test: LOM Object exists
------------------------
Status: NotRun
Notes:
Logging session out.
iLO User Management Examples
HPE iLO Management Account Users are able to perform a range of operations on a system based on permissions levels (or in HPE iLO 5 and later, based on Redfish predefined roles). This can vary from administrative level system changes to monitoring/read-only get requests, as well as a number.
Privileges Table (iLO 4 and 5)
Privileges | Description | iLO Support start |
---|---|---|
LoginPriv | Login | iLO 5 |
RemoteConsolePriv | Remote Console | iLO 4 |
VirtualPowerandResetPriv | Virtual Power and Reset | iLO 4 |
VirtualMediaPriv | Virtual Media | iLO 4 |
HostBIOSConfigPriv | Host Bios | iLO 5 |
iLOConfigPriv | Configure iLO Settings | iLO4 |
UserConfigPriv | Administer User Accounts | iLO4 |
HostNICConfigPriv | Host NIC | iLO5 |
HostStorageConfigPriv | Host Storage | iLO5 |
SystemRecoveryConfigPriv | System Recovery Set | iLO5 |
Predefined Roles Table (iLO 5 and later Only)
Predefined Roles | Privileges |
---|---|
Administrator | LoginPriv, RemoteConsolePriv, VirtualMediaPriv, VirtualPowerandResetPriv, HostBIOSConfigPriv, iLOConfigPriv, UserConfigPriv, HostNICConfigPriv, HostStorageConfigPriv, SystemRecoveryConfigPriv |
Operator | HostBIOSConfigPriv, HostNICConfigPriv, LoginPriv, HostStorageConfigPriv, RemoteConsolePriv, VirtualMediaPriv, VirtualPowerandResetPriv |
ReadOnly | LoginPriv |
Add User
Add a new iLO management user account. By default only the login privilege is provided (equivalent to read-only predefined role). Additional privileges (and roleIDs for iLO 5 systems) can be configured.
Linux | Windows |
---|---|
Add_User.sh | Add_User.bat |
.\Add_User.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2020 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Discovering data...Done
The operation completed successfully.
ilorest iloaccounts
iLO Account info:
[Id] UserName (LoginName):
Privileges
-----------------
[1] Administrator (Administrator):
ServiceAccount=False
HostNICConfigPriv=True
HostStorageConfigPriv=True
RemoteConsolePriv=True
iLOConfigPriv=True
VirtualMediaPriv=True
UserConfigPriv=True
HostBIOSConfigPriv=True
VirtualPowerAndResetPriv=True
LoginPriv=True
SystemRecoveryConfigPriv=True
[2] admin (admin):
ServiceAccount=False
HostNICConfigPriv=True
HostStorageConfigPriv=True
RemoteConsolePriv=True
iLOConfigPriv=True
VirtualMediaPriv=True
UserConfigPriv=True
HostBIOSConfigPriv=True
VirtualPowerAndResetPriv=True
LoginPriv=True
SystemRecoveryConfigPriv=False
[3] testUser (testAccount):
ServiceAccount=False
HostNICConfigPriv=False
HostStorageConfigPriv=False
RemoteConsolePriv=False
iLOConfigPriv=False
VirtualMediaPriv=False
UserConfigPriv=False
HostBIOSConfigPriv=False
VirtualPowerAndResetPriv=False
LoginPriv=True
SystemRecoveryConfigPriv=False
Logging session out.
Modify User Password
Reset an iLO management account password. The first example is specifically for the default Administrator account, the second for any subsequently. created account.
Linux | Windows |
---|---|
Administrator_reset_pw.sh | Administrator_reset_pw.bat |
Change_password.sh | Change_password.bat |
.\Administrator_reset_pw.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2020 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Discovering data...Done
Logging session out.
Get All User Info
Get all iLO management account user privileges.
Linux | Windows |
---|---|
Get_User.sh | Get_User.bat |
.\Get_User.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2020 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Discovering data...Done
Oem=
Hpe=
Privileges=
HostNICConfigPriv=True
HostStorageConfigPriv=True
RemoteConsolePriv=True
iLOConfigPriv=True
VirtualMediaPriv=True
UserConfigPriv=True
HostBIOSConfigPriv=True
VirtualPowerAndResetPriv=True
LoginPriv=True
SystemRecoveryConfigPriv=True
Logging session out.
Delete User
Completely remove an iLO management account.
Linux | Windows |
---|---|
Delete_User.sh | Delete_User.bat |
.\Delete_User.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2020 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Discovering data...Done
Logging session out.
Federation Group Examples
iLO Federation allows management of a collection of servers from a single iLO.
Add Federation Group
Add a new federation group by defining a federation name, key and associated privileges for the group.
Linux | Windows |
---|---|
Add_Federation_Group.sh | Add_Federation_Group.bat |
.\Add_Federation_Group.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2019 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Discovering data...Done
Logging session out.
iLOrest > ilofederation default
iLO Federation Id list with Privileges:
Name=DEFAULT:
HostNICConfigPriv=False
HostStorageConfigPriv=False
RemoteConsolePriv=False
iLOConfigPriv=False
VirtualMediaPriv=False
UserConfigPriv=False
HostBIOSConfigPriv=False
VirtualPowerAndResetPriv=False
LoginPriv=True
SystemRecoveryConfigPriv=False
Name=newfedname:
HostNICConfigPriv=False
HostStorageConfigPriv=False
RemoteConsolePriv=False
iLOConfigPriv=False
VirtualMediaPriv=False
UserConfigPriv=False
HostBIOSConfigPriv=False
VirtualPowerAndResetPriv=False
LoginPriv=False
SystemRecoveryConfigPriv=False
Get Federation Group
Obtain Federation Group Privileges.
Linux | Windows |
---|---|
Get_Federation_All_Groups_Info.sh | Get_Federation_All_Groups_Info.bat |
.\Get_Federation_Group.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Discovering data...Done
Privileges=
HostNICConfigPriv=False
HostStorageConfigPriv=False
RemoteConsolePriv=False
iLOConfigPriv=False
VirtualMediaPriv=False
UserConfigPriv=False
HostBIOSConfigPriv=False
VirtualPowerAndResetPriv=False
LoginPriv=True
SystemRecoveryConfigPriv=False
Logging session out.
Get Federation Multicast Options
Obtain Federation Group Multicast Settings. Settings are used in broadcast for iLO collective control.
Linux | Windows |
---|---|
Get_Federation_Multicast_Options.sh | Get_Federation_Multicast_Options.bat |
.\Get_Federation_Multicast_Options.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Discovering data...Done
Oem=
Hpe=
FederationConfig=
MulticastDiscovery=Enabled
IPv6MulticastScope=Site
MulticastAnnouncementInterval=600
MulticastTimeToLive=5
iLOFederationManagement=Enabled
Logging session out.
Delete a Federation Group
Deletion of a Federation Group
Linux | Windows |
---|---|
Delete_Federation_Group.sh | Delete_Federation_Group.bat |
.\Delete_Federation_Group.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2019 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Discovering data...Done
[200] The operation completed successfully.
The operation completed successfully.
Logging session out.
Virtual Media
HPE iLO provides a method to boot from virtualized media by providing a remote URL. This can include bootable virtualized USB, Floppy disk, CD/DVD ISO media.
Mount Virtual Media
Mount Virtual Media (To Be Updated)
Linux | Windows |
---|---|
Insert_Virtual_Media.sh | Insert_Virtual_Media.bat |
Eject Virtual Media
Eject virtual media from the system.
Linux | Windows |
---|---|
Eject_Virtual_Media.sh | Eject_Virtual_Media.bat |
.\Eject_Virtual_Media.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014, 2019 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Discovering data...Done
Logging session out.
iLO network configuration
HPE iLO is very flexible in term of network capabilities. It can communicate with remote systems using a dedicated physical network port or using a port shared with the operating system (OS). In band communication with OS is also possible (iLO 5 1.45 and later) with the host interface also called "Manager Virtual Network Interface" or Virtual NIC.
This section presents several examples for getting or setting iLO networking properties.
Get iLO networking properties
In addition to the following examples, the save --selector EthernetInterface.
global command
and the ethernet save
command
can be used to get iLO network properties. Refer to their
respective documentation sections for more detail and limitation.
IP configuration
The following example displays the Name
, the URI and the status
of the active iLO network port in JSON format.
TIP
The following example uses the list
command
to be able to retrieve
reserved attributes
like @odata.id
.
The get
command
discards such attributes.
ilorest login <ilo-ip> -u <ilo-user> -p password
ilorest list Name @odata.id Oem/Hpe/NICEnabled \
--selector EthernetInterface. \
--filter Name="Manager*" \
--filter Oem/Hpe/NICEnabled=true \
--json
ilorest logout
{
"@odata.id": "/redfish/v1/Managers/1/EthernetInterfaces/1/",
"Name": "Manager Dedicated Network Interface",
"Oem": {
"Hpe": {
"NICEnabled": true
}
}
}
The following example retrieves the IPv4 configuration
of the active iLO network port using the get
global command,
and the rawget
command.
NOTE
Refer the previous example to retrieve the
URI of the iLO active network port passed to
the rawget
command.
alias ilorest="ilorest --nologo"
ilorest login <ilo-ip> -u <ilo-user> -p password
ilorest get DHCPv4 NameServers IPv4Addresses \
--selector EthernetInterface. \
--filter Oem/Hpe/NICEnabled=true \
--json
ilorest logout
ilorest --nologo login <ilo-ip> -u <ilo-user> -p password
ilorest --nologo rawget --silent /redfish/v1/Managers/1/EthernetInterfaces/1 | \
jq '{"DHCPv4": .DHCPv4,
"IPv4Addresses": .IPv4Addresses,
"NameServers": .NameServers}'
{
"DHCPv4": {
"DHCPEnabled": true,
"UseDNSServers": true,
"UseDomainName": true,
"UseGateway": true,
"UseNTPServers": false,
"UseStaticRoutes": true
},
"IPv4Addresses": [
{
"Address": "192.168.0.5",
"AddressOrigin": "DHCP",
"Gateway": "192.168.1.1",
"SubnetMask": "255.255.252.0"
}
],
"NameServers": [
"192.168.2.1",
"192.168.2.3"
]
}
Network protocols
The following example runs a GitHub script to print the network protocols properties supported by the remote iLO.
Linux | Windows |
---|---|
Get_Network.sh | Get_Network.bat |
.\Get_Network.bat DL365G11-2-ILO.lj.lab administrator password
iLORest : RESTful Interface Tool version 5.2.0.0
Copyright (c) 2014-2024 Hewlett Packard Enterprise Development LP
--------------------------------------------------------------------------------
FQDN=DL365G11-2-ILO.lj.lab
HTTP=
Port=80
ProtocolEnabled=True
...= ..
Name=Manager Network Services
Oem=
Hpe=
AlertMailEmail=foo@bar.com
...
WebProxyConfiguration=
ProxyPassword=None
...=...
ProxyUserName=""
XMLResponseEnabled=True
SNMP=
Port=161
ProtocolEnabled=True
...=...
VirtualMedia=
Port=17988
ProtocolEnabled=True
Logging session out.
Finding iLO MAC address
This paragraph proposes several examples to retrieve the MAC addresses of the ethernet interfaces present in a system. Refer to the Get MAC address of a Management Controller paragraph for the detailed workflow of this operation.
NOTE
Although some network adapters are able to communicate with the Ethernet protocol,
the DMTF distinguishes the EthernetInterface
schema/data type
from the NetworkAdapter
schema/data type.
This paragraph treats only the EthernetInterface
data type.
TIP
The following example prints the MAC address of all ethernet interfaces present in a server, including system/OS interfaces.
TIP
Use the list
command if you want to print
reserved attributes like
@odata.id
, which contains the URI of the selected interface.
ilorest get Oem/Hpe/NICEnabled Name MACAddress \
--selector EthernetInterface. \
--json
[
{
"MACAddress": "00:62:0b:4d:fd:c3",
"Name": "vmnic0"
},
{
"MACAddress": "0A:CA:FE:F0:0D:04",
"Name": "Manager Virtual Network Interface"
},
{
"MACAddress": "5C:ED:8C:01:0D:7C",
"Name": "Manager Dedicated Network Interface",
"Oem": {
"Hpe": {
"NICEnabled": true
}
}
},
{
"MACAddress": "5C:ED:8C:01:0D:7D",
"Name": "Manager Shared Network Interface",
"Oem": {
"Hpe": {
"NICEnabled": false
}
}
},
{
"MACAddress": "00:62:0b:4d:fd:c2",
"Name": "vmnic3"
},
{
"MACAddress": "00:62:0b:4d:fd:c5",
"Name": "vmnic1"
},
{
"MACAddress": "00:62:0b:4d:fd:c4",
"Name": "vmnic2"
}
]
The following example prints the MAC address of iLO interfaces and their enablement.
alias ilorest="ilorest --nologo"
ilorest login <ilo-ip> -u <ilo-user> -p password
ilorest get Oem/Hpe/NICEnabled Name MACAddress \
--selector EthernetInterface. \
--filter Name="Manager*"
--json
ilorest logout
[
{
"MACAddress": "5C:ED:8C:01:0D:7C",
"Name": "Manager Dedicated Network Interface",
"Oem": {
"Hpe": {
"NICEnabled": true
}
}
},
{
"MACAddress": "0A:CA:FE:F0:0D:04",
"Name": "Manager Virtual Network Interface"
},
{
"MACAddress": "5C:ED:8C:01:0D:7D",
"Name": "Manager Shared Network Interface",
"Oem": {
"Hpe": {
"NICEnabled": false
}
}
}
]
The following example prints the MAC address of the active iLO interface using the get
global command
and the rawget
command.
alias ilorest="ilorest --nologo"
ilorest login <ilo-ip> -u <ilo-user> -p password
ilorest get Oem/Hpe/NICEnabled Name MACAddress \
--selector EthernetInterface. \
--filter Oem/Hpe/NICEnabled=true \
--json
ilorest logout
ilorest login <ilo-ip> -u <ilo-user> -p password
ilorest --nologo rawget --silent /redfish/v1/Managers/1/EthernetInterfaces/1 | \
jq '{"NICEnabled": .Oem.Hpe.NICEnabled,
"Name": .Name,
"MACAddress": .MACAddress}'
ilorest logout
{
"MACAddress": "5C:ED:8C:01:0D:7C",
"Name": "Manager Dedicated Network Interface",
"Oem": {
"Hpe": {
"NICEnabled": true
}
}
}
Set iLO networking properties
This section provides examples on how to change the iLO IP configuration.
WARNING
A change of the iLO network IP configuration requires an iLO reset.
A network misconfiguration will lead to an unreachable iLO after reset. Refer to the following paragraph for best practices before changing an iLO IP configuration.
Network configuration best practices
Setting erroneous iLO IP information leads to its unreachability. The following provides some best practices to perform prior to modify iLO IP modification.
These best practices are based on the fact that
the iLO active network port always has an IPv6 link-local Stateless Address Autoconfiguration
(SLAAC) address, starting with FE80::
.
Moreover, if the RFC7217Enabled
property has the default false
value,
the SLAAC link local
iLO address is derived from the MAC address.
As a consequence, if you save the MAC address (or the link-local SLAAC address), you will have a mean to access your iLO, regardless any IPv4 or IPv6 misconfiguration.
The following example retrieves the MAC and the iLO SLAAC link-local addresses of the active iLO network port in JSON format.
ilorest login <ilo-ip> -u <ilo-user> -p pasword
ilorest get MACAddress IPv6Addresses/Address --select EthernetInterface. \
--filter Oem/Hpe/NICEnabled="True" \
--json
{
"IPv6Addresses": [
{
"Address": "FE80::9618:82FF:FE71:A07B"
}
],
"MACAddress": "94:18:82:71:A0:7B"
}
TIP
Given a MAC address, you can calculate and display
the related IPv6 link local SLAAC address,
using the ipv6calc
utility
and the following command:
echo -n "fe80::" ; ipv6calc --quiet --in mac 94:18:82:71:A0:7B --out eui64
fe80::9618:82ff:fe71:a07b
To establish a connection to an IPv6 link-local address,
you need first to log into a system connected to the
same Local Area Network (LAN) as the targeted iLO.
Then, you need to identify the ethernet interface index
connected physically to
this LAN. On Linux this index is similar to eth0
, eno1
or eno5np0
. Use the ip address list
command identify this index.
On windows, you can use a PowerShell command similar to this one:
Get-NetAdapter | Where-Object { $_.Status -eq 'Up' } | Select-Object Name, InterfaceIndex
The following example comes from a Linux system. It verifies that
the interface connected on the same LAN as the targeted iLO supports
IPv6, by checking whether it has a link-local address
starting with FE80::
. Then, with iLOrest and cURL,
it retrieves the IPv4 configuration of the remote IPv6 link-local address.
# Retrieving IPv6 link local of interface connected to iLO target
# network.
ip -6 address list ens22f0 | grep -i fe80
inet6 fe80::262:bff:fe4e:1748/64 scope link noprefixroute
# Connect to remote iLO via its IPv6 link-local address
# Retrieve IPv4 properties of active iLO network port
ilorest login [FE80::9618:82FF:FE71:A07B%ens22f0] -u <ilo-user> -p password
ilorest select EthernetInterface.
ilorest get Ipv4Addresses --filter Oem/Hpe/NICEnabled="True" --json
{
"IPv4Addresses": [
{
"Address": "192.168.1.45",
"AddressOrigin": "Static",
"Gateway": "192.168.1.1",
"SubnetMask": "255.255.252.0"
}
]
}
# Connect to remote iLO via its IPv6 link-local address
# Retrieve IPv4 properties of active iLO network port
curl --insecure --silent --location \
--user <ilo-user>:password \
https://[FE80::9618:82FF:FE71:A07B%ens22f0]/redfish/v1/Managers/1/EthernetInterfaces/1 | \
jq '.IPv4Addresses[]'
{
"Address": "192.168.1.45",
"AddressOrigin": "Static",
"Gateway": "192.168.1.1",
"SubnetMask": "255.255.252.0"
}
TIPS
- Most of the browsers (i.e. Chromium or Gecko based) don't support IPv6 link local addresses.
-
SSH
supports connecting to IPv6 link local addresses, but without the[]
wrapper notation. See next example.
ssh ilo-user@FE80::9618:82FF:FE71:A07B%ens22f0 date
ilo-user@fe80::9618:82ff:fe71:a07b%ens22f0's password:
date
Aug 19 2024
Configure iLO IP addresses
This paragraph presents examples and pointers to examples changing the iLO IP configuration.
-
Refer to the last
example
of the
ethernet
command for configuring iLO using the--network_ipv4
parameter. -
Refer to the
rawpatch
examples section for an example configuring the iLO dedicated network port.
The following example loads a configuration file,
using the load --force_network_config
global command
and then resets the iLO.
The configuration file can be generated by the save
global command
or the ethernet save
iLO command
and then edited to set the iLO Shared Network port enabled and IPv4 properties.
NOTE
Read-only properties like Id
are automatically and silently discarded
during the load operation.
ilorest load --force_network_config -f load.json
ilorest iloreset
[
{
"Comments": {
"Manufacturer": "HPE",
"Model": "ProLiant DL360 Gen10",
"BIOSFamily": "U32",
"BIOSDate": "02/22/2024",
"SerialNumber": "MXQ73301YK",
"iLOVersion": "iLO 5 v3.04"
}
},
{
"EthernetInterface.v1_4_1.EthernetInterface": {
"/redfish/v1/Managers/1/EthernetInterfaces/2/": {
"Id": "1",
"InterfaceEnabled": true,
"AutoNeg": true,
"DHCPv4": {
"DHCPEnabled": false,
"UseDNSServers": false,
"UseDomainName": false,
"UseGateway": false,
"UseNTPServers": false,
"UseStaticRoutes": false
},
"IPv4StaticAddresses": [
{
"Address": "192.168.1.45",
"Gateway": "192.168.1.1",
"SubnetMask": "255.255.252.0"
}
],
"StatelessAddressAutoConfig": {
"IPv6AutoConfigEnabled": true
},
"StaticNameServers": [
"192.168.2.3",
"192.168.2.1",
"8.8.8.8",
"::",
"::",
"::"
]
}
}
}
]
The following example uses the ethernet load
command
to configure and enable the iLO Shared network port. Then, it resets the iLO.
The eth.json
configuration file has been generated with the ethernet save
iLO command
and then edited.
ilorest login <ilo-ip> -u <ilo-user> -p password
ilorest ethernet load --force_network_config
NIC Interface Enabled.
ilorest reset
A management processor reset is in progress.
[
{
"Comments": {
"Manufacturer": "HPE",
"Model": "ProLiant DL360 Gen10",
"BIOSFamily": "U32",
"BIOSDate": "02/22/2024",
"SerialNumber": "MXQ73301YK",
"iLOVersion": "iLO 5 v3.04"
}
},
{
"EthernetInterface.v1_4_1.EthernetInterface": {
"/redfish/v1/Managers/1/EthernetInterfaces/2/": {
"Id": "1",
"InterfaceEnabled": true,
"AutoNeg": true,
"DHCPv4": {
"DHCPEnabled": false,
"UseDNSServers": false,
"UseDomainName": false,
"UseGateway": false,
"UseNTPServers": false,
"UseStaticRoutes": false
},
"IPv4StaticAddresses": [
{
"Address": "192.168.1.45",
"Gateway": "192.168.1.1",
"SubnetMask": "255.255.252.0"
}
],
"StatelessAddressAutoConfig": {
"IPv6AutoConfigEnabled": true
},
"StaticNameServers": [
"192.168.2.3",
"192.168.2.1",
"8.8.8.8",
"::",
"::",
"::"
]
}
}
}
]
TIP
All of the above IP configuration methods require an iLO reset. One possibility to verify the iLO reset is finished, is to test the HTTPS port connectivity (port 443 by default). You could use the new IP address for that test. However, if an error has been introduced during the network configuration, you will never get any successful response.
However, if you test against the IPv6 link local address, you will always detect when the iLO is back online. Only then, you can test your new configuration.
From a system on the same LAN as the targeted iLO, the following example opens a session to the iLO and performs an iLO reset. Then it waits for the iLO to listen on its IPv6 link local address, on port 443 (HTTPS).
Once the iLO web service is back online, it tests the new IP configuration and exits the loop.
ilorest login FE80::9618:82FF:FE71:A07B%ens22f0 -u <ilo-user> -p password
ilorest iloreset
sleep 5 # Make sure the reset is started
echo -n "Waiting for iLO to reset ."
while true ; do
nc -vz FE80::9618:82FF:FE71:A07B%ens22f0 443 &>/dev/null
if [ $? -eq 0 ]; then
sleep 10 # Make sure iLO listens on new IP
nc -vz <new-ip> 443
break
fi
echo -n "."
sleep 5
done
echo " Done"
Setting Active iLO NIC
The following example activates the iLO shared network port using
a rawpatch
command against the Oem.Hpe.NICEnabled
extension property.
Then it resets the iLO.
WARNING
The set
global command fails to modify the iLO network configuration.
This is why you must use a rawpatch
command or
a ethernet load
command for this purpose.
TIP
Use the following command to retrieve the URI of the iLO shared network port:
ilorest list @odata.id --filter Name="Manager Shared*" --select EthernetInterface.
ilorest rawpatch Payload.json
ilorest iloreset
{
"/redfish/v1/Managers/1/EthernetInterfaces/2" : {
"Oem": {
"Hpe": {
"NICEnabled": true
}
}
}
}
{
"path": "/redfish/v1/Managers/1/EthernetInterfaces/2",
"body": {
"Oem": {
"Hp": {
"NICEnabled": true
}
}
}
}
The following example configures the iLO shared network port as active using a GitHub provide script.
Linux | Windows |
---|---|
Shared_Network_Port.sh | Shared_Network_Port.bat |
.\Shared_Network_Port.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Discovering data...Done
Logging session out.
Updating Firmware
Firmware updates can be submitted to iLO for self update or can be utilized for component level updates. On iLO 5 systems with integrated flash storage, these updates can be uploaded and staged for later use or stored, for recovery purposes (recovery install set).
Update Component
Update a language pack component.
Linux | Windows |
---|---|
Update_Language.sh | Update_Language.bat |
./Update_Language.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Discovering data...Done
A component with the same name (PICGen10_1.0.7s.fwpkg) has been found. Would you like to upload and overwrite this file? (y/n)y
The operation completed successfully.
Component PICGen10_1.0.7s.fwpkg uploaded successfully
Waiting for iLO UpdateService to finish processing the component
0 hour(s) 1 minute(s) 18 second(s)
Logging session out.
Trusted Platform Module (TPM)
Disabling the TPM
Above: When the server is rebooted, the TpmState
is changed from
PresentEnabled
to PresentDisabled
.
If you need to disable TPM on a group of servers, you can use a set of commands in RESTful Interface Tool. For example, if you are installing SPPs and OSs on bare-metal servers, and you need to disable TPM prior to starting installation.
Enabling the TPM
To enable the TPM, you can set the TpmState
to PresentEnabled
. See side example.
NOTE
When you are disabling or enabling TPM, depending on the TPM chip type on the
server, the TPM visibility might be Tpm2Visibility
or TpmVisibility
.
Raw commands Examples
Updating the HPE iLO license key
{
"path": "/rest/v1/Managers/1/LicenseService",
"body": {
"LicenseKey": "license key"
}
}
To update an iLO license key, use the rawpost
command. For more information,
refer to the
rawpost command.
The following is an example of the JSON to include when using the rawpost
command.
To delete an iLO license, use the rawdelete
command. For more information, see
rawdelete command.
The following is an example of the JSON to include when using the rawdelete
command:
rawdelete /rest/v1/Managers/1/LicenseService
Deploying a Service Pack for ProLiant (SPP)
{
"path": "/rest/v1/Managers/1/VirtualMedia/2",
"body": {
"Action": "InsertVirtualMedia",
"Target": "/OEM/Hp",
"Image": "https://xx.xxx.xxx.xxx:xx/spp.iso"
}
}
To deploy a SPP, use the rawpost
command. For more information, refer to the
rawpost command.
ilorest -v --nologo rawpost virtualmedia.json --url=xx.xx.xx.xxx --user=Admin --password=password
The following is an example of the JSON to include when using the
rawpost
command.
General Script Examples
Selecting and getting properties from a type
:: selectget.bat [URI] [USERNAME] [PASSWORD]
@echo off
set argC=0
for %%x in (%*) do Set /A argC+=1
if %argC% LSS 3 goto :failCondition
goto :main
:failCondition
@echo Usage:
@echo selectget.bat [URI] [USERNAME] [PASSWORD]
goto :EOF
:main
@echo *****************************************
@echo ************* Logging in... *************
@echo *****************************************
ilorest.exe login %1 -u %2 -p %3
@echo *****************************************
@echo ******* selecting Bios type... ********
@echo *****************************************
ilorest.exe select Bios.
@echo *****************************************
@echo ********** getting BootMode... **********
@echo *****************************************
ilorest.exe get
pause
This is a batch file that logs into a remote server, selects the Bios
type,
and gets the BootMode
value.
Saving and Loading a File Using File-Based Editing Mode
This is a file-based edit mode helper for HPE iLOrest.
-
Run to download selected type to a file called
ilorest.json
. -
Edit the
ilorest.json
file to make changes. - Press any key running batch program to continue with program, uploading the newly edited program to the server.
:: saveload.bat [SELECTOR] [FILENAME]
:: Specify a type with the SELECTOR tag, and
:: save to a file called FILENAME
@echo off
set argC=0
for %%x in (%*) do Set /A argC+=1
if %argC% LSS 2 goto :failCondition
goto :main
:failCondition
@echo Usage:
@echo saveload.bat [SELECTOR] [FILENAME]
@echo specify a type with the SELECTOR tag, and
@echo save to a file called FILENAME
goto :EOF
:main
ilorest.exe login
ilorest.exe save --selector=%1 --json -f %2
@echo Edit the file, then:
pause
ilorest.exe load -f %2
Miscellaneous
Configure iLO licensing, set unit identification lamp, hotkey configuration, obtaining system power metrics, and configuring the iLO's time zone.
iLO Licensing
Linux | Windows |
---|---|
License.sh | License.bat |
.\License.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Discovering data...Done
Logging session out.
UID Control
iLO based systems utilize a unit identification led which can be controlled to easily and uniquely identify a physical device. This script modifies the UID light state of HPE iLO 4 and iLO 5 only. Refer to the iLO 6 Changelog for details.
Linux | Windows |
---|---|
UID_Control.sh | UID_Control.bat |
.\UID_Control.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Discovering data...Done
Logging session out.
ilorest get IndicatorLED --selector=ComputerSystem.
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
Hotkey Configuration
Linux | Windows |
---|---|
Hotkey_Config.sh | Hotkey_Config.bat |
./Hotkey_Config.bat 100.100.100.101 administrator password
iLOrest : RESTful Interface Tool version 3.1
Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP
-------------------------------------------------------------------------------
The operation completed successfully.
Logging session out.
Setting iLO time zone
First we login and select the HpeiLODateTime.
type. If using Gen9, select the
HpiLODateTime
type instead. We then list
the TimeZoneList
.
Now scroll around looking for the time zone that is wanted. In the case of the example, we will be using US/Hawaii. Take note of the index associated with the Name(2 in the case of US/Hawaii).
Finally, we set
the Index to 2. Check the status to make sure the change
is queued and finally make sure to commit
to finalize the changes.
Getting Powermetric average
First login to the server.
Next select
the Power. type. Finally list powercontrol
.
The power metric average is represented by the AverageConsumedWatts
value.
Getting Encryption Settings
To get the encryption settings, first login to the server
Then select
the HpeSmartStorageArrayControllerCollection
type.
If on a Gen9
server select HpSmartStorageArrayControllerCollection
instead.
In the provided example, many of the resources for the encryption setting
are not available. If available there will be values of Name
, Model
,
SerialNumber
, EncryptionBootPasswordSet
,
EncryptionCryptoOfficerPasswordSet
, EncrpytionLocalKeyCacheEnabled
,
EncryptionMixedVolumesEnabled
,EncryptionPhyiscalDriveCount
,
EncryptionRecoveryParamsSet
,EncryptionStandaloneModeEnabled
,
and/or EncryptionUserPasswordSet
.
Retrieve SSD WearOut/WearStatus
Depending on the context, the life time status of SSD devices is called WearOut
or WearStatus. Redfish has standardized this property as
PredictedMediaLifeLeftPercent
in the
Drive schema.
For each drive in a server, the following example retrieves its URI, predicted media life left percent, physical locations and the HPE legacy WearStatus, from an HPE iLO6 based server with firmware 1.55 and latest UBMx firmware.
ilorest list "@odata.id" PredictedMediaLifeLeftPercent \
PhysicalLocation/PartLocation/ServiceLabel \
Oem/Hpe/WearStatus \
--json --select Drive.
[
{
"@odata.id": "/redfish/v1/Chassis/3/Drives/3/",
"Oem": {
"Hpe": {
"WearStatus": "OK"
}
},
"PhysicalLocation": {
"PartLocation": {
"ServiceLabel": "Embedded:Port=2:Box=2:Bay=3"
}
},
"PredictedMediaLifeLeftPercent": 100
},
{
"@odata.id": "/redfish/v1/Chassis/DE00D000/Drives/1",
"PhysicalLocation": {
"PartLocation": {
"ServiceLabel": "Slot=1:Port=1:Box=3:Bay=7"
}
},
"PredictedMediaLifeLeftPercent": 100.0
},
{
"@odata.id": "/redfish/v1/Chassis/DE00E000/Drives/5",
"PhysicalLocation": {
"PartLocation": {
"ServiceLabel": "Slot=14:Port=1:Box=1:Bay=2"
}
},
"PredictedMediaLifeLeftPercent": 100.0
},
{
"@odata.id": "/redfish/v1/Chassis/1/Drives/6/",
"Oem": {
"Hpe": {
"WearStatus": "Unknown"
}
},
"PhysicalLocation": {
"PartLocation": {
"ServiceLabel": "Embedded:Port=2:Box=2"
}
}
},
{
"@odata.id": "/redfish/v1/Chassis/1/Drives/1/",
"Oem": {
"Hpe": {
"WearStatus": "OK"
}
},
"PhysicalLocation": {
"PartLocation": {
"ServiceLabel": "Embedded:Port=4A:Box=3:Bay=5"
}
},
"PredictedMediaLifeLeftPercent": 100
},
{
"@odata.id": "/redfish/v1/Chassis/DE00E000/Drives/64518",
"PhysicalLocation": {
"PartLocation": {
"ServiceLabel": "Slot=14:Port=1:Box=1:Bay=6"
}
}
},
{
"@odata.id": "/redfish/v1/Chassis/2/Drives/1/",
"Oem": {
"Hpe": {
"WearStatus": "OK"
}
},
"PhysicalLocation": {
"PartLocation": {
"ServiceLabel": "Embedded:Port=4A:Box=3:Bay=5"
}
},
"PredictedMediaLifeLeftPercent": 100
},
{
"@odata.id": "/redfish/v1/Chassis/3/Drives/4/",
"Oem": {
"Hpe": {
"WearStatus": "Unknown"
}
},
"PhysicalLocation": {
"PartLocation": {
"ServiceLabel": "Embedded:Port=2:Box=2"
}
}
},
{
"@odata.id": "/redfish/v1/Systems/1/Storage/DE00F000/Drives/0",
"PhysicalLocation": {
"PartLocation": {
"ServiceLabel": "Slot=5:Port=1:Box=3:Bay=1"
}
},
"PredictedMediaLifeLeftPercent": 100.0
},
...
]