HMC Command Line Interface
From AIXWiki
This document presents the main HMC commands. Here are the commands of the old POWER4 HMCs and the new POWER5-HMCs compared.
The POWER5 commands are also valid POWER6 systems (HMC version 7).
Check the HMC Software version
hscroot@hmc> lshmc -V Version: 3 Release: 3.2 HMC Build level 20040827.1
POWER4 HMCs can be no higher than version 3.x - versions 4.x and up are for the POWER5 HMCs. POWER6 systems need at least HMC version 7.x.
Status of the LPARs
The following command gives you an overview of all the LPARs managed by this HMC
power4:
hscroot@hmc> lslpars
power5:
hscroot@hmc> lssyscfg -r sys -F name:state pserver1:Operating pserver2:Operating
And for each system from the list above, the LPARs will be shown as follows:
hscroot@hmc> lssyscfg -m pserver -r lpar -F name:state
eg:
hscroot@hmc> lssyscfg -m pserver1 -r lpar -F name:state mylpar1:Running mylpar2:Running mylpar3:Not Activated
Reboot the HMC
power4 + power5:
hscroot@hmc> hmcshutdown -t now -r
Soft-Reset a LPAR
power4:
hscroot@hmc> chsysstate -m pserver -r lpar -n mylpar -o reset
power5:
hscroot@hmc> chsysstate -r lpar -m pserver -o shutdown -n mylpar
Soft Reset a System in FullPartitionMode
power4:
hscroot@hmc> chsysstate -n pserver -r sys -o reset
Hard Reset a LPAR
power4:
hscroot@hmc> chsysstate -m pserver -r lpar -n mylpar -o off
power5:
hscroot@hmc> chsysstate -r lpar -m pseries -o shutdown -n mylpar --immed
Hard Reset a System in FullSystemPartitionMode
power4:
hscroot@hmc> chsysstate -n pserver -r sys -o off
Virtual Console
To open a vterm connection to a LPAR
power4 + power5:
hscroot@hmc> mkvterm -m pserver -p mylpar
open a console connection to a system that is in FullSystemPartition mode:
power4:
hscroot@hmc> mkvterm -m pserver
By typing ~ ~ (2x tilde) and . (dot) at the start of a line, the connection is closed. If the failure to build a console connection with the error message displays;
All available virtual terminal sessions have been opened and are in use. To force a new open session, perform a Close Terminal Session operation which frees up the session.
then there is an other terminal connection open, which can be closed using:
power4 + power5:
hscroot@hmc> rmvterm -m pserver -p mylpar
View LPAR status and LED/LCD-code
power4:
hscroot@hmc> lssyscfg -r lpar -m pserver -n mylpar
power5:
hscroot@hmc> lssyscfg -r lpar -m pserver --filter ""lpar_names=mylpar"" hscroot@hmc> lsled -m pserver -r sa -t virtuallpar --filter ""lpar_names=mylpar""
View status and LED/LCD-code from a System in FullSystemPartition
power4:
hscroot@hmc> lssyscfg -r sys -n pserver
Boot LPAR
power4:
hscroot@hmc> chsysstate -r lpar -m pserver -o on [ -f myprofile ] -n mylpar
power5:
hscroot@hmc> chsysstate -r lpar -m pserver -o on -f myprofile -n mylpar
Boot a System in FullPartitionMode
power4:
hscroot@hmc> chsysstate -o on -r sys -n pserver -c full
Key switch to position "normal"
power5:
hscroot@hmc> chsysstate -r lpar -o chkey -k norm -n mylpar -m pserver
CAUTION: On some POWER5 HMCs, it may happen that the LPAR doesn't boot, if the virtual key switch stays on "manual". The following error will be displayed:
0514-440 cfgcon: failed to create log file: check path name, permissions, and available space
After which the Diagnose- or Single-User-Mode can be started.
Edit HMC password (hscroot user)
power4 + power5:
hscroot@hmc> chhmcusr -u hscroot -t passwd Enter the new password: Retype the new password:
Overview LPAR-IDs
power5:
hscroot@hmc> lssyscfg -r lpar -m pserver -F lpar_id:name:state | sort -n 1:vioserver1:Running 2:vioserver2:Running 3:mylpar1:Not Activated 4:mylpar2:Running 5:mylpar3:Running 6:mylpar4:Running 7:mylpar5:Running 8:mylpar6:Running 9:mylpar7:Running 10:mylpar8:Not Activated
Creating LPAR
mksyscfg -r lpar -m psystem -i "name=aixserver01nim,profile_name=default,lpar_env=aixlinux,min_mem=256,desired_mem=512,max_mem=1024,proc_mode=shared,min_procs=1,desired_procs=1,max_procs=1,min_proc_units=0.1,desired_proc_units=0.2,max_proc_units=0.5,sharing_mode=uncap,uncap_weight=128,boot_mode=norm,max_virtual_slots=10,virtual_eth_adapters=3/1/1///1,virtual_scsi_adapters=4/client/1/aixserver01vio1/20/1,resource_config=1"
