Redfish Commands for Compute Tray#

The following Redfish commands can be used to manage power operations for compute trays. You can use these commands in two ways:

  1. Using environment variables: Set the BMC IP address and credentials as environment variables before running the command (replace the IP address with your BMC’s IP address):

    export bmcip="192.168.1.100"
    

    Then run the curl commands as shown in the examples below.

  2. Manual substitution: Alternatively, you can manually replace ${bmcip} with your BMC’s IP address in each command.

The examples below use the environment variable approach with default credentials. Be sure to replace with your actual BMC credentials.

For advanced troubleshooting and support, see the Debug Log Collection section at the end of this document.

Power Control Operations#

This section provides commands for remotely controlling host power states and behaviors using Redfish and curl.

Virtual A/C Cycle#

Simulates a power drop (like pulling and reinserting the power cord) without physically disconnecting the power.

curl -k -u "root:openBmc" \
     -H "Content-Type: application/json" \
     -X POST \
     -d '{"ResetType":"AuxPowerCycleForce"}' \
     https://${bmcip}/redfish/v1/Chassis/BMC_0/Actions/Oem/NvidiaChassis.AuxPowerReset

Graceful Shutdown#

Initiates a clean shutdown of the host system, allowing the operating system to properly terminate all services and processes.

curl -s -k -u "root:openBmc" \
     -X POST \
     -d '{"ResetType": "GracefulShutdown"}' \
     https://${bmcip}/redfish/v1/Systems/System_0/Actions/ComputerSystem.Reset

Force Power Off#

Immediately cuts power to the host without waiting for the OS to shut down.

curl -s -k -u "root:openBmc" \
     -X POST \
     -d '{"ResetType": "ForceOff"}' \
     https://${bmcip}/redfish/v1/Systems/System_0/Actions/ComputerSystem.Reset

Power On Host#

Turns the host on.

curl -s -k -u "root:openBmc" \
     -X POST \
     -d '{"ResetType": "On"}' \
     https://${bmcip}/redfish/v1/Systems/System_0/Actions/ComputerSystem.Reset

Power Cycle Host#

Performs a full power cycle (off and then back on).

curl -s -k -u "root:openBmc" \
     -X POST \
     -d '{"ResetType": "PowerCycle"}' \
     https://${bmcip}/redfish/v1/Systems/System_0/Actions/ComputerSystem.Reset

Set Power Restore Policy: Always Off#

After power loss, the system will remain off when power is restored.

curl -s -k -u "root:openBmc" \
     -X PATCH \
     -d '{"PowerRestorePolicy": "AlwaysOff"}' \
     https://${bmcip}/redfish/v1/Systems/System_0

Set Power Restore Policy: Last State#

After power loss, the system will return to its previous state (on or off) when power is restored.

curl -s -k -u "root:openBmc" \
     -X PATCH \
     -d '{"PowerRestorePolicy": "LastState"}' \
     https://${bmcip}/redfish/v1/Systems/System_0

Set Power Restore Policy: Always On#

After power loss, the system will automatically power on when power is restored.

curl -s -k -u "root:openBmc" \
     -X PATCH \
     -d '{"PowerRestorePolicy": "AlwaysOn"}' \
     https://${bmcip}/redfish/v1/Systems/System_0

HMC/BMC Reset Operations#

This section provides commands for remotely resetting the Host Management Controller (HMC) and BMC using Redfish and curl. These operations are useful for troubleshooting, applying firmware updates, or recovering from certain system faults. Use these commands with caution, as some reset types may impact system availability or trigger a host restart.

Note

Use these reset commands with care. For most scenarios, prefer a graceful restart. Forced resets should only be used if the controller is unresponsive or as directed by support documentation.

HMC Graceful Restart#

Performs a controlled restart of the HMC, allowing it to shut down services cleanly before rebooting. This is the preferred method for most maintenance scenarios.

curl -k -u "root:openBmc" \
     -X POST \
     -d '{"ResetType": "GracefulRestart"}' \
     https://${bmcip}/redfish/v1/Managers/HGX_BMC_0/Actions/Manager.Reset

HMC Force Restart#

Immediately restarts the HMC without waiting for services to shut down gracefully.

Warning

This is not recommended except in emergency situations, as it may lead to a host restart or data loss.

curl -k -u "root:openBmc" \
     -X POST \
     -d '{"ResetType": "ForceRestart"}' \
     https://${bmcip}/redfish/v1/Managers/HGX_BMC_0/Actions/Manager.Reset

BMC Reset#

Performs a forced reset of the BMC. This operation is typically used after firmware updates or if the BMC becomes unresponsive. The following example includes a descriptive payload, which may be required for certain firmware update workflows.

curl -k -u "root:openBmc" \
     -X POST \
     -d '{"ResetType": "ForceRestart", "Description": "BMC bundle update curl"}' \
     https://${bmcip}/redfish/v1/Managers/BMC_0/Actions/Manager.Reset

Firmware and Image Management#

This section provides Redfish and curl commands for managing firmware updates and querying firmware image information on the compute tray. These operations are essential for keeping your system up to date and verifying the integrity and type of installed firmware.

Firmware Bundle Update#

Uploads and applies a firmware bundle to the system. The following command uses a multipart form upload to send the update file to the BMC.

curl -k -u "root:openBmc" --header 'Expect:' --location --request POST \
     "https://${bmcip}/redfish/v1/UpdateService/update-multipart" \
     -F 'UpdateParameters={"Targets":["/redfish/v1/Chassis/HGX_Chassis_0"],"ForceUpdate":true};type=application/json' \
     -F UpdateFile="@${FILENAME}"

Get Firmware Versions (with expand)#

Retrieves detailed firmware version information for all components, using the expand query to include nested inventory data.

curl -k -u "root:openBmc" -X GET \
     "https://${bmcip}/redfish/v1/UpdateService/FirmwareInventory?expand=.$levels=1" \
     | jq -r '.Members[] | [.Id, .Version] | @tsv' | column -t

Check BMC Firmware Signing Type#

Checks the signing type of the BMC firmware image, which helps confirm the authenticity and security of the installed firmware.

Note

Replace <active image slot> with the appropriate image slot identifier for your system.

curl -k -u "root:openBmc" -X GET \
     "https://${bmcip}/redfish/v1/Chassis/ERoT_BMC_0/Oem/NvidiaRoT/RoTProtectedComponents/BMC_0/Images/<active image slot>" \
     | grep SigningType

Check HMC Firmware Signing Type#

Checks the signing type of the HMC firmware image.

Note

Replace <active image slot> with the appropriate image slot identifier for your system.

curl -k -u "root:openBmc" -X GET \
     "https://${bmcip}/redfish/v1/Chassis/HGX_ERoT_BMC_0/Oem/NvidiaRoT/RoTProtectedComponents/HGX_BMC_0/Images/<active image slot>" \
     | grep SigningType

Write Protection#

This section provides commands for managing hardware write protection on the system using Redfish and curl. Write protection helps prevent unauthorized changes to critical system components.

Enabling Global Write Protect#

Enables hardware write protection for the system.

curl -s -k -u 'root:openBmc' -X PATCH \
     -d '{ "Oem":{"Nvidia":{"HardwareWriteProtectEnable":true}}}' \
     https://${bmcip}/redfish/v1/Chassis/Chassis_0

Disabling Global Write Protect#

Disables hardware write protection for the system.

curl -s -k -u 'root:openBmc' -X PATCH \
     -d '{ "Oem":{"Nvidia":{"HardwareWriteProtectEnable":false}}}' \
     https://${bmcip}/redfish/v1/Chassis/Chassis_0

Reading Global Write Protect#

Reads the current hardware write protection status.

curl -s -k -u 'root:openBmc' -X GET \
     https://${bmcip}/redfish/v1/Chassis/Chassis_0 | jq '.Oem.Nvidia.HardwareWriteProtectEnable'

Note

Enabling write protection is recommended after firmware updates or configuration changes to prevent accidental or unauthorized modifications.

Account Management#

This section provides commands for managing user accounts on the BMC using Redfish and curl. You can create new accounts or update passwords for existing accounts.

Creating a New Account#

Creates a new user account with specified username, password, and role.

curl -s -k -u "root:openBmc" \
     -X POST \
     -H "Content-Type: application/json" \
     -d '{"UserName": "newuser", "Password": "newPassword", "RoleId": "Operator"}' \
     https://${bmcip}/redfish/v1/AccountService/Accounts

Note

You can set the RoleId to “Administrator”, “Operator”, or “ReadOnly” based on the required access level for the user.

Updating Password for an Existing Account#

Updates the password for an existing account (e.g., the root user).

curl -k -X PATCH -H "Content-Type: application/json" \
     -u root:CURRENT_PASSWORD \
     https://${bmcip}/redfish/v1/AccountService/Accounts/root \
     --data '{ "Attributes": { "Password": "NEW_PASSWORD" } }'

Note

Replace CURRENT_PASSWORD with the current password for the account, and NEW_PASSWORD with the desired new password.

Event and Log Management#

This section provides commands for clearing event logs and managing system logs using Redfish and curl. These operations help maintain log clarity and support troubleshooting.

Clear HMC Event Log#

Clears all entries from the HMC event log. Use this command after reviewing or archiving log data to maintain log clarity and free up space.

curl -k -u "root:openBmc" -X POST \
     https://${bmcip}/redfish/v1/Systems/HGX_Baseboard_0/LogServices/EventLog/Actions/LogService.ClearLog

Clear BMC Event Log#

Removes all entries from the BMC event log. This is useful for resetting the log after resolving issues or before starting new troubleshooting steps.

curl -k -u "root:openBmc" -X POST \
     https://${bmcip}/redfish/v1/Systems/System_0/LogServices/EventLog/Actions/LogService.ClearLog

Reset and Factory Defaults#

This section provides commands for restoring system components to their factory default state. These operations are useful for recovery, troubleshooting, or preparing a system for redeployment.

Reset BMC to Factory Defaults#

Restores the BMC to its original factory settings. All user configurations and custom settings will be lost. Use this if the BMC is unresponsive or you need to clear all settings.

curl -k -u "root:openBmc" -X POST \
     https://${bmcip}/redfish/v1/Managers/BMC_0/Actions/Manager.ResetToDefaults \
     -d '{"ResetToDefaultsType": "ResetAll"}'

Reset HMC to Factory Defaults#

Resets the Host Management Controller (HMC) to its factory default configuration. This will remove all custom settings and user data from the HMC.

curl -k -u "root:openBmc" -X POST \
     https://${bmcip}/redfish/v1/Managers/HGX_BMC_0/Actions/Manager.ResetToDefaults \
     -d '{"ResetToDefaultsType": "ResetAll"}'

Clear the eMMC (This Will Clear the Journal)#

Securely erases the eMMC storage, including the system journal. Use this operation with caution, as it will permanently delete all data stored on the eMMC.

curl -k -u "root:openBmc" -X POST \
     https://${bmcip}/redfish/v1/Managers/HGX_BMC_0/Actions/Oem/eMMC.SecureErase

Reset SBIOS to Defaults#

Restores the system BIOS (SBIOS) settings to their factory defaults. This can help resolve configuration issues or prepare the system for a fresh deployment.

curl -k -u "root:openBmc" -X POST \
     https://${bmcip}/redfish/v1/Systems/System_0/Bios/Actions/Bios.ResetBios

Serial Over LAN and Host Console Access#

This section provides commands for accessing the host system console remotely using Serial Over LAN (SOL) or SSH. These methods are useful for troubleshooting, remote management, and system recovery.

IPMI - Host SOL Access#

Establishes a Serial Over LAN (SOL) session to the host using IPMI. This allows you to interact with the system console remotely, even if the OS is not running.

ipmitool -C 17 -H ${bmcip} -U root -P OpenBmc -I lanplus sol activate

To exit the SOL session, use ~. (tilde followed by a period).

SSH - Host SOL Access#

Provides SSH access to the host’s SOL interface. This is an alternative to IPMI SOL for remote console access.

ssh root@${bmcip} -p 2200

Network Controls#

This section provides commands for managing network protocol access on the BMC, including enabling or disabling IPMI and understanding credential behavior after a factory reset.

Disable IPMI#

Disables the IPMI protocol on the BMC. This is recommended for enhanced security if IPMI remote management is not required.

curl -s -k -u 'root:openBmc' -X PATCH \
     https://${bmcip}/redfish/v1/Managers/BMC_0/NetworkProtocol \
     -d '{ "IPMI": {"ProtocolEnabled": false} }'

BMC Credentials After Factory Reset#

After a BMC factory reset, the default username and password are admin/admin. You will be prompted to change the username and password at the first login to the system. Any BMC factory reset will restart this sequence.

Note

For security, always change the default credentials immediately after a factory reset.

Debug Log Collection#

When troubleshooting complex issues or working with NVIDIA support, it is often necessary to collect detailed debug logs from the compute tray. The preferred method for capturing and packaging these logs is to use the NVDEBUG tool, which gathers all relevant system, firmware, and event logs into a single archive for analysis.

Capturing Debug Logs with NVDEBUG#

  1. Access the BMC or host system where NVDEBUG is available. Ensure you have the necessary permissions to run diagnostic tools.

  2. Run the NVDEBUG tool according to your system’s documentation. The typical command is:

    nvdebug --collect --output /path/to/save/debug-logs.tar.gz
    

    Replace /path/to/save/debug-logs.tar.gz with your desired output location.

  3. Transfer the log archive to your support contact or upload it as instructed by NVIDIA support.

Note

NVDEBUG automatically collects a comprehensive set of logs, including BMC event logs, firmware versions, hardware inventory, and system health data. This is the recommended approach for efficient and complete log collection.