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)

# 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

# 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
   11:p590n11:Not Activated

# 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

# 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,,>
       Active:<1>, OS:<AIX, 5.3, 5300-01-00-0000>, DCaps:<0x2f>, CmdCaps:<0xb, 0xb>, PinnedMem:<256>
<#1> Partition:<17*9119-590*8305FBF,,>
       Active:<1>, OS:<AIX, 5.3, 5.3>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<774>
<#2> Partition:<20*9119-590*8305FBF,,>
       Active:<1>, OS:<AIX, 5.3, 5300-06-03-0732>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<813>
<#3> Partition:<22*9119-590*8305FBF,,>
       Active:<1>, OS:<AIX, 5.3, 5300-06-03-0732>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<345>
<#4> Partition:<18*9119-590*8305FBF,,>
       Active:<1>, OS:<AIX, 5.3, 5.3>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<256>
<#5> Partition:<14*9119-590*8305FBF,,>
       Active:<1>, OS:<AIX, 5.3, 5300-09-02-0849>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<256>
<#6> Partition:<13*9119-590*8305FBF,,>
       Active:<1>, OS:<AIX, 5.3, 5.3>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<824>
<#7> Partition:<7*9119-590*8305FBF,,>
       Active:<1>, OS:<AIX, 5.3, 5.3>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<256>
<#8> Partition:<8*9119-590*8305FBF,,>
       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, \

# 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
There are no attachments for this article.
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
Trouble Shooting AIX Networking
Viewed 2357 times since Tue, May 22, 2018
AIX, Networking↑ Adding and deleting a static network route using the command line
Viewed 2391 times since Fri, Apr 19, 2019
Setting new device attributes with chdef
Viewed 2013 times since Mon, Jun 3, 2019
My LPAR always boots into SMS. Why?
Viewed 3334 times since Tue, Apr 16, 2019
Configuring an AIX client with multiple Kerberos realms
Viewed 8582 times since Mon, Jun 25, 2018
How to Maintain a Virtual I/O Server With FBO Part II
Viewed 10417 times since Wed, Jun 5, 2019
AIX, Red Hat, Security, System Admin↑ System-wide separated shell history files for each user and session
Viewed 2025 times since Fri, Apr 19, 2019
Using Shell Redirection: All About the Here-Doc
Viewed 10028 times since Wed, May 30, 2018
Writing a Custom PVID
Viewed 2707 times since Fri, Feb 1, 2019
How to upgrade TL and SP in AIX using alternate disk(alt_disk_copy)
Viewed 10576 times since Sun, Jun 30, 2019