If in a PowerVM environment a virtual Ethernet adapter is to be added to an active LPAR using the LPAR-Tool, the LPAR must have an active RMC connection to an HMC. This requires an active Ethernet adapter (physical or virtual). A free virtual slot is required for the virtual Ethernet adapter.
$ lpar lsvslot aix22 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=100 VLANS= ETHERNET0 1DC8DB485D1E 10 No fc/client 1 remote: ms03-vio1(1)/5 c05076030aba0002,c05076030aba0003 20 No fc/client 1 remote: ms03-vio2(2)/4 c05076030aba0000,c05076030aba0001 $
The virtual slot 6 is not yet used by the LPAR aix22. A virtual Ethernet adapter can be added with the command “lpar addeth“. At least the desired virtual slot number for the adapter and the desired port VLAN ID must be specified:
$ lpar addeth aix22 6 900 $
In the example, a virtual Ethernet adapter for aix22 with port VLAN ID 900 was created in slot 6. If the slot number doesn’t matter, the keyword auto can be specified instead of a number; the LPAR tool then automatically assigns a free slot number. The virtual adapter is available immediately, but must first be made known to the operating system. How this happens exactly depends on the operating system used. In the case of AIX there is the cfgmgr command for this purpose.
After the virtual Ethernet adapter has been added, but before a run of cfgmgr is started, only the virtual Ethernet adapter ent0 is known to the AIX operating system of the LPAR aix22:
aix22 # lscfg -l ent* ent0 U9009.22A.8991971-V30-C5-T1 Virtual I/O Ethernet Adapter (l-lan) aix22 #
After a run of cfgmgr the newly added virtual Ethernet adapter appears as ent1:
aix22 # cfgmgr aix22 # lscfg -l ent* ent0 U9009.22A.8991971-V30-C5-T1 Virtual I/O Ethernet Adapter (l-lan) ent1 U9009.22A.8991971-V30-C6-T1 Virtual I/O Ethernet Adapter (l-lan) aix22 #
Note: On AIX, the device name for an Ethernet adapter cannot be used to identify the type. Regardless of whether an Ethernet adapter is physical or virtual or a virtual function of an SR-IOV adapter, the device name ent with an ascending instance number is always used.
If an IEEE 802.1q compatible virtual Ethernet adapter with additional VLAN IDs is to be created, the option “-i” (IEEE 802.1q compatible adapter) must be used. Alternatively, the ieee_virtual_eth=1 attribute can also be specified. The additional VLAN IDs are specified as a comma-separated list:
$ lpar addeth -i aix22 7 900 100,200,300 $
The port VLAN ID is 900, and the additional VLAN IDs are 100, 200 and 300.
If an LPAR has no active RMC connection or is not active, then a virtual Ethernet adapter can only be added to one of the profiles of the LPAR. This is always the case, for example, if the LPAR has just been created and has not yet been installed.
In this case, only the option “-p” with a profile name has to be used for the commands shown. Which profiles an LPAR has, can easily be found out using “lpar lsprof” (list profiles):
$ lpar lsprof aix22 NAME MEM_MODE MEM PROC_MODE PROCS PROC_COMPAT standard ded 7168 ded 2 default last*valid*configuration ded 7168 ded 2 default $
(The last active configuration is stored in the profile with the name last*valid*configuration.)
The virtual adapters defined in the profile standard can then be displayed by specifying the profile name with “lpar lsvslot“:
$ lpar -p standard lsvslot aix22 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=100 VLANS= ETHERNET0 6 No eth PVID=900 VLANS= ETHERNET0 7 No eth IEEE PVID=900 VLANS=100,200,300 ETHERNET0 10 No fc/client remote: ms03-vio1(1)/5 c05076030aba0002,c05076030aba0003 20 No fc/client remote: ms03-vio2(2)/4 c05076030aba0000,c05076030aba0001 $
When adding the adapter, only the corresponding profile name has to be given, otherwise the command looks exactly as shown above:
$ lpar -p standard addeth -i aix22 8 950 150,250 $
In order to make the new adapter available in slot 8, the LPAR must be activated again by default, specifying the profile name.