HMC

From Linux on Power wiki

Jump to: navigation, search

HMC is the Hardware Management Console; it is a system used to perform a variety of system management tasks on p5, i5 or OpenPower systems. In particular, it may be used to create or change logical partitions, including dynamically assigning hardware to a partition.

The HMC is an ordinary PC together with a special serial card controller (for Power4) or network card connected to the service processors (on Power5) and the HMC software. The software is written in Java. One HMC can control multiple (up to 32) POWER systems. HMC is based on Linux but should be considered as an appliance system. Root access is disabled by default. HMC is used for defining and changing partitioning it is not required to run systems and can be disattatched or exchanged easily.

Beside being an interface to the logical partitioning HMC also has some other tasks: it works as a central hardware control point, as a service focal point gathering and forwarding hardware errors (calling home) and also as a central administration point, providing virtual terminal acces to all partitions on all servers connected. KVM (Keyboard Video Mouse) switches or serial switches are not needed if you have an HMC.

Management can be performed either through the HMC GUI or through the command-line interface (after ssh'ing into the HMC).

See Category:HMC for a listing of HMC topics.


Contents

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.

Getting a terminal session to LPAR

In order to debug kernel problems on HMC-attached systems, one needs to get access to the "serial console". The Linux kernel debuggers, such as xmon and kdb can only be piloted from the console. All boot messages and magic-sysreq output go to the console. There are several ways to get a console for a system.

Console via HMC GUI

A console can be obtained from the HMC GUI. This console has several disadvantages, one of which is that is uses an old xterm without modern terminal features.

Console via HMC commandline

A console can be obtained from the HMC command line. This has several advantages; most notably, if you are logged in remotely to the HMC, this will use the terminal that you are currently using.

To open a console terminal:

mkvterm -m <machine> -p <partition>

This can be exited with ~~.

To remove a terminal someone else is using:

rmvterm -m <machine> -p <partition>

A menu-driven selection of attached machines and pertitions can be gotten via

vtmenu

An escape sequence to leave vtmenu terminal session is:

~.

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 HMC is told to make the operating system responsible for firmware updates. 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 handing 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

Personal tools