Steve's Power Systems BlogPower BlogContactLog inRegister
  • Power Blog
  • Contact

  • Register

IBM Power Systems Blog

Power Systems
  • Front Page
  • Categories
  • Archives
  • Latest comments
  • « vNIC and VIO Servers at 2.2.4.21
  • How to configure IBM SRIOV Adapters »

How to configure IBM vNIC Adapters

Posted by steve on 17 Sep 2016 in VIO Server Tips, AIX Tips, SRIOV and vNIC, HMC Tips

Here are some hints and tips for configuring vNIC adapters.

 

In these examples, will add, configure and then remove a vNIC adapter to the Client LPAR (id 80) using slot number 16.  The adapter will come from an SRIOV 4-port Converged Network Adapter, the adapter number is 7, we will use port 1 and assign an Entitlement of 4% of the ports bandwidth.

 

 

Checking the LPARs current profile for any vNIC adatpers.

This first output shows there are no vNIC adapters configured in the LPARs profile.

lssyscfg -m ServerE880 -r prof --filter lpar_ids=80,profile_names=normal -F lpar_name,lpar_id,name,vnic_adapters

TEST080,80,normal,none

 

Format of the SRIOV options.

sriov/vios-lpar-name/vios-lpar-ID/sriov-adapter-ID/sriov-physical-port-ID/[capacity][/[failover-priority]]

Where capacity is optional and defaults to 2, failover-priority is optional and defaults to 50.

 

Adding a vNIC adapter to running profile.

chhwres -m ServerE880 --id 80 -r virtualio --rsubtype vnic -o a -s 16 -a "backing_devices=sriov/vio011/2/7/1/4"

 

Adding a vNIC to the LPARs current profile.

chsyscfg -m ServerE880 -r prof -i "lpar_name=TEST080,name=normal,vnic_adapters+=slot_num=16:is_required=0:backing_devices=sriov/vio011/2/7/1/4"

 

Check the LPARs current profile.

lssyscfg -m ServerE880 -r prof --filter lpar_ids=80,profile_names=normal -F lpar_name,lpar_id,name,vnic_adapters

TEST080,80,normal,"16:ded:0:0:all::all:0:sriov/vio011/2/7/1/4.0

 

Check the LPARs running profile.

lshwres -m ServerE880 -r virtualio --rsubtype vnic --filter lpar_ids=80

lpar_name=TEST080,lpar_id=80,slot_num=16,desired_mode=ded,curr_mode=ded,port_vlan_id=0,pvid_priority=0
,allowed_vlan_ids=all,mac_addr=abcdef123410,allowed_os_mac_addrs=all,desired_capacity=4.0,backing_devices=sriov/vio011/2/7/0/2701c00c/4.0

 

What do all those values mean?

The backing_device format = sriov/VIOS_Name/VIOS_ID/SRIOV_Adapter/SRIOV_Port/Bandwidth

The vnic_adapters fields from lssyscfg follow the same format as the backing_device field.

Where:

sriov           = Must be sriov

VIOS_Name       = The VIO Server name as shown in HMC.

VIOS_ID         = The VIO Server ID number as shown in HMC.

SRIOV_Adapter   = The SRIOV adapter_id.

As show with:

lshwres -m ServerE880 -r sriov --rsubtype adapter

SRIOV_Port      = The SRIOV phys_port_id.

As show with:

lshwres -m ServerE880 -r sriov --rsubtype physport --level ethc     # For 10Gb Ports

lshwres -m ServerE880 -r sriov --rsubtype physport --level eth      # For 1Gb Ports

Bandwidth       = The percentage of the ports bandwidth this vNIC is entitled to.

 

To see how much bandwidth is currently assigned for all SRIOV adapters.

lshwres -m ServerE880 -r sriov --rsubtype logport --level eth -F lpar_name,adapter_id,phys_port_id,capacity

 

To see how much bandwidth is currently assigned for just the adapter and port you are configuring.

Add the grep, where the first digit is the Adapter ID and the second digit is the Port ID, with a comma seperating them.

lshwres -m ServerE880 -r sriov --rsubtype logport --level eth -F lpar_name,adapter_id,phys_port_id,capacity | grep 7,1

vio011,7,1,50.0
vio011,7,1,4.0

So there is 54% consumed capacity, meaning up to 46% can be assigned to other Logical Ports.

 

From the Client LPAR.

Confirm that a new Virutal Slot has been added, it should show as Unknown.

lsslot -c slot | grep -e Device -e Unknown

# Slot Description Device(s)
U9119.MHE.E880-V80-C16 Virtual I/O Slot Unknown

 

Run config manager to configure the device.

cfgmgr

 

Check the device is created with lsdev and lscfg.

lsdev -Cc adapter |grep vnic

ent6 Available Virtual NIC Client Adapter (vnic)

 

lscfg -vl ent6 | grep ent

ent6 U9119.MHE.E880-V80-C16 Virtual NIC Client Adapter (vnic)

 

vNIC adapters do not set Jumbo Frames by default.

If your switch is configured for Jumbo Frames, enable Jumbo Frames for the Adapter.

lsattr -El en6 | grep mtu

mtu 1500 Maximum IP Packet Size for This Device True

 

chdev -l en6 -a mtu=9000 -a state=detach

en6 changed

 

From the VIO Server.

Check the vNIC setup and mappings.

padmin@vio011: lsmap -all -vnic

Name Physloc ClntID ClntName ClntOS
------------- ---------------------------------- ------ -------------- -------
vnicserver0 U9119.MHE.E880-V2-C32897 80 TEST080 AIX

Backing device:ent43
Status:Available
Physloc:U78CA.001.serial-P1-C2-C1-T2-S14
Client device name:ent6
Client device physloc:U9119.MHE.E880-V80-C16

 

padmin@auirvioh1en011: vnicstat -b vnicserver0

--------------------------------------------------------------------------------
VNIC Server Statistics: vnicserver0
--------------------------------------------------------------------------------
Device Statistics:
------------------
State: config_2
Backing Device Name: ent43

Client Partition ID: 80
Client Partition Name: TEST080
Client Operating System: AIX
Client Device Name: ent6
Client Device Location Code: U9119.MHE.E880-V80-C16

 

How to Remove a nVIC Adapter.

From the Client LPAR, de-configre any IP details and remove the AIX adapters.

rmdev -dl ent${X} rmdev -dl en${X} rmdev -dl et${X}

 

Confirm the Device is now showing as Unknown.

lsslot -c slot | grep -e Device -e Unknown

# Slot Description Device(s)
U9119.MHE.E880-V80-C16 Virtual I/O Slot Unknown

 

Check the LPARs running profile.

lshwres -m ServerE880 -r virtualio --rsubtype vnic --filter lpar_ids=80

lpar_name=TEST080,lpar_id=80,slot_num=16,desired_mode=ded,curr_mode=ded,port_vlan_id=0,pvid_priority=0
,allowed_vlan_ids=all,mac_addr=abcdef123410,allowed_os_mac_addrs=all,desired_capacity=4.0,backing_devices=sriov/vio011/2/7/1/2701c00c/4.0

 

Remove the vNIC adapter from the running profile.

chhwres -m ServerE880 --id 80 -r virtualio --rsubtype vnic -o r -s 16

 

Display the LPARs current profile settings for vNIC adapters.

lssyscfg -m ServerE880 -r prof --filter lpar_ids=80,profile_names=normal -F lpar_name,lpar_id,name,vnic_adapters

TEST080,80,normal,"16:ded:0:0:all::all:0:sriov/vio011/2/7/1/4.0

 

Remove the vNIC adapter from the LPARs profile.

chsyscfg -m ServerE880 -r prof -i "lpar_name=TEST080,name=normal,vnic_adapters-=slot_num=16:is_required=0:backing_devices=sriov/vio011/2/7/1/4"

 

 

 

Tags: 4-port Converged Network AdapterAIXDLPARSRIOVVIO ServerVIOSvNIC

2 comments

Comment from: Pete in PDX Visitor

Pete in PDX

Trying to add this

vnic_adapters+=slot_num=2:is_required=1:backing_devices=sriov/btsbwviou2/3/2/1/6.0/50,sriov/btsbwviou2/3/2/1/6.0/50

But I cant't seem to get around formatting and or the shell

chsyscfg -m 8408-44E-xxxxx -r prof -i "lpar_name=test11,name=try2, vnic_adapters+=slot_num=2:is_required=0:backing_devices=sriov/btsbwviou2/3/2/1/6.0/50,sriov/btsbwviou2/3/2/1/6.0/50"

07/06/17 @ 05:41 am

Comment from: steve Member


Fatal error: Uncaught Error: Call to undefined function finfo_open() in /home4/capacity/public_html/AIX_Blog/inc/files/model/_file.funcs.php:379 Stack trace: #0 /home4/capacity/public_html/AIX_Blog/inc/files/model/_file.funcs.php(405): is_image_file('/home4/capacity...') #1 /home4/capacity/public_html/AIX_Blog/inc/files/model/_file.class.php(1019): imgsize('/home4/capacity...', 'widthheight') #2 /home4/capacity/public_html/AIX_Blog/inc/files/model/_file.class.php(1037): File->load_lastmod_ts() #3 /home4/capacity/public_html/AIX_Blog/inc/files/model/_file.class.php(2499): File->get_lastmod_ts() #4 /home4/capacity/public_html/AIX_Blog/inc/files/model/_file.class.php(2715): File->get_thumb_url('crop-top-64x64', '&', 1) #5 /home4/capacity/public_html/AIX_Blog/inc/files/model/_file.class.php(2558): File->get_img_attribs('crop-top-64x64', '', NULL, 1, NULL) #6 /home4/capacity/public_html/AIX_Blog/inc/users/model/_user.class.php(5244): File->get_thumb_imgtag('crop-top-64x64', 'bCommentAvatar', '', '', NULL) #7 /home4/capacity/pu in /home4/capacity/public_html/AIX_Blog/inc/files/model/_file.funcs.php on line 379