Under Construction

Information about LPARs

In this section we look at LPARs in a PowerVM environment. To do this, we will first get an overview of the type and number of LPARs available and then take a closer look at the configuration of some LPARs. The lpar command is used for all operations that affect LPARs. It allows you to create, modify and delete LPARs. The lpar command also supports many options for displaying various information about the LPARs.

Here, too, we start by displaying all available LPARs, using the command “lpar show”.

Run the command to view all the LPARs of your PowerVM environment:

$ lpar show
NAME       ID  SERIAL    LPAR_ENV   MS    HMCS
aix01     3   32D4E3X3  aixlinux   ms03  hmc01
aix02     3   32D4E4X3  aixlinux ms04  hmc01
aix03     4   32D4E3X4  aixlinux ms03  hmc01
aix04     3   326F13X3  aixlinux ms02  hmc01
aix05     5   32D4E3X5  aixlinux ms03  hmc01
aix06     4   326F13X4  aixlinux ms02  hmc01
aix07     3   326F12X3  aixlinux ms01  hmc01
aix08     4   32D4E4X4  aixlinux ms04  hmc01
aix09     4   326F12X4  aixlinux ms01  hmc01
aixnim   5   326F12X5  aixlinux ms01  hmc01
ms01-vio1  1   326F12X1  vioserver  ms01  hmc01
ms01-vio2  2   326F12X2  vioserver  ms01  hmc01
ms02-vio1  1   326F13X1  vioserver  ms02  hmc01
ms02-vio2  2   326F13X2  vioserver  ms02  hmc01
ms03-vio1  1   32D4E3X1  vioserver  ms03  hmc01
ms03-vio2  2   32D4E3X2  vioserver  ms03  hmc01
ms04-vio1  1   32D4E4X1  vioserver  ms04  hmc01
ms04-vio2  2   32D4E4X2  vioserver  ms04  hmc01
$

Similar to the managed systems, the name, serial number and the associated HMC(s) are displayed here. In addition, the type of LPAR (column LPAR_ENV), as well as the LPAR ID and the managed system are shown.

The output can be restricted to specific LPARs by specifying the name or serial number of the LPARs.

Specify two LPAR names and two serial numbers as arguments:

$ lpar show aix01 aix07 326F13X3 326F12X1
NAME       ID  SERIAL    LPAR_ENV   MS    HMCS
aix01    3   32D4E3X3  aixlinux   ms03  hmc01
aix04    3   326F13X3  aixlinux ms02  hmc01
aix07    3   326F12X3  aixlinux ms01  hmc01
ms01-vio1  1   326F12X1  vioserver  ms01  hmc01
$

Only the corresponding LPARs are displayed. As with managed systems, wildcards can be used. In the case of LPARs, wildcards are matched to the name and serial number.

Show all LPARs that have the number 4 in their name or serial number:

$ lpar show '*4*'
NAME       ID  SERIAL    LPAR_ENV   MS    HMCS
aix01     3   32D4E3X3  aixlinux   ms03  hmc01
aix02     3   32D4E4X3  aixlinux ms04  hmc01
aix03     4   32D4E3X4  aixlinux ms03  hmc01
aix04      3   326F13X3  aixlinux ms02  hmc01
aix05      5   32D4E3X5  aixlinux ms03  hmc01
aix06      4   326F13X4  aixlinux ms02  hmc01
aix08     4   32D4E4X4  aixlinux ms04  hmc01
aix09     4   326F12X4  aixlinux ms01  hmc01
ms03-vio1  1   32D4E3X1  vioserver  ms03  hmc01
ms03-vio2  2   32D4E3X2  vioserver  ms03  hmc01
ms04-vio1  1   32D4E4X1  vioserver  ms04  hmc01
ms04-vio2  2   32D4E4X2  vioserver  ms04  hmc01
$

Note: The specified wildcard was protected from expansion by the shell using apostrophes.

Often you are only interested in LPARs on a specific managed system. This is supported by the LPAR tool using the “-m” option. The “-m” option expects a managed system to be specified. Only LPARs that are active on the specified managed system are then selected.

Try this and specify one of your managed systems along with the “-m” option:

$ lpar -m ms02 show
NAME       ID  SERIAL    LPAR_ENV   MS    HMCS
aix04     3   326F13X3  aixlinux ms02  hmc01
aix06     4   326F13X4  aixlinux ms02  hmc01
ms02-vio1  1   326F13X1  vioserver  ms02  hmc01
ms02-vio2  2   326F13X2  vioserver  ms02  hmc01
$

Note: It does not matter whether you use the option “-m ms02” before or after the keyword “show”. You can also use “lpar show –m ms02”!

The managed system specified with “-m” does not have to be specified by name, you can also use the serial number or even the machine type (or model). Specify a machine type of which you have at least two managed systems:

$ lpar -m 8284-22A show
NAME       ID  SERIAL    LPAR_ENV   MS    HMCS
aix04     3   326F13X3  aixlinux ms02  hmc01
aix06     4   326F13X4  aixlinux ms02  hmc01
aix07     3   326F12X3  aixlinux ms01  hmc01
aix09      4   326F12X4  aixlinux ms01  hmc01
aixnim   5   326F12X5  aixlinux ms01  hmc01
ms01-vio1  1   326F12X1  vioserver  ms01  hmc01
ms01-vio2  2   326F12X2  vioserver  ms01  hmc01
ms02-vio1  1   326F13X1  vioserver  ms02  hmc01
ms02-vio2  2   326F13X2  vioserver  ms02  hmc01
$

All LPARs currently running on a Model 8284-22A (S822) are displayed!

The LPAR tool also supports the specification of LPAR names, LPAR serial numbers or wildcards together with the “-m” option! If your virtual I/O servers have the name component “vio“, specify the wildcard “*vio*” as an argument in the example above:

$ lpar -m 8284-22A show '*vio*'
NAME       ID  SERIAL    LPAR_ENV   MS    HMCS
ms01-vio1  1   326F12X1  vioserver  ms01  hmc01
ms01-vio2  2   326F12X2  vioserver  ms01  hmc01
ms02-vio1  1   326F13X1  vioserver  ms02  hmc01
ms02-vio2  2   326F13X2  vioserver  ms02  hmc01
$

In our case, the Virtual I/O servers are the only LPARs that contain the string “vio” in the name.

The above applies generally to all subcommands offered by the lpar command.

Next, we display the status of all LPARs. As with managed systems, there is the subcommand “status” for this. Display the status of all your LPARs:

$ lpar status
     LPAR                                                             PROC     
NAME       ID   LPAR_ENV   STATE    PROFILE   SYNC  RMC       PROCS  UNITS  MEM     OS_VERSION
aix01      3    aixlinux   Running  standard  0     active    2      0.6     40 GB  AIX 7.1 7100-05-09-2148
aix02      3    aixlinux   Running  standard  0     active    2      0.6     64 GB  AIX 7.1 7100-05-09-2148
aix03      4    aixlinux   Running  standard  0     active    2      0.6     40 GB  AIX 7.1 7100-05-05-1939
aix04      3    aixlinux   Running  standard  0     active    2      0.6     40 GB  AIX 7.1 7100-05-05-1939
aix05      5    aixlinux   Running  standard  0     active    2      0.6     20 GB  AIX 7.1 7100-05-09-2148
aix06      4    aixlinux   Running  standard  0     active    2      0.6     40 GB  AIX 7.1 7100-05-09-2148
aix07      3    aixlinux   Running  standard  0     active    2      0.6     64 GB  AIX 7.1 7100-05-09-2148
aix08      4    aixlinux   Running  standard  0     active    2      0.6     36 GB  AIX 7.1 7100-05-07-2038
aix09      4    aixlinux   Running  standard  0     active    2      0.6     36 GB  AIX 7.1 7100-05-07-2038
aixnim     5    aixlinux   Running  standard  0     active    2      0.6     64 GB  AIX 7.1 7100-05-07-2038
ms01-vio1  1    vioserver  Running  standard  1     active    5      2.0      6 GB  VIOS 3.1.2.21
ms01-vio2  2    vioserver  Running  standard  1     active    5      3.0      6 GB  VIOS 3.1.2.21
ms02-vio1  1    vioserver  Running  standard  1     active    5      2.0      6 GB  VIOS 3.1.2.21
ms02-vio2  2    vioserver  Running  standard  1     active    5      1.0      6 GB  VIOS 3.1.2.21
ms03-vio1  1    vioserver  Running  standard  1     active    2      0.8      6 GB  VIOS 3.1.2.21
ms03-vio2  2    vioserver  Running  standard  1     active    2      0.4      6 GB  VIOS 3.1.2.21
ms04-vio1  1    vioserver  Running  standard  1     active    2      0.8      6 GB  VIOS 3.1.2.21
ms04-vio2  2    vioserver  Running  standard  1     active    2      0.4      6 GB  VIOS 3.1.2.21
$

In an environment with many HMCs, managed systems and hundreds or thousands of LPARs, this command can take quite a while! We’ll show you why below. So be patient here, or limit the output to fewer LPARs, as shown above.

The status output shows a number of useful information, such as the current state (STATE column), whether an active RMC connection exists between LPAR and at least one HMC (RMC column), and the operating system version (OS_VERSION column) in case an RMC connection is active.

If you want to know how the LPAR tool determines this information, run the command again and this time specify the “-v” option:

$ lpar status -v
hmc01: lssyscfg -r lpar -m ms01
hmc01: lshwres -r mem -m ms01 --level lpar
hmc01: lshwres -r proc -m ms01 --level lpar
hmc01: lssyscfg -r lpar -m ms02
hmc01: lshwres -r mem -m ms02 --level lpar
hmc01: lshwres -r proc -m ms02 --level lpar
hmc01: lssyscfg -r lpar -m ms04
hmc01: lshwres -r mem -m ms04 --level lpar
hmc01: lshwres -r proc -m ms04 --level lpar
hmc01: lssyscfg -r lpar -m ms03
hmc01: lshwres -r mem -m ms03 --level lpar
hmc01: lshwres -r proc -m ms03 --level lpar
$

The option “-v” stands for verbose-only. This means that the commands that would normally be executed on the HMC(s) are only displayed. This is a kind of dry run, so to speak. The option “-v” is supported by all LPAR tool commands. It can be used to show which commands would be executed on the HMCs without actually starting these commands.

If you look at the output more closely, you can see that 3 commands are sent to the HMCs for each managed system. This means that in order to get the output of “lpar status” shown above, you would have to send all of the commands listed (in our case 12 commands) to the HMCs. Then filter out the interesting information from the output of these commands and display it in a formatted manner. Here is an example of what the output of one of the 12 commands above looks like:

user01@hmc01:~> lssyscfg -r lpar -m ms03
name=aix01,lpar_id=3,lpar_env=aixlinux,state=Running,resource_config=1,os_version=AIX 7.1 7100-05-09-2148,logical_serial_num=32D4E3X3,default_profile=standard,curr_profile=standard,work_group_id=none,shared_proc_pool_util_auth=0,allow_perf_collection=0,power_ctrl_lpar_ids=none,boot_mode=norm,lpar_keylock=norm,auto_start=0,redundant_err_path_reporting=0,rmc_state=active,rmc_ipaddr=2.5.8.13,time_ref=0,lpar_avail_priority=127,desired_lpar_proc_compat_mode=default,curr_lpar_proc_compat_mode=POWER8,suspend_capable=0,remote_restart_capable=0,simplified_remote_restart_capable=0,sync_curr_profile=0,affinity_group_id=none,vtpm_enabled=0,migr_storage_vios_data_status=Data Collected,migr_storage_vios_data_timestamp=Wed Nov 24 08:17:18 UTC 2021,powervm_mgmt_capable=0
name=aix03,lpar_id=4,lpar_env=aixlinux,state=Running,resource_config=1,os_version=AIX 7.1 7100-05-07-2038,logical_serial_num=32D4E3X4,default_profile=standard,curr_profile=standard,work_group_id=none,shared_proc_pool_util_auth=0,allow_perf_collection=0,power_ctrl_lpar_ids=none,boot_mode=norm,lpar_keylock=norm,auto_start=0,redundant_err_path_reporting=0,rmc_state=active,rmc_ipaddr=2.5.2.9,time_ref=0,lpar_avail_priority=127,desired_lpar_proc_compat_mode=default,curr_lpar_proc_compat_mode=POWER8,suspend_capable=0,remote_restart_capable=0,simplified_remote_restart_capable=0,sync_curr_profile=0,migration_disabled=1,affinity_group_id=none,vtpm_enabled=0,migr_storage_vios_data_status=Data Collected,migr_storage_vios_data_timestamp=Wed Nov 24 08:17:17 UTC 2021,powervm_mgmt_capable=0
name=ms03-vio2,lpar_id=2,lpar_env=vioserver,state=Running,resource_config=1,os_version=VIOS 3.1.2.21,logical_serial_num=32D4E3X2,default_profile=ostandard,curr_profile=standard,work_group_id=none,shared_proc_pool_util_auth=0,allow_perf_collection=0,power_ctrl_lpar_ids=none,boot_mode=norm,lpar_keylock=norm,auto_start=0,redundant_err_path_reporting=0,rmc_state=active,rmc_ipaddr=192.168.13.5,msp=1,time_ref=0,lpar_avail_priority=191,desired_lpar_proc_compat_mode=default,curr_lpar_proc_compat_mode=POWER8,sync_curr_profile=1,affinity_group_id=none,vtpm_enabled=0,migr_storage_vios_data_status=unavailable,migr_storage_vios_data_timestamp=unavailable,powervm_mgmt_capable=0
name=ms03-vio1,lpar_id=1,lpar_env=vioserver,state=Running,resource_config=1,os_version=VIOS 3.1.2.21,logical_serial_num=32D4E3X1,default_profile=ostandard,curr_profile=standard,work_group_id=none,shared_proc_pool_util_auth=0,allow_perf_collection=0,power_ctrl_lpar_ids=none,boot_mode=norm,lpar_keylock=norm,auto_start=0,redundant_err_path_reporting=0,rmc_state=active,rmc_ipaddr=192.168.13.6,msp=1,time_ref=0,lpar_avail_priority=191,desired_lpar_proc_compat_mode=default,curr_lpar_proc_compat_mode=POWER8,sync_curr_profile=1,affinity_group_id=none,vtpm_enabled=0,migr_storage_vios_data_status=unavailable,migr_storage_vios_data_timestamp=unavailable,powervm_mgmt_capable=0
name=aix05,lpar_id=5,lpar_env=aixlinux,state=Running,resource_config=1,os_version=AIX 7.1 7100-05-09-2148,logical_serial_num=32D4E3X5,default_profile=standard,curr_profile=standard,work_group_id=none,shared_proc_pool_util_auth=0,allow_perf_collection=0,power_ctrl_lpar_ids=none,boot_mode=norm,lpar_keylock=norm,auto_start=0,redundant_err_path_reporting=0,rmc_state=active,rmc_ipaddr=2.5.8.14,time_ref=0,lpar_avail_priority=127,desired_lpar_proc_compat_mode=default,curr_lpar_proc_compat_mode=POWER8,suspend_capable=0,remote_restart_capable=0,simplified_remote_restart_capable=0,sync_curr_profile=0,affinity_group_id=none,vtpm_enabled=0,migr_storage_vios_data_status=Data Collected,migr_storage_vios_data_timestamp=Wed Nov 24 08:17:18 UTC 2021,powervm_mgmt_capable=0
user01@hmc01:~>

Using “lpar status” is much easier!

If necessary, just like with “lpar show” above, the output can be restricted using wildcards, option “-m”, etc. Try the examples above and replace the keyword “show” with the keyword “status”!

The ms command had the subcommands lsproc and lsmem to display processor and memory information. These are also available in the lpar command, but are not shown here. If you want, you can try out these two commands!

Most LPARs use only virtual I/O adapters. For this reason, we will next look at the command “lpar lsvslot“. It shows all virtual adapters of an LPAR. One (exactly one) LPAR must be specified here. Select one of your LPARs and display the virtual slots (adapters):

$ lpar lsvslot aix07
SLOT  REQ  ADAPTER_TYPE   STATE  DATA
0     Yes  serial/server  1      remote: (any)/any connect_status=unavailable hmc=1
1     Yes  serial/server  1      remote: (any)/any connect_status=unavailable hmc=1
5     No   eth            1      PVID=123 VLANS= ETHERNET0 5DD4028D2903
10    No   fc/client      1      remote: ms01-vio1(1)/2 c05076081813005a,c05076081813005b
20    No   fc/client      1      remote: ms01-vio2(2)/2 c05076081813005c,c05076081813005d
$

The output shows the currently existing virtual adapters of the LPAR.

Our example LPAR aix07 has a number of adapters in addition to the two serial adapters in slots 0 and 1. The LPAR has virtual FC adapters in slots 10 and 20. The DATA column shows the associated virtual I/O server and the remote slot number. The two WWPNs of the virtual FC adapter are also displayed. There is a virtual Ethernet adapter in slot 5.

When activating an LPAR for the first time, a profile must be specified. The virtual adapters specified in the profile determine which virtual adapters the LPAR has after activation. The LPAR tool makes it very easy to access the contents of such profiles. All that is required is to add the “-p” option and the profile name to the commands.

But what names do the profiles of an LPAR have?

This can be easily found out with the command “lpar lsprof”. The command displays all defined profiles of an LPAR.

Try this for your example LPAR:

$ lpar lsprof aix07
NAME                      MEM_MODE  MEM    PROC_MODE  PROCS  PROC_COMPAT
last*valid*configuration  ded       53248  shared     2      default
standard                  ded       53248  shared     2      default
$

Every LPAR that is either active or has been active in the past, has a profile called last*valid*configuration. This profile contains the currently active configuration or the last active profile. This profile is managed by PowerVM and should not be changed manually! There should always be at least one other profile created by the user. In our case, the profile is called standard.

View the virtual adapters defined in your profile:

$ lpar -p standard lsvslot aix07
SLOT  REQ  ADAPTER_TYPE   DATA
0     Yes  serial/server  remote: (any)/any connect_status= hmc=1
1     Yes  serial/server  remote: (any)/any connect_status= hmc=1
5     No   eth            PVID=123 VLANS= ETHERNET0
10    No   fc/client      remote: ms01-vio1(1)/2 c05076081813005a,c05076081813005b
20    No   fc/client      remote: ms01-vio2(2)/2 c05076081813005c,c05076081813005d
$

Ideally (in most cases) these should be exactly the same adapters that were already shown above. If the profile does not contain any virtual adapters that were shown above, this means that if the LPAR is reactivated using this profile name, only the virtual adapters contained in the profile will be created. Previously existing adapters will then be set to defined in an AIX LPAR.

As a final example in connection with LPARs, we show how to display the virtual FC mappings of an LPAR. There are several options here, but we will limit ourselves to the simplest option here.

The best way to show the virtual FC mappings of an LPAR is with the command “lpar lsnpiv“. Here, too, exactly one LPAR must be specified as an argument. Start the command for your example LPAR:

$ lpar lsnpiv aix07
VFCSLOT  VFCCLIENT  VIOS       SLOT  NAME       FC    FCLABEL    STATUS     PORTS
C10      fcs0       ms01-vio1  C2    vfchost16  fcs3  myfabric1  LOGGED_IN  5
C20      fcs1       ms01-vio2  C2    vfchost16  fcs5  myfabric2  LOGGED_IN  5
$

The virtual FC adapter fcs0 of the client LPAR aix07 is located in slot C10. The associated server adapter (vfchost16) is located on the virtual I/O server ms01-vio1 in slot C2. The physical FC adapter fcs3 is assigned to the virtual server adapter vfchost16 on ms01-vio1. The virtual client adapter fcs0 is logged in (STATUS is LOGGED_IN) and 5 FC ports are visible in the SAN (the FC adapter itself and 4 storage ports). As of IOS version 3.1.2, user-definable labels for FC adapters are supported, which can be used to store the name of the connected FC fabric or any other information. In our case, the name myfabric1 is stored. The second virtual FC adapter (slot C20, fcs1) is connected to another FC fabric (myfabric2). So you can see at a (quick) glance that the client LPAR:

    • Has a connection to 2 different virtual I/O servers, and
    • is also connected to 2 different FC fabrics.

There are many other subcommands to display additional information, such as:

    • lsattr – List partition or profile attributes
    • lseth – Show virtual ethernet adapters
    • lsfc – Show virtual FC adapters
    • lsled – Display state of system attention LED
    • lslparmigr – List partition migration information
    • lsmem – Show memory
    • lsmemopt – Show DPO memory affinity scores
    • lsnpiv – Show virtual FC mappings
    • lsproc – Show processing resources
    • lsprof – List partition profiles
    • lsrefcode – List reference codes for an LPAR
    • lsscsi – Show virtual SCSI adapters
    • lsserial – Show virtual serial adapters
    • lsslot – Show physical I/O slots
    • lssriov – Show SR-IOV logical ports
    • lsvnic – Show vNIC adapters
    • lsvnicbkdev – Show vNIC backing devices
    • lsvslot – Show virtual slots

For a list of all subcommands supported by lpar, the command can be started without arguments:

$ lpar
USAGE:
   lpar [<option> ...] <keyword> [<option> ...] [<argument> ...]
   lpar -L|-V

Recognized keywords:
   activate - Activate AIX, Linux, IBM i or virtual I/O server partition
   actvnicbkdev - Make virtual NIC backing device active
   addeth - Add virtual ethernet adapter

$