LPAR tool

With the LPAR tool, all LPARs can be managed through easy-to-use commands. The LPAR tool can manage all LPARs and managed systems of multiple HMCs.

We have been using the LPAR tool for several years in our projects. It has been steadily developed during this time.

NEW: Version 1.4.0.1 includes a valid test license! The included license is valid until 31th october 2019. The test license supports 10 HMCs, up to 100 managed systems and up to 1000 LPARs.

So, if you want to test the LPAR tool, it is no longer necessary to request a trial license.

Contact us for an offer: info@powercampus.de

 

Informations for the LPAR tool: info@powercampus.de

Download LPAR-Tool

Requesting a Trial-License

Opening a Software-Call

[divider style=”11″]

[video_player type=”embed” style=”1″ dimensions=”custom” width=”576″ height=”324″ align=”left” margin_top=”0″ margin_bottom=”20″ ipad_color=”black”]PGlmcmFtZSBzcmM9Imh0dHBzOi8vcGxheWVyLnZpbWVvLmNvbS92aWRlby8yODk4Mzg5OTgiIHdpZHRoPSI2NDAiIGhlaWdodD0iMzYwIiBmcmFtZWJvcmRlcj0iMCIgd2Via2l0YWxsb3dmdWxsc2NyZWVuPSIiIG1vemFsbG93ZnVsbHNjcmVlbj0iIiBhbGxvd2Z1bGxzY3JlZW49IiI+PC9pZnJhbWU+[/video_player]

AIX-Talk: LPAR tool

  • Demonstration of the LPAR tool (german)

[divider style=”11″]

With the LPAR tool any number of HMCs, managed systems and LPARs can be conveniently administered from the command line. The LPAR tool allows you to create LPARs, map physical slots to an LPAR, create virtual adapters, and many more. The only prerequisite for using the LPAR tool is an SSH connection to the HMCs to be managed. The LPAR tool essentially consists of the 4 commands hmc, ms, lpar and vios. The following are some of the options of the LPAR tool.

First, an HMC to be managed must be registered with the LPAR tool. This is done with the command hmc:

$ hmc add hmc01
ms01
ms02
..

All managed systems and LPARs connected to the specified HMC are registered. The registered HMCs can be shown by

$ hmc show
HMC              SERIAL    MODEL
hmc01            XXXXXXX   7042-CR6

The registered managed systems are shown using

$ ms show
MS               SERIAL    MODEL         HMCs
ms01             XXXXXXX   8204-E8A      hmc01
ms02             XXXXXXX   8204-E8A      hmc01
ms03             XXXXXXX   8204-E8A      hmc01
...

And the registered LPARs are displayed with

$ lpar show
LPAR                  ID    SERIAL    TYPE        MS
lpar01                5     XXXXXXXX  aixlinux    ms02
lpar02                99    XXXXXXXX  aixlinux    ms02
lpar03                27    XXXXXXXX  aixlinux    ms18
...

If you want to know the firmware version, the memory configuration, the number of processors or the physical slots, this can be listed with the following commands:

Firmware version of two managed systems:

$ ms mcode ms01 ms02
MS               PERMANENT   TEMPORARY   CURRENT
ms01             01EL350_149  01EL350_163  01EL350_163
ms02             01EL350_149  01EL350_163  01EL350_163

Memory configuration of managed systems:

$ ms mem
MS               INSTALLED   FIRMWARE    CONFIGURABLE  AVAILABLE
ms01             786432      26880       786432      745216
ms02             32768       2176        32768       4992
ms03             262144      8448        262144      92928
...

Processor configuration of managed systems:

$ ms proc
MS               INSTALLED  CONFIGURABLE  AVAILABLE
ms01                  48.0          48.0       45.5
ms02                   4.0           4.0        1.2
ms03                   8.0           8.0       3.35
...

The physical slots of a managed systems can be shown using “ms slots“:

$ ms slots ms09
SLOT                       DRCIDX     LPAR          DESCRIPTION
U78C0.001.XXXXXXX-P2-T3    21010200   null          RAID Controller
U78C0.001.XXXXXXX-P2-C8-T7  21010201   null         Generic XT-Compatible Serial Controller
U78C0.001.XXXXXXX-P2-C4    21010202   null          Empty slot
U78C0.001.XXXXXXX-P2-C3    21010203   ms09-vio1     Quad 8 Gigabit Fibre Channel Adapter
U78C0.001.XXXXXXX-P2-C2    21010204   ms09-vio1     Quad 8 Gigabit Fibre Channel Adapter
U78C0.001.XXXXXXX-P2-C1    21010205   ms09-vio1     10 Gigabit Ethernet-SFP+ SR PCI-E adapter
U78C0.001.XXXXXXX-P2-C9-T1  21010208   ms09-vio1    PCI-E SAS Controller
U78C0.001.XXXXXXX-P2-C9-T2  21010209   ms09-vio1    PCI-E SAS Controller
...

If you are interested, you can simply  output the command executed on the HMC command line without executing it. For example, for the slot assignment in the last example, just use the option -v (verbose only):

$ ms slots -v ms09

hmc01: lshwres -m ms09 -r io --rsubtype slot -F 'drc_name drc_index lpar_name description'

In each case the HMC and the command (s) that would be executed if you omit the option -v (verbose only) are displayed.

To illustrate further commands, the creation of an LPAR with a virtual Ethernet adapter and a virtual FC adapter will now be shown by way of example.

First, the LPAR is created with the command “lpar create”. For this purpose, the option “-m <managed-system>” must be used to select the managed system on which the LPAR is to be created:

$ lpar -m ms09 create mylpar

Let’s take a closer look at the newly created LPAR:

$ lpar disp mylpar
MANAGED SYSTEM: ms09
NAME: mylpar
ID: 7
SERIAL NUMBER: XXXXXXXX
TYPE: aixlinux
STATE: Not Activated
OS: Unknown
DEFAULT PROFILE: standard
CURRENT PROFILE: (null)
...

The profile name was set to “standard“. With option -p any other name can be chosen. You can of course also look at the profile, simply specify the profile to be displayed with the -p option:

$ lpar disp -p standard mylpar
MANAGED SYSTEM: ms09
NAME: mylpar
ID: 7
TYPE: aixlinux
PROFILE: standard
BOOT MODE: norm
AUTOSTART: 0
MAX VIRTUAL SLOTS: 30
PROC COMPAT MODE: default
PROC MODE: shared
SHARING MODE: uncap
UNCAP WEIGHT: 5
SHARED PROCPOOL: DefaultPool
PROCS: min=1 desired=2  max=4
PROC UNITS: min=0.1 desired=0.2  max=4.0
MEMORY MODE: ded
MEMORY EXPANSION: 0.0
MEMORY: min=1024 desired=4096  max=16384
HUGE PAGES: min=null desired=null  max=null

The LPAR was thus created with 2 processor cores and an entitled capacity of 0.2, and 4 GB of memory.

We now create a virtual ethernet adapter with a port VLAN ID of 100:

$ lpar -p standard addeth mylpar 5 100

Since the LPAR is not active, the adapter can only be created in the profile!

We control the virtual adapters of the LPAR in the profile:

$ lpar -p standard vslots mylpar
SLOT   REQ  TYPE             DATA
0      yes  serial        
1      yes  serial        
5      no   ethernet         PVID=100 VLANS=(null) ETHERNET0

In addition to the virtual Ethernet adapter in slot 5, the two serial adapters that are created by default also appear here.

Now we need at least one storage adapter. We will create a virtual fiber channel adapter here. For this, we need the client adapter on the LPAR and a server adapter on a VIO server of the associated managed system. Let’s first list the managed systems LPARs to find out which virtual I/O servers are available:

$ lpar -m ms09 show
LPAR                  ID    SERIAL    TYPE        MS
lpar18                17    XXXXXXXX  aixlinux    ms09
lpar19                32    XXXXXXXX  aixlinux    ms09
mylpar                7     XXXXXXXX  aixlinux    ms09
...
ms09-vio1             1     XXXXXXXX  vioserver   ms09
ms09-vio2             2     XXXXXXXX  vioserver   ms09

So there are 2 virtual I/O servers on the managed system. Here we select the first virtual I/O server and try to find out which slot number is available for the server adapter:

$ lpar vslots ms09-vio1
SLOT   REQ  TYPE             DATA
1      1    serial          
0      1    serial          
5      0    eth              PVID=100 ETHERNET0
31     0    eth              TRUNK(1) IEEE PVID=1 VLANS=100 ETHERNET0
32     0    eth              TRUNK(1) IEEE PVID=2 VLANS=123,124 ETHERNET0
132    0    fc/server        remote: lpar19(32)/10
117    0    fc/server        remote: lpar18(17)/10
104    0    scsi/server      remote: test01(4)/10
7      0    scsi/server      remote: null(12)/11
53     0    scsi/server      remote: lpar18(17)/11
6      0    scsi/server      remote: test01(4)/11

The slot number 100 would still be available for the server adapter. On the client we choose the slot number 10. Now we can create client as well as server adapters:

On the client, the adapter is again entered only in the profile:

$ lpar -p standard addfc mylpar 10 ms09-vio1 100

On the server, the adapter is added both in the current profile and dynamically (assuming a working RMC connection):

$ lpar addfc ms09-vio1 100 mylpar 10

We briefly check the profile of the client to find the used WWPNs for the client adapter:

$ lpar -p standard vslots mylpar
SLOT   REQ  TYPE          DATA
0      yes  serial        
1      yes  serial        
5      no   ethernet      PVID=100 VLANS=(null) ETHERNET0
10     no   fc/client     remote: ms09-vio1(1)/100 c050760XXXXXXXXX,c050760XXXXXXXXX

On the VIO server, the virtual FC server adapter now has to be assigned to a physical FC port. We first look at the existing mappings:

$ vios npiv ms09-vio1
VIOS             ADAPT  NAME        CLIENT        OS        ADAPT  STATUS        PORTS
ms09-vio1               vfchost0     (7)          unknown   -      NOT_LOGGED_IN  0
ms09-vio1        fcs4   vfchost4     (17)         unknown   -      NOT_LOGGED_IN  0
ms09-vio1        fcs4   vfchost14    (32)         unknown   -      NOT_LOGGED_IN  0

For our new LPAR (mylpar LPAR-ID 7), the device vfchost0 was created, but this is currently not mapped to any FC port. We will map it now:

$ vios vfcmap ms09-vio1 vfchost0 fcs4

If LUNs on the storage side have been mapped to the above WWPNs, then they should now be visible as soon as the LPAR is activated. The LPAR could then be installed.

We activate the LPAR first in the SMS menu:

$ lpar activate -p standard -b sms mylpar

Finally, we open a console to the currently activated LPAR to administer in the SMS menu:

$ lpar console mylpar

Open in progress 

 Open Completed.
scan /vdevice/vfc-client@3000000a/tape                                         




IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

          1 = SMS Menu                          5 = Default Boot List
          8 = Open Firmware Prompt              6 = Stored Boot List


     Memory      Keyboard     Network     SCSI     Speaker

PowerPC Firmware
Version AM740_121
SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved.
-------------------------------------------------------------------------------
Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. Change SCSI Settings
4. Select Console
5. Select Boot Options





-------------------------------------------------------------------------------
Navigation Keys:
                                             X = eXit System Management Services
-------------------------------------------------------------------------------
Type menu item number and press Enter or select Navigation key:

This concludes our example.

The above example commands give a small overview of what is possible with the LPAR tool. A complete description is available with the LPAR tool.

Working with the LPAR tool is much easier and faster than using the HMC GUI. The LPAR tool can also be easily used in your own scripts for further automation. It is not necessary to change or select the “correct” HMC. By specifying the LPAR name, the associated managed system and the associated HMC are found out. In the case of redundant HMCs, the second HMC will be used automatically in the event of non-availability, without this having to be specified. If an HMC can not be reached, the second HMC is automatically used.

The LPAR tool can greatly simplify and speed up the administration of LPARs and managed systems