POWER5 Connection
POWER6 and POWER7 Connection
HMC Command Line
$ mkvterm -m machine -p partition
$ rmvterm -m machine -p partition
$ chsysstate -m machine -o on -r lpar -n lpar_name -f profile
$ chsysstate -r lpar -m machine -n partition -o shutdown -immed -restart

If you wish to determine which HMC controls an LPAR, then type:

$ lsrsrc IBM.ManagementServer

Determine the HMC release, version and build level:

$ lshmc -V

Display Vital Product Data Information:

lshmc -v

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 command line

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

For an HMC remote reboot, login to HMC per SSH as hscroot and issue following command

hmcshutdown -r -t 0

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 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

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

Installing HMC 7 Corrective Service from Removable Media

Installing HMC 6 Corrective Service from Removable Media