Connecting to HPE Moonshot using ILORest

HPE Moonshot 1500 Chassis

I have been busy implementing a virtual desktop environment using HPE Moonshot. Moonshot is a server chassis that holds 45 server cartridges with up to 180 server nodes and is an ideal platform for a hosted desktop infrastructure.

One way to manage and automate HPE servers is with their RESTful Interface Tool. It connects to the ILO of a server and allows you to either configure your servers interactively or within a script. In addition, it provides a file-based mode which lets you export the configuration to a JSON file which can be edited offline and imported back again. This last method makes it easy to view and edit the configuration of your servers.

You can get the installation package from HPE’s website. It is installed in the %ProgramFiles% directory by default and creates a start menu item. Unfortunately, it requires local admin permissions to run as it writes the log file to the same directory. Although you can change the location of the log file in the redfish.conf file.

Connect to your cartridge ILO using this command:

ilorest.exe login 'chassismgr:cartridgeport' -u 'username' -p 'password'

Export the configuration using this command:

ilorest.exe save --selector=Bios. --filename=bios.json

The output in the bios.json file will look like this:

 "Comments": {
 "Manufacturer": "HPE", 
 "Model": "ProLiant m710x Server Cartridge", 
 "BIOSFamily": "H07", 
 "BIOSDate": "10/25/2016", 
 "SerialNumber": "<serial>"
 "HpBios.1.2.0": {
 "/rest/v1/systems/1/bios/Settings": {
 "AcpiRootBridgePxm": "Enabled", 
 "AdjSecPrefetch": "Enabled", 
 "AdminEmail": "", 
 "AdminName": "", 
 "AdminOtherInfo": "", 
 "AdminPassword": null, 
 "AdminPhone": "", 
 "AsrStatus": "Enabled", 
 "AsrTimeoutMinutes": "10", 
 "AssetTagProtection": "Locked", 
 "AutoPowerOn": "AlwaysPowerOff", 
 "BootOrderPolicy": "RetryIndefinitely", 
 "CollabPowerControl": "Enabled", 
 "ConsistentDevNaming": "LomsOnly", 
 "CustomPostMessage": "", 
 "DaylightSavingsTime": "Disabled", 
 "DcuIpPrefetcher": "Enabled", 
 "DcuStreamPrefetcher": "Enabled", 
 "Dhcpv4": "Enabled", 
 "DynamicPowerResponse": "Fast", 
 "EmbNicEnable": "Enabled", 
 "EmbSata1Enable": "Enabled", 
 "EmbVideoConnection": "Auto", 
 "EmbeddedGPUPassthroughMode": "Disabled", 
 "EmbeddedSata": "Ahci", 
 "EmbeddedUefiShell": "Enabled", 
 "EmsConsole": "Disabled", 
 "EnergyPerfBias": "BalancedPerf", 
 "EraseUserDefaults": "No", 
 "ExtendedMemTest": "Disabled", 
 "F11BootMenu": "Enabled", 
 "GpuApertureSize": "Gpu256MB", 
 "HwPrefetcher": "Enabled", 
 "IntelDmiLinkFreq": "Auto", 
 "IntelProcVtd": "Enabled", 
 "IoNonPostedPrefetching": "Enabled", 
 "Ipv4Address": "", 
 "Ipv4Gateway": "", 
 "Ipv4PrimaryDNS": "", 
 "Ipv4SecondaryDNS": "", 
 "Ipv4SubnetMask": "", 
 "Ipv6Duid": "Auto", 
 "MaxMemBusFreqMHz": "2133", 
 "MaxPcieSpeed": "MaxSupported", 
 "MemFastTraining": "Enabled", 
 "MinProcIdlePkgState": "C6Retention", 
 "MinProcIdlePower": "C6", 
 "NetworkBootRetry": "Enabled", 
 "NicBoot1": "NetworkBoot", 
 "NicBoot2": "Disabled", 
 "NmiDebugButton": "Enabled", 
 "NumaGroupSizeOpt": "Clustered", 
 "OldAdminPassword": null, 
 "OldPowerOnPassword": null, 
 "PciBusPadding": "Enabled", 
 "PostF1Prompt": "Delayed20Sec", 
 "PowerButton": "Enabled", 
 "PowerOnDelay": "None", 
 "PowerOnLogo": "Enabled", 
 "PowerOnPassword": null, 
 "PowerProfile": "BalancedPowerPerf", 
 "PowerRegulator": "DynamicPowerSavings", 
 "PreBootNetwork": "Auto", 
 "ProcAes": "Enabled", 
 "ProcCoreDisable": 0, 
 "ProcHyperthreading": "Enabled", 
 "ProcNoExecute": "Enabled", 
 "ProcTurbo": "Enabled", 
 "ProcVirtualization": "Enabled", 
 "ProcX2Apic": "Enabled", 
 "ProductId": "833105-B21", 
 "RedundantPowerSupply": "BalancedMode", 
 "RestoreDefaults": "No", 
 "RestoreManufacturingDefaults": "No", 
 "SataSecureErase": "Disabled", 
 "SaveUserDefaults": "No", 
 "SecureBootStatus": "Disabled", 
 "SerialConsoleEmulation": "Vt100Plus", 
 "SerialNumber": "<serial>", 
 "ServerAssetTag": " ", 
 "ServerName": "", 
 "ServerOtherInfo": "", 
 "ServerPrimaryOs": "", 
 "ServiceEmail": "", 
 "ServiceName": "", 
 "ServiceOtherInfo": "", 
 "ServicePhone": "", 
 "TimeFormat": "Utc", 
 "TimeZone": "Utc0", 
 "Tpm2Operation": "NoAction", 
 "Tpm2Ppi": "Disabled", 
 "Tpm2Visibility": "Hidden", 
 "TpmBinding": "Disabled", 
 "TpmState": "PresentDisabled", 
 "TpmType": "Tpm20", 
 "TpmUefiOpromMeasuring": "Enabled", 
 "UefiOptimizedBoot": "Enabled", 
 "UefiPxeBoot": "Auto", 
 "UefiShellBootOrder": "Disabled", 
 "UefiShellStartup": "Disabled", 
 "UefiShellStartupLocation": "Auto", 
 "UefiShellStartupUrl": "", 
 "UrlBootFile": "", 
 "UsbBoot": "Enabled", 
 "UsbConsoleRedirection": "Enabled", 
 "UsbControl": "UsbEnabled", 
 "UtilityLang": "English", 
 "VideoOptions": "BothVideoEnabled", 
 "VirtualInstallDisk": "Disabled", 
 "VirtualSerialPort": "Com1Irq4", 
 "VlanControl": "Disabled", 
 "VlanId": 0, 
 "VlanPriority": 0, 
 "WakeOnLan": "Enabled"

To test the load command, alter the bios.json file by adding a value to an empty field.

Moonshot BIOS Json file

After that execute the following command to load the altered configuration file back to the server.

ilorest.exe load --filename=input.json

The ILO session will timeout eventually, but you can close the open session manually with this command:

ilorest.exe logout

One thought on “Connecting to HPE Moonshot using ILORest

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s