Fujitsu iRMC Redfish Examples

I got an escalation from our second level support that a customer would like to get MAC address information on a server via Redfish. This can be done with the FirmwareInventory endpoint. I can show the example, but I think it would be good to show some other examples for basic tasks as well so that you can use Fujitsu iRMC Redfish APIs with your scripts/applications.

Fujitsu iRMC Redfish API Examples

  • Check the server power status
  • $ curl -s -k -u admin:admin -H"Content-type: application/json" -X GET https://irmc_address/redfish/v1/Systems/0/ |jq -r '.PowerState'
    On 
    
  • Power on the server
  • $ curl -k -u admin:admin -H"Content-type: application/json" -X POST https://irmc_address/redfish/v1/Systems/0/Actions/Oem/FTSComputerSystem.Reset --data-binary $'{"FTSResetType":"PowerOn"}'
    
  • Power off the server
  • $ curl -k -u admin:admin -H"Content-type: application/json" -X POST https://irmc_address/redfish/v1/Systems/0/Actions/Oem/FTSComputerSystem.Reset --data-binary $'{"FTSResetType":"PowerOff"}'
    
  • Reset the server
  • $ curl -k -u admin:admin -H"Content-type: application/json" -X POST https://irmc_address/redfish/v1/Systems/0/Actions/Oem/FTSComputerSystem.Reset --data-binary $'{"FTSResetType":"ImmediateReset"}'
    
  • Reset iRMC
  • $ curl -k -u admin:admin -H"Content-type: application/json" -X POST https://irmc_address/redfish/v1/Managers/iRMC/Actions/Manager.Reset
    
  • Check BIOS and iRMC Firmware version
  • $  curl -s -k -u admin:admin -H"Content-type: application/json" -X GET https://irmc_address/redfish/v1/Systems/0/Oem/ts_fujitsu/FirmwareInventory |jq '{SystemBIOS, BMCFirmware, SDRRVersion}'
    {
      "SystemBIOS": "V5.0.0.12 R1.18.0 for D3383-A1x",
      "BMCFirmware": "1.25P",
      "SDRRVersion": "3.38"
    }
    
  • Get the server model name and serial number
  • $ curl -s -k -u admin:admin -H"Content-type: application/json" -X GET https://irmc_address/redfish/v1/Systems/0/ |jq '{Model, SerialNumber}'
    {
      "Model": "PRIMERGY RX2530 M4",
      "SerialNumber": "MABQ000000"
    }
    
  • Update BIOS
  • $ curl -k -u admin:admin –H "Content-type: multiplart/form-data" –H "Accept: application/json" -X POST -F "data=@RX2530M4_R1180.UPC" https://irmc_address/redfish/v1/Systems/0/Bios/Actions/Oem/FTSBios.BiosUpdate
    
  • Update iRMC Firmware
  • $ curl -k -u admin:admin –H "Content-type: multiplart/form-data" –H "Accept: application/json" -X POST -F "data=@RX2530M4_125Psdr0338.bin" https://irmc_address/redfish/v1/Managers/iRMC/Actions/Oem/FTSManager.FWUpdate
    
  • Generate and download iRMC System Report
  • When you have a hardware problem and Fujitsu support asks for a system report, you can use the following API to download the report, and send it to Fujitsu support.
    $ curl -k -u admin:admin –H "Accept: application/json" -X POST https://irmc_address/redfish/v1/Systems/0/Actions/Oem/FTSComputerSystem.SystemReportGenerate
    $ curl -k -u admin:admin –H "Accept: application/json" -H "Content-Type: application/octet-stream" -X POST https://irmc_address/redfish/v1/Systems/0/Actions/Oem/FTSComputerSystem.SystemReportDownload --output iRMCSystemReport.xml
    
  • List MAC addresses on the server
  • $ curl -s -k -u admin:admin -H"Content-type: application/json" -X GET https://irmc_ip_address/redfish/v1/Systems/0/Oem/ts_fujitsu/FirmwareInventory/NIC |jq '.Ports[] | {SlotId, PortId, ManufacturerMacAddress}'
    {
      "SlotId": 0,
      "PortId": 0,
      "ManufacturerMacAddress": "90:1b:0e:ad:11:6f"
    }
    {
      "SlotId": 0,
      "PortId": 1,
      "ManufacturerMacAddress": "90:1b:0e:ad:11:70"
    }
    {
      "SlotId": 11,
      "PortId": 0,
      "ManufacturerMacAddress": "3c:fd:fe:a1:6e:c4"
    }
    {
      "SlotId": 11,
      "PortId": 1,
      "ManufacturerMacAddress": "3c:fd:fe:a1:6e:c5"
    }
    

Reference

Fujitsu Custom ESXi 6.5 U1 Released

Fujitsu has released the latest ESXi 6.5 custom image (ESXi 6.5 U1 Build 7967591, Fujitsu v412-1). You can download the ISO image and the offline bundle from My VMware.

Fujitsu PRIMERGY: Meltdown & Spectre BIOS Updates

Fujitsu released BIOS updates for Meltdown and Spectre issues for most of the PRIMERGY models. This blog entry will provide a list for download links to the BIOS download pages just for the convenience.

PRIMERGY BX-series
PRIMERGY CX-series
(For CX2550 M1/CX2570 M1, BIOS R1.34.0 has the fix for the vulnerabilities, but as of 2018/04/12, the latest is R1.35.0, so the links are made to R1.35.0)
PRIMERGY RX-series
PRIMERGY TX-series

Enabling Redfish in Fujitsu iRMC S4

Fujitsu iRMC S4 Firmware 9.0x or later can now support Redfish (iRMC S5 supports Redfish from the initial version). However when you update iRMC S4 firmware from an older version like 8.86F to a new version like 9.08F, Redfish is enabled, but the user access setting is set to "No Access" by default. Therefore no users can access Redfish API endpoints remotely even by the admin user.

The access mode setting can be changed from "No Access" to other modes like "Administrator" in iRMC S4 Web GUI. You just need to go to User Management --> iRMC S4 User --> select a user --> Check "Redfish Enabled" and change RedfishRole from "No Access" to other role, and click Apply to save the changes.

For those who want to automate these manual steps by a script, you can do that with the Fujitsu SCCI commands. The SCCI code for enabling Redfish is "0x1D80", and the code for the Redfish role is "0x1D81".

For example, if you want to enable Redfish for the admin user with the "Administrator" role, create a request XML file like this:

$ vi enable_redfish_and_set_admin_role.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CMDSEQ>
<!-- 0: disable, 1: enable -->
<CMD Context="SCCI" OC="ConfigSpace" OE="1D80" OI="0" Type="SET">
  <DATA Type="xsd::integer">1</DATA>
</CMD>
<!-- 0: no access, 1: operator, 2: administrator, 3: read only -->
<CMD Context="SCCI" OC="ConfigSpace" OE="1D81" OI="0" Type="SET">
  <DATA Type="xsd::integer">2</DATA>
</CMD>
</CMDSEQ>

Then send the file to iRMC config interface.

$ curl -u admin:admin --data @enable_redfish_and_set_admin_role.xml http://<iRMC IP address>/config
<?xml version="1.0" encoding="UTF-8"?>
<Status>
<Value>0</Value>
<Severity>Information</Severity>
<Message>No Error</Message>
</Status>

If you don't want to create a separate XML file, you can embed the SCCI request in your shell script.

$ vi enable_redfish.sh
#!/bin/sh

iRMCUSR=admin
iRMCPWD=admin
iRMCIP=192.168.10.3

curl -u ${iRMCUSR}:${iRMCPWD} http://${iRMCIP}/config \
--data @- <<EOF
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CMDSEQ>
<CMD Context="SCCI" OC="ConfigSpace" OE="1D80" OI="0" Type="SET">
  <DATA Type="xsd::integer">1</DATA>
</CMD>
<CMD Context="SCCI" OC="ConfigSpace" OE="1D81" OI="0" Type="SET">
  <DATA Type="xsd::integer">2</DATA>
</CMD>
</CMDSEQ>

EOF
Then run it.
$ sh ./enable_redfish.sh
<?xml version="1.0" encoding="UTF-8"?>
<Status>
<Value>0</Value>
<Severity>Information</Severity>
<Message>No Error</Message>
</Status>

Now you can use Redfish API for iRMC S4 remotely.

$ curl -k -u admin:admin https://<iRMC IP address>/redfish/v1

Install Ubuntu 16.04 on Fujitsu PRIMERGY using onboard SATA RAID (UEFI)

This post will describe how to install Ubuntu onto a virtual disk under the onboard SATA RAID (MegaSR) on Fujitsu PRIMERGY in UEFI mode. I know Ubuntu is not supported on PRIMERGY officially. Fujitsu only says it is tested with a specific configuration, so some configurations work, and some don't.

In this example, I use a PRIMERGY CX2550 M1 server with four HDDs in RAID 0 using the onboard SATA Software RAID (MegaSR) in UEFI mode, and Ubuntu OS is Ubuntu Server 16.04 LTS. I use PRIMERGY M1, but the procedure would work on PRIMERGY M2 and M4 servers in the same way as far as the megasr driver supports the chipset.

  1. (For M1/M2 servers) Change the boot mode from Legacy to UEFI in BIOS, and reboot
  2. To do this, bring up BIOS Setup Utility, and go to Advanced -> CSM Configuration. Then disable Launch CSM. Save the change and reset the server.
  3. Create a virtual drive
  4. Bring up the BIOS setup utility again, and go to Advanced -> LSI Software RAID Configuration Utility (SATA). Go to Virtual Drive Management -> Create Configuration to create a virtual drive. Once it is created, save the change and reset the server.
    If the SATA mode is set to AHCI, change it to RAID first. Otherwise you will not see the configuration menu.
  5. Boot from Ubuntu installation image
  6. Boot the serer from Ubuntu Installation media. You can mount an ISO image to iRMC AVR console if you have advanced license installed. Before starting the installer, add "modprobe.blacklist=ahci" to the kernel option line so that the installer does not load the ahci driver.
  7. Open a terminal and copy the megasr.ko module to the installer
  8. Press <Ctrl>+<Alt>+<F2> to bring up a shell, and copy the megasr.ko file to the installer.
  9. Load the megasr driver
  10. Install the megasr module to the installer, and load it to the kernel so that the installer can see the virtual drive as a MegaSR device instead of dmraid or mdadm.
    # mkdir /lib/modules/4.4.0-87-generic/updates
    # cp megasr.ko /lib/modules/4.4.0-87-generic/updates
    # depmod -a
    # modprobe megasr
    
    If you create a udeb packaage for megasr, you don't have to do this as the installer can automatically load it from the driver image. You need to create a proper driver image to do this though (create the OEMDRV label for the vfat partition, and place the udeb package to like /driver-injection-disk/Ubuntu-drivers/xenial).
  11. Continue the installation
  12. Go back to the installer screen by pressing <Ctrl>+<Alt>+<F1>, and continue the installation. When you get to the partitioning step, you will see a MegaSR device.
  13. Rebuild the initramfs image before reboot
  14. When the installer says it's completed, press <Ctrl>+<Alt>+<F2> to the shell before rebooting the server. Copy the megasr module to the target virtual disk, and recreate the initramfs image.
    # mkdir /target/lib/modules/4.4.0-87-generic/updates
    # cp megasr.ko /target/lib/modules/4.4.0-87-generic/updates
    # chroot /target
    # depmod -a
    # echo "blacklist ahci" >> /etc/modprobe.d/blacklist.conf
    # update-initramfs -u -v
    
    If you craete a driver deb package for megasr, you don't have to do this step as the installer automatically installs it to the target device.
  15. Reboot the server
  16. Go back to the installer screen by <Ctrl>+<Alt>+<F1>, and reboot the server.
  17. Log in to Ubuntu
  18. Now you can use Ubuntu as normal. You can see the MegaSR device under /proc/scsi/scsi.
    # cat /proc/scsi/scsi
    Attached devices:
    Host: scsi0 Channel: 02 Id: 00 Lun: 00
      Vendor: LSI      Model: MegaSR           Rev: 1.0
      Type:   Direct-Access                    ANSI  SCSI revision: 05
    
    If you would like to install ServerView RAID Manager, you can install it so that you can manage the virtual drive with the GUI or the amCLI command.

I used the UEFI mode in this example as the virtual drive is greater than 2TB, but if you are using a virtual drive less than 2TB, you could do the same in legacy mode. Please note that PRIMERGY M4 does not support onboard software RAID in legacy, so if your system is PRIMERGY M4, you have to use UEFI anyway.

Please do not ask me for the megasr driver and ServerView RAID Manager package for Ubuntu as I am not authorized to provide them. Please ask Fujitsu support to obtain the files.

Updating PRIMERGY M1/M2 servers LoM CNA firmware on Linux

Most of Fujitsu PRIMERGY BX/RX M1 and M2 servers use Emulex CNA as LoM. To update the LoM CNA firmware, Fujitsu recommends using the firmware update ISO, firmware update ASP (Autonomous Support Package), Emulex OCM, ServerView Update Manager, or ServerView Update Manager Express. Each has pros and cons. My focus is to see if a mass update is possible and updates can be done without vendor specific tools. ServerView Update Manager and Emulex OCM support mass updates. If there are tens or hundreds of PRIMERGYs that require a CNA firmware update, either one would be the way to go, but both require some sort of vendor specific agents/tools. Other methods are for a single server update. Well, technically the ASP method can be used for a mass update, but it sill requires the Emulex tool as a prerequisite. In this entry, I will explain another way to update the CNA LoM firmware in Linux. This is not documented in Fujitsu's manuals, so I think this is not supported by the vendor. You can do this, but at your own risk. Here are the steps.
  1. Download the firmware image from Fujitsu's download site (http://support.ts.fujitsu.com/).
  2. Extract the firmware image (e.g. oc14-11.1.172.23.ufi) from the download file.
  3. Place the firmware file under /lib/firmware.
  4. # cp oc14-11.1.172.23.ufi /lib/firmware
  5. Check the current firmware version.
  6. # ethtool -i <interface name>
    Example)
    # ethtool -i eth0
    driver: be2net
    version: 11.1.172.21.4fts
    firmware-version: 10.6.193.31
    bus-info: 0000:03:00.0
    supports-statistics: yes
    supports-test: yes
    supports-eeprom-access: yes
    supports-register-dump: no
    supports-priv-flags: yes
    
  7. Update the firmware.
  8. # ethtool -f <interface name> <firmware file name copied in step 2>
    Example)
    # ethtool -f eth0 oc14-11.1.172.23.ufi
    
  9. Check if the firmware is installed.
  10. Example) New firmware version appears in the square brackets
    # ethtool -i eth0
    driver: be2net
    version: 11.1.172.21.4fts
    firmware-version: 10.6.193.31 [11.1.172.23]
    bus-info: 0000:03:00.0
    supports-statistics: yes
    supports-test: yes
    supports-eeprom-access: yes
    supports-register-dump: no
    supports-priv-flags: yes
    
  11. Reboot the server to activate the new firmware.
You should see the new firmware used in the system after the reboot.

How to reset iRMC admin password on Fujitsu PRIMERGY servers

For some reason, the iRMC admin user password is lost, and you need to recover it to access the iRMC on your PRIMERGY server. The official way to reset the admin user password is to reboot the server and bring up the BIOS setup utility. Then set the "Load iRMC Default Values" option to Yes, and save the change. However this requires a system reboot.

Many customers/users do not want to reboot their servers (especially production ones) just to reset the iRMC (BMC) password. Also this option will wipe out any settings you made for iRMC other than the LAN settings, so you need to remember the original settings and restore them once the password is reset.

Here is another way to reset your iRMC admin password. You don't need to reboot the server. You don't need to install Fujitsu ServerView Agents or Operations Manager. The only thing you need is an IPMI tool/utility on your PRIMERGY.

On Linux, you can use 'ipmitool'. Major Linux distributions have this by default, so you just need to install it if not there using yum, apt, dnf, zypper, etc. Then run the following command (the default password for admin is "admin"):

$ ipmitool user set password 2 admin 

Now you should be able to log in to iRMC with user ID: admin and password: admin. If the ipmi drivers (ipmi_si, ipmi_msghandler, and ipmi_devintf) are not loaded to the kernel, load them first. Otherwise the above command will fail.

On ESXi, you can install the ipmitool vib (see my blog post "IPMITOOL on VMware ESXi") or just copy the ipmitool binary to ESXi, and run the same command as Linux.

For Windows, there is a tool called "IPMIVIEW" from Fujitsu. You can download the binary from their website. For your convenience, here is the link to the download page of IPMIVIEW V2.22 which is the latest version as of 3/24/2017.

Once you download the tool and unpack it, create a file and add the following two lines to the file:

UserName.2=admin
UserPassword.2=admin
Then run the following command from Command Prompt:
C:/> ipmiview.exe -ini=<file name>
Example)
C:\Fujitsu\IPMIVIEW> type admin_pwd_reset.ini
UserName.2=admin
UserPassword.2=admin
C:\Fujitsu\IPMIVIEW> ipmiview.exe -ini=admin_pwd_reset.ini
IPMI (Intelligent Platform Management) Tool V2.22

OK:    ReadINIFile admin_pwd_reset.ini [(null)]
OK:    StartupIPMICommunication
OK:    UserName/Password.2: "admin"/"admin"

Ret = 0 = 0x00

This is it. You can log in to iRMC with admin/admin now.

Good Bye, Folks!

As you may have heard, Fujitsu has completely discontinued Data Center Products and Solutions business in North America on April 1st, 2021. ...