HMC hints

This page has not been liked. Updated 4/12/13 4:25 PM by OneSkyWalkerTags: None

HMC Hints

Finding out which HMC your server is attached to

You may be sitting in front of a Linux session, and not be certain which HMC the machine is attached to. One can find out the HMC from the Linux command line. To do this, install the ppc64_utils-2.1 package, and then run the commands

:''serv_config -e hmc0''

:''serv_config -e hmc1''

etc, repeating up to 15 if necessary. This will print out the name and IP address of the attached HMC console, as well as other info.

On AIX, issue the command 'lsrsrc IBM.ManagementServer'.

On AIX V7, issue the command 'lsrsrc IBM.MCP'.

Opening a system console session for an LPAR

An LPAR can be accessed via the system console even if is not connected to a TCP/IP network. Some programs (eg, Linux kernel debuggers such as [LinuxP:xmon] and [LinuxP:kdb]) must be run on the system console. To understand how to open a console session, please see How to open a system console session for an LPAR.

Initiating network boot of an LPAR

Please see How to initiate network boot of an LPAR.

Updating HMC software using an ISO image

Please note that the firmware description file for PTF MH01219 (HMC V7R7.1.0 Service Pack 2) says, among other things, "The HMC Install Corrective Service task has been modified to allow corrective service installation by using the .iso packaging of the corrective service files that you can download from IBM. There is no requirement to burn CD-R or DVD-r media in order to use these files to install the corrective service." The same is probably true for other HMC V7 updates. When updating an HMC from an ISO image residing on a remote server, point the update process at the directory on the remote server which contains the ISO file.

HMC remote reboot

Login to HMC per SSH as hscroot

issue following command

hmcshutdown -r -t0

LPAR Reboot through SSH

In order to restart the LPAR you can use HMC graphical interface or ssh to HMC and use command like this:

chsysstate -r lpar -m MACHINE_NAME -o shutdown --immed --restart --id LPARID (or -n LPARNAME)

Changing firmware update control

  • From GUI

    The Linux-based 'update_flash' firmware installer tool won't work unless the [virtualization:HMC] is told to make the operating system responsible for [LinuxP:firmware update]s. This page describes how to do this. This can be accomplished either via the HMC GUI, or through the HMC command line.
  • Command line method

    To make the OS responsible for the firmware updates (to allow the OS to flash_update):

:''updlic -m <name-of-fsp-machine> -o o''

To make the HMC responsible for firmware updates:

:''updlic -m <name-of-fsp-machine> -o h''

Viewing partition state

The system and partition state can be viewed and changed through a number of HMC command-line commands. The use of the HMC command line may be preferable to the use of the HMC GUI for several reasons. For example, the GUI can be unusably slow over slow links (e.g. modem connections, links to remote sites in foreign countries, etc.) The command-line interface is also handy for writing scripts.

These commands are described in detail in IBM documentation and are summarized below.

Power 4 HMC Commands

To view partition state:

:''get_partition_state''

To pop a hung partiton into the debugger (aka 'soft reset'):

:''reset_partition -m <machine> -p <partition> -t soft''

To force a reboot of a hung system (aka 'hard reset'):

:''reset_partition -m <machine> -p <partition> -t hard''

To start a partition:

:''start_partition -p <partition> -f <profile name> -m <machine>''

To get a listing of boot profiles:

:''query_profile_names -m <machine> -p <partition>''

Power 5 HMC Commands

To see system state for a system or the partitions on a system:

:''lssyscfg -r sys -m <machine>''

:''lssyscfg -r lpar -m <machine>''

To just see names and state:

:''lssyscfg -r lpar -m <machine> -F name,state --header''

To power on an lpar with a profile:

:''chsysstate -m <machine> -o on -r lpar -n <lpar name> -f <profile>''

i.e. for example:

:''chsysstate -m alpha -o on -r lpar -n alpha-lp1 -f default''

To power on a whole machine (CEC):

:''chsysstate -m alpha -o on -r sys''

Etc. chsysstate, lssyscfg and other commands have good explanations if they're run without arguments.

Issuing a 'soft reset', to push a hung machine into KDB/XMON, is not obvious. The magic incantation is:

:''chsysstate -r lpar -m <machine> -n <partition> -o dumprestart''

To issue a 'hard reset', to turn off a partition, no matter what:

:''chsysstate -r lpar -m <machine> -n <partition> -o shutdown --immed --restart''

To add one virtual CPU: (note these use -p instead of -n for the partition name)

:''chhwres -r proc -m <machine> -p <partition> -o a --procs 1''

To add one-tenth of a cpu processing entitlement:

:''chhwres -r proc -m <machine> -p <partition> --procunits 0.1''

==References==

*Managing your server using HMC (Hardware Management Console)