HMC: HMC and LPAR management commands

HMC: HMC and LPAR management commands

# Tested on HMC v.6 / v.7

# List of HMC commands, in case web based tool is not available, to
# manage LPARs and HMC itself


# HMC Management
# ------------------------------------------------------------------------------------------

# Show HMC version

hscroot@hmcp590:~> lshmc -V
   "version= Version: 6
    Release: 1.3
   HMC Build level 20080112.1
   MH01110: Security fixes for HMC 6.1.3 (05-22-2008)
   MH01127: Enable Upgrading to V7R3.4.0 (08-18-2008)
   MH01128: Disable HTTP trace
   MH01168: Duplicate LPAR ID's when using HACMP failover (01-28-2009)
   MH01082: New DST updates and Code Update fix for E302F842 [...] failures (01-12-2008)
   ","base_version=V6.1.0
   "


# HMC reboot

hscroot@hmcp590:~> hmcshutdown -r -t0


# Change user's password

hscroot@hmcp590:~> chhmcusr -u hscroot -t passwd
   Enter the new password:
   Retype the new password:


# Show Available Filesystem Space

hscroot@hmcp590:~> monhmc -r disk -n 0
   Filesystem           1K-blocks      Used Available Use% Mounted on
   /dev/sda2             16184388   6952260   8410004  46% /
   tmpfs                   512464         0    512464   0% /dev/shm
   /dev/sda3              5929732   2928380   2700136  53% /var
   /dev/sda7              8088148    103196   7574092   2% /dump
   /dev/sda8               217844     16428    190172   8% /extra
   /dev/hdc               4472346   4472346         0 100% /media/cdrom




# LPAR Management
# ------------------------------------------------------------------------------------------

# Overview of Managed Systems controlled by HMC

hscroot@hmcp590:~> lssyscfg -r sys -F name:serial_num:state
   Server-9119-590-SN8305FBF:8305FBF:Operating
   Server-9119-590-SN456XXFG:456XXFG:Operating


# Overview of LPARs on a Managed System (Show LPAR ID, name and status)

hscroot@hmcp590:~> lssyscfg -r lpar -m <Server-9119-590-SN8305FBF> -F lpar_id:name:state
   22:p590n22:Running
   21:p590n21:Running
   20:p590n20:Running
   19:p590n19:Running
   18:p590n18:Running
   17:p590n17:Running
   16:p590n16:Running
   15:p590n15:Running
   14:p590n14:Running
   13:p590n13:Running
   12:p590n12:Running
   11:p590n11:Not Activated
   10:p590n10:Running
   9:p590n09:Running
   8:p590n08:Running
   7:p590n07:Running
   6:p590n06:Running
   5:p590n05:Running
   4:p590n04:Running
   3:p590n03:Running
   2:p590v02:Running
   1:p590v01:Running
   24:p590n24:Running
   23:p590n23:Running


# Identify LPARs running on a given Managed System
 
hscroot@hmcp590:~> vtmenu
 Retrieving name of managed system(s) . . .

 ----------------------------------------------------------
  Managed Systems:
 ----------------------------------------------------------
   1) Server-9119-590-SN8305FBF
   2) Server-9119-590-SN456XXFG

 Enter Number of Managed System.   (q to quit): 2

 ----------------------------------------------------------
  Partitions On Managed System:  Server-9119-590-SN456XXFG
 ----------------------------------------------------------
   1)    my_lpar_01                           Running
   2)    my_lpar_02                           Running
   3)    my_lpar_03                           Running
   4)    my_lpar_04                           Running
   5)    my_lpar_05                           Running


 Enter Number of Running Partition (q to quit): q


# Show history of LED code status ("-n <NUM>" for the last NUM codes).
# Current status in the first line.

hscroot@hmcp590:~> lsrefcode -m <Server-9119-590-SN8305FBF> -r lpar --filter "lpar_names=<p590n22>" -n 10 -F lpar_name:refcode
   p590n22:
   p590n22:0c33
   p590n22:
   p590n22:0539
   p590n22:0538
   p590n22:0539
   p590n22:0538
   p590n22:0539
   p590n22:0538
   p590n22:0539


# Show a list of all adapters physically plugged into a server and LPAR assignment

hscroot@hmcp590:~> lshwres -r io -m <Server-9119-590-SN8305FBF> --rsubtype slot  -F lpar_name:drc_name:description
   p590v01:U5791.001.99B02WV-P1-T6:SCSI bus controller
   p590n06:U5791.001.99B02WV-P1-C08:Fibre Channel Serial Bus
   p590n05:U5791.001.99B02WV-P1-C09:PCI 1Gbps Ethernet UTP
   p590n15:U5791.001.99B02WV-P1-C10:PCI 1Gbps Ethernet UTP
   p590n03:U5791.001.99B02WV-P1-C01:Fibre Channel Serial Bus
   p590n04:U5791.001.99B02WV-P1-C02:Fibre Channel Serial Bus
   p590v01:U5791.001.99B02WV-P1-C03:PCI 1Gbps Ethernet UTP
   p590n12:U5791.001.99B02WV-P1-C04:Fibre Channel Serial Bus
   p590v01:U5791.001.99B02WV-P1-T5:SCSI bus controller
[...]

# Same, filtering by LPAR

hscroot@hmcp590:~> lshwres -r io -m <Server-9119-590-SN8305FBF> --rsubtype slot -F lpar_name:drc_name:description --filter "lpar_names=<p590n22>"
   p590n22:U5791.001.99B069L-P1-C10:Fibre Channel Serial Bus
   p590n22:U5791.001.99B069L-P2-C01:Fibre Channel Serial Bus
   p590n22:U5791.001.99B0DV4-P2-C08:PCI 1Gbps Ethernet UTP
   p590n22:U5791.001.99B0DV4-P2-C09:PCI 1Gbps Ethernet UTP
   p590n22:U5791.001.99B0DV4-P2-C10:PCI 1Gbps Ethernet UTP


# Show status of DLPAR

hscroot@hmcp590:~> lspartition -dlpar
<#0> Partition:<19*9119-590*8305FBF, p590n19.fr.eu.airbus.corp, 152.9.117.19>
       Active:<1>, OS:<AIX, 5.3, 5300-01-00-0000>, DCaps:<0x2f>, CmdCaps:<0xb, 0xb>, PinnedMem:<256>
<#1> Partition:<17*9119-590*8305FBF, p590n17.fr.eu.airbus.corp, 44.55.102.17>
       Active:<1>, OS:<AIX, 5.3, 5.3>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<774>
<#2> Partition:<20*9119-590*8305FBF, p590n20.fr.eu.airbus.corp, 44.55.102.20>
       Active:<1>, OS:<AIX, 5.3, 5300-06-03-0732>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<813>
<#3> Partition:<22*9119-590*8305FBF, p590n22.fr.eu.airbus.corp, 44.55.102.22>
       Active:<1>, OS:<AIX, 5.3, 5300-06-03-0732>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<345>
<#4> Partition:<18*9119-590*8305FBF, p590n18.fr.eu.airbus.corp, 152.9.117.18>
       Active:<1>, OS:<AIX, 5.3, 5.3>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<256>
<#5> Partition:<14*9119-590*8305FBF, p590n14.fr-v.eu-v.airbus-v.corp, 152.9.117.14>
       Active:<1>, OS:<AIX, 5.3, 5300-09-02-0849>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<256>
<#6> Partition:<13*9119-590*8305FBF, p590n13.fr-v.eu-v.airbus-v.corp, 152.9.117.13>
       Active:<1>, OS:<AIX, 5.3, 5.3>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<824>
<#7> Partition:<7*9119-590*8305FBF, p590n07.fr.eu.airbus.corp, 152.9.117.7>
       Active:<1>, OS:<AIX, 5.3, 5.3>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<256>
<#8> Partition:<8*9119-590*8305FBF, p590n08.fr.eu.airbus.corp, 152.9.117.8>
       Active:<0>, OS:<AIX, 5.3, 5.3>, DCaps:<0x0>, CmdCaps:<0x0, 0xb>, PinnedMem:<1102>
[...]


# Soft reset (halt) of a LPAR

hscroot@hmcp590:~> chsysstate -r lpar -m <Server-9119-590-SN8305FBF> -o shutdown -n <p590n22>


# Hard reset
(halt) of a LPAR

hscroot@hmcp590:~> chsysstate -r lpar -m <Server-9119-590-SN8305FBF> -o shutdown -n <p590n22> --immed


# Soft reset (reboot) of a LPAR

hscroot@hmcp590:~> chsysstate -r lpar -m <Server-9119-590-SN8305FBF> -o shutdown -n <p590n22> --restart


# Hard reset (reboot) of a LPAR

hscroot@hmcp590:~> chsysstate -r lpar -m <Server-9119-590-SN8305FBF> -o shutdown -n <p590n22> --immed --restart


# Get LPAR Virtual Console

hscroot@hmcp590:~> mkvterm -m <Server-9119-590-SN8305FBF> -p <p590n22>


# To remove an active connection to the console that prevents us from connecting:

hscroot@hmcp590:~> rmvterm -m <Server-9119-590-SN8305FBF> -p <p590n22>


# Activation of a LPAR (specify profile)

hscroot@hmcp590:~> chsysstate -r lpar -m <Server-9119-590-SN8305FBF> -o on -f <profile> -n <p590n22>


# Boot a LPAR into SMS Menu (specify profile)

hscroot@hmcp590:~> chsysstate -r lpar -m <Server-9119-590-SN8305FBF> -o on -f <profile> -b sms -n <p590n22>


# Boot a LPAR into Open Firmware prompt (specify profile)

hscroot@hmcp590:~> chsysstate -r lpar -m <Server-9119-590-SN8305FBF> -o on -f <profile> -b of -n <p590n22>


# List available profiles for a given LPAR

hscroot@hmcp590:~> lssyscfg -r prof -m <Server-9119-590-SN8305FBF> --filter "lpar_names=<p590n22>"
*name=p590n22 normal,lpar_name=p590n22,lpar_id=22,lpar_env=aixlinux,all_resources=0,min_mem=1024,\
desired_mem=4608,max_mem=6144,proc_mode=shared,min_proc_units=1.0,desired_proc_units=1.0, \
max_proc_units=4.0,min_procs=1,desired_procs=1,max_procs=8,sharing_mode=uncap,uncap_weight=128, \
"io_slots=2104001C/none/1,21020025/none/1,21040025/none/1,21010020/none/1,21030025/none/1", \
lpar_io_pool_ids=none,max_virtual_slots=10,"virtual_serial_adapters=1/server/1/any//any/1,0/server/1/any//any/1", \
"virtual_scsi_adapters=2/client/1/p590v01/22/0,3/client/2/p590v02/22/0",virtual_eth_adapters=none, \
sni_device_ids=none,hca_adapters=none,boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none, \
work_group_id=none,redundant_err_path_reporting=null


# Bring the key switch to position NORMAL

# On some power5 HMCs, when a LPAR does not properly boot after issuing the power on command,
# showing a message similar to following one

0514-440 cfgcon: failed to create log file: check path name, permissions, and available space

# it may be necessary to set the key switch back to normal position

hscroot@hmcp590:~> chsysstate -r lpar -o chkey -k norm -n <p590n22> -m <Server-9119-590-SN8305FBF>


0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Altering LVM Configuration When a Disk is Not in ODM Anymore
Viewed 2949 times since Mon, Jun 3, 2019
AIX oslevel version OS
Viewed 4763 times since Wed, Apr 17, 2019
AIX, Red Hat, Security, System Admin↑ System-wide separated shell history files for each user and session
Viewed 2150 times since Fri, Apr 19, 2019
AIX POWERHA/HACMP: Basic commands
Viewed 5219 times since Sat, Jun 2, 2018
AIX routing - How Do I Compare ODM with the Current Routing Table?
Viewed 2524 times since Mon, Jul 29, 2019
Monitor logfiles and command output on AIX using multitail.
Viewed 2199 times since Thu, Feb 21, 2019
AIX, Security, System Admin↑ Fix user accounts
Viewed 4597 times since Fri, Apr 19, 2019
IBM AIX multipath I/O (MPIO) resiliency and problem determination
Viewed 13252 times since Wed, May 30, 2018
AIX hangs on boot? How to debug boot process on AIX systems
Viewed 10740 times since Thu, Feb 21, 2019
To do a quick check on the number of path present (does not mean all are Enabled] using for loop
Viewed 3704 times since Fri, Jun 8, 2018