How To
Summary
Using CLI command to balance or choosing the fcs adapter's during LPM.
Objective
Provide basic building CLI command example for choosing the fcs adapters for LPM. HMC GUI does not offer the option to select a particular FC port on particular VIOS on the target system. By default, the HMC orchestrator will automatically select the best options that match the criteria to host the mobile LPAR on the target system.
There may be a situation in which you may want to use a specific FC port port on a target VIOS. In order to do that, migrlpar command can be used with the virtual_fc_mappings option.
Environment
HMC
VIOS 4.1
AIX, Linux, IBMi
Steps
1. Getting clients virtual adapter mappings:
# lscfg | grep fcs fcs0 U9080.M9S.FWM0001-V7-C3-T1 Virtual Fibre Channel Client Adapter fcs1 U9080.M9S.FWM0001-V7-C4-T1 Virtual Fibre Channel Client Adapteror
lscfg -l fcs0 ; lscfg -l fcs1
# lscfg -l fcs0 fcs0 U9080.M9S.FWM0001-V7-C3-T1 Virtual Fibre Channel Client Adapter # lscfg -l fcs1 fcs1 U9080.M9S.FWM0001-V7-C4-T1 Virtual Fibre Channel Client Adapter - Client lpar ID = V7
- Client lpar slots = C3 and C4
Note: You can get the same information from snap data.
2. Getting the client and VIO Server mappings
- VIO Server = opslab40
- VIO Server = opslab41
Note: You can get the same information from snap data.
3. From Source VIO, i.e opslab40 vfchost0) per (#2)
- Client lpar slots = C3 and C4
Note: You can get the same information from snap data.
2. Getting the client and VIO Server mappings
# echo "vfcs" |kdb| grep fcs (0)> vfcs fcs0 0xF1000B01C09B4000 0x0010 0x0001 0 0 vfchost0 fcs0 opslab40 fcs1 0xF1000B01C0724000 0x0010 0x0001 0 0 vfchost0 fcs0 opslab41- VIO Server = opslab40
- VIO Server = opslab41
Note: You can get the same information from snap data.
3. From Source VIO, i.e opslab40 vfchost0) per (#2)
$ lsmap -vadapter vfchost0 -npiv Name Physloc ClntID ClntName ClntOS ------------- ---------------------------------- ------ -------------- ------- vfchost0 U9080.M9S.FWM0001-V3-C2 7 sanlab17 AIX Status:LOGGED_IN FC name:fcs0 FC loc code:U78D5.ND1.CSS12AD-P1-C4-C1-T1 Ports logged in:5 Flags:0x32a<LOGGED_IN,STRIP_MERGE,SCSI_CLIENT> VFC client name:fcs0 VFC client DRC:U9080.M9S.FWM0001-V7-C34. From Source VIO, in this example, opslab41 vfchost0 per #2
$ lsmap -vadapter vfchost0 -npiv Name Physloc ClntID ClntName ClntOS ------------- ---------------------------------- ------ -------------- ------- vfchost0 U9080.M9S.FWM0001-V4-C2 7 sanlab17 AIX Status:LOGGED_IN FC name:fcs0 FC loc code:U78D5.ND3.CSS1282-P1-C2-C1-T1 Ports logged in:5 Flags:0x32a<LOGGED_IN,STRIP_MERGE,SCSI_CLIENT> VFC client name:fcs1 VFC client DRC:U9080.M9S.FWM0001-V7-C4 NOTE: VFC client DRC = Shows Client ID and client slot 5. From HMC you can get mapping for VIO server and client using:
a. lssyscfg command to get the managed system name serving the client in question.
lssyscfg -r sys -F name b. lshwres with -m parameter to specify the managed system name and the client partition ID for the lpar_ids parameter:
lshwres -r virtualio --rsubtype fc -m <managed_system_name> --level lpar --filter lpar_ids=<client_partition_ID> Example:
lshwres -r virtualio --rsubtype fc -m VIRT-9117-MMB-SN10F6B1R --level lpar --filter lpar_ids=7 c. Look for the line including the client lpar_id and slot_num obtained in steps 2 and 3.
Record the VIOS partition name located in the remote_lpar_name field and the slot number of the virtual FC server adapter, which is located in the remote_lpar_id field as shown below:
Record the VIOS partition name located in the remote_lpar_name field and the slot number of the virtual FC server adapter, which is located in the remote_lpar_id field as shown below:
NOTE: With above you should have all the information to build the LPM command to use the desrired fcs adapters on the target side.
6. From Destination VIO servers locate the NPIV capable fcs adapters
Example for one of the VIO Servers
$ lsnportsExample for one of the VIO Servers
name physloc fabric tports aports swwpns awwpns fcs0 U78D5.ND1.CSS12AD-P1-C4-C1-T1 1 64 58 2032 2007 fcs1 U78D5.ND1.CSS12AD-P1-C4-C1-T2 1 64 62 2032 20207. Building the command:
*** You will need to locate unused adapter and slots using "lscfg" command ***
migrlpar -o v -m [src-frame] -t [target-frame] -p [CLIENT_PARTIONO_NAME] -i "virtual_fc_mappings= 3//1/des_vio_slt_unused1/des_fcs_adapter_fcs0, 4//2/des_vio_slt_unused2/des_fcs_adapter_fcs1", source_msp_name=uadr1vio1,source_msp_ipaddr=[IP_ADDRESS], dest_msp_name=uadr2vio1,dest_msp_ipaddr=[IP_ADDRESS] -d 5 NOTE: Format:
clnt_slt/des_vio_name/des_vio_id/des_vio_slt/des_fcs_adapter,
clnt_slt/des_vio_name/des_vio_id/des_vio_slt/des_fcs_adapter,
NOTE: Example for VFC mapping command:
<Client_slot_num>/<target_vios_name>/<target_vios_id>/<target_slot_num>/<vios_fc_port_name>
<Client_slot_num>/<target_vios_name>/<target_vios_id>/<target_slot_num>/<vios_fc_port_name>
NOTE: For -p you can use ID number
rajpat@us.ibm.com
------------------
------------------
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSPHKW","label":"PowerVM Virtual I\/O Server"},"ARM Category":[{"code":"a8m50000000L1j9AAC","label":"Live Partition Mobility"}],"ARM Case Number":"TS015147686","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"3.1.0"}]
Was this topic helpful?
Document Information
Modified date:
25 September 2026
UID
ibm17107045