IBM Support

How to dlpar virtual adapters using CLI

How To


Summary

This document describes how to use the HMC command-line interface (CLI) to dynamically add client/server virtual scsi and fibre channel (fc) adapters to running partitions. CLI allows the user to specify details such as the adapter ID number which the HMC enhanced UI (V9R1M920 and earlier) may not allow.

Objective

Use chhwres command to dynamically add client and/or server virtual adapters, including specifying the adapter ID number.

Environment

All HMC releases.  The information applies to both VIOS (VSCSI and VFC) and IBM i hosted IO (VSCSI).

Steps

1. Create the client adapter in the hosted partition

a. VSCSI

chhwres -m <managed system> -r virtualio --rsubtype scsi -o a -p <client partition name>  -a "adapter_type=client,remote_lpar_name=<hosting partition name>,remote_slot_num=<hosting scsi server adapter>"
Optionally you can add a "-s <client adapter #>" to specify the client adapter ID.

b. VFC

chhwres -m <managed system> -r virtualio --rsubtype fc -o a -p <client partition name>  -a "adapter_type=client,remote_lpar_name=<hosting partition name>,remote_slot_num=<hosting fc server adapter>"
Optionally you can add a "-s <client adapter #>" to specify the client adapter ID.

2. Create the server adapter in the hosting partition

The hosting partition can be VIOS (VFC or VSCSI) or IBM i (VSCSI)

a. VSCSI
chhwres -m <managed system> -r virtualio --rsubtype scsi -o a -p <hosting partition name>  -a "adapter_type=server,remote_lpar_name=<client partition name>,remote_slot_num=<scsi client adapter from step 1>"

Optionally you can add a "-s <server adapter #>" to specify the server adapter ID.

b. VFC
chhwres -m <managed system> -r virtualio --rsubtype fc -o a -p <hosting partition name>  -a "adapter_type=server,remote_lpar_name=<client partition name>,remote_slot_num=<fc client adapter from step 1>"

Optionally you can add a "-s <server adapter #>" to specify the server adapter ID.

3. Map the resources to the server adapter

Use VIOS or IBM i command-line to map the specified resource to the server adapter.  For example, map the VFC server adapter to a physical fibre channel card port; map the tape, optical or disk to assign to the partition to a VSCSI adapter.

Useful Commands

To delete an adapter:
chhwres -r virtualio -m <managed server> -o r -p <partition name>  -s <adapter slot number> 
Note the same command is used for both VSCSI and VFC. 


To list the existing VSCSI adapters:
lshwres -m <managed system> -r virtualio --rsubtype scsi
To list the existing VFC adapters:
lshwres -m <managed system> -r virtualio --rsubtype fc --level lpar

To filter for one or more specific partitions add:   --filter "lpar_names=<partition name>"

Saving dynamic changes to the profile

Dynamic changes must be saved to the profile or they will lost on the next shutdown and activate profile.     If the partition is set to automatically save dynamic changes (the default for partitions created with the enhanced UI), then nothing needs to be done; the HMC will automatically save the changes done above to the last activated profile.  To view/change the setting:
Partition Properties > General Properties   Advanced check box,  Save configuration changes to profile

image-20180926162802-1
Note that enabling it does not save previous changes, only future changes.

To manually save the changes to the profile, use the save current configuration task:    Partition Actions > Profiles > Save Current Configuration.  Click OK to overwrite the existing profile with the current settings.
 

Additional Information

For more information on using the chhwres command see the HMC man pages.  At the HMC restricted shell type:

man chhwres

To learn how to access the restricted shell remotely see HMC Version 8 Enhanced: Enabling ssh/remote command execution at http://www.ibm.com/support/docview.wss?uid=nas8N1021897

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SGGSNP","label":"Hardware Management Console V9"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
22 September 2021

UID

ibm10733142