Edit: Some links no longer work
Originally posted May 14, 2019 on AIXchange
Recently, a friend was trying to get the lshwres command to work in his environment.
I’ve previously written about using the HMC command line to get information from managed machines. It’s a terrific use of the HMC, especially if you’re working with new machines and your OS isn’t loaded yet. Even in established environments, the HMC command line makes everything easier. Why bother with logging into multiple VIO servers or LPARs to get information?
In my friend’s case, he was running a loop. First he used lssyscfg to get the system names. Then he fed those names into the lshwres command. It was simple enough; he wanted to collect WWNs for his SAN team so they could get them zoned appropriately:
lshwres -r virtualio -m <machine name> –rsubtype fc –level lpar -F lpar_name,wwpns
However, for some reason, only the two new E950 machines were providing the expected output. Meanwhile, nothing was happening with the two new S924 machines. “No results were found” was the only response from them.
A web search on the lshwres command returned this information from IBM developerWorks:
If the lshwres commmand displays the message:
No results were found
then hardware discovery has not yet been done. The managed server must be powered off and back on with the hardware discovery option. To power on a managed server with hardware discovery from the HMC command line, use the HMC command chsysstate -m xxx -r sys -o onhwdisc, where xxx is the same as above. Or choose the Hardware Discovery option in the HMC Power On window, assuming the Hardware Discovery option is offered by the HMC GUI.
Please note that when powered on with the hardware discovery option, a server takes longer to get to partition standby mode than without the option. And once in partition standby mode, a temporary LPAR for hardware discovery is created and started, which takes additional time.
This IBM Support Center document has more about hardware discovery.
Sure enough, once we powered off the machines and restarted the frames with the onhwdisc option, the S924s also gave the expected output.