7.7.1. Creating a vNIC Adapter
Although the construction of a vNIC adapter is not that simple, after all it consists of at least 3 adapters (vNIC client adapter, vNIC server adapter and logical SR-IOV port), a vNIC adapter can be created relatively easily with just one command. In the simplest case, only the virtual I/O server for the vNIC backing device and the physical SR-IOV port have to be specified. The command to create a vNIC adapter is “lpar addvnic” (add vNIC adapter):
$ lpar addvnic aix22 6 ms03-vio1 P1-C11-T1
Here a vNIC adapter has been created in virtual slot 6 of the client LPAR aix22. The vNIC backing device is created on the virtual I/O server ms03-vio1, together with the logical SR-IOV port for the physical SR-IOV port with physical location code P1-C11-T1. Instead of the physical location code, the adapter ID and physical port ID of the physical SR-IOV port can also be specified.
Config manager cfgmgr must be started on an AIX LPAR in order that the vNIC client adapter can be used. Like all other Ethernet adapters, the vNIC client adapter receives a device name with the prefix ent:
aix22 # cfgmgr
aix22 # lsdev -l ent\*
ent0 Available Virtual I/O Ethernet Adapter (l-lan)
ent1 Available Virtual NIC Client Adapter (vnic)
The configuration of the new Ethernet adapter works in the same way as for any other Ethernet adapter!
The existing vNIC adapters of an LPAR can be displayed with the command “lpar lsvnic” (list vNIC):
$ lpar lsvnic aix22
LPAR_NAME SLOT MODE FAILOVER PVID PRIORITY MAC_ADDR ALLOWED_VLAN_IDS BKDEVS
aix22 6 ded Yes 0 0 81253aa07306 all 1
The output shows that there is only one vNIC adapter in slot 6 of the LPAR. There is one vNIC backing device (column BKDEVS). All attributes of the vNIC adapter have default values. When creating a vNIC adapter, the attributes can be specified on the command line. An overview of the possible attributes can be found e.g. in the online help (“lpar help addvnic“).
The associated vNIC backing devices of the vNIC adapters can also be listed, for this only the option “-a” (all vNIC backing devices) must be used for “lpar lsvnic”:
$ lpar lsvnic -a aix22
FAILOVER PHYS LOGICAL CURRENT MAX
LPAR_NAME SLOT FAILOVER PRIORITY ACTV STATUS VIOS_NAME ADAPTER PORT PORT CAPACITY CAPACITY
aix22 6 Yes 50 1 Operational ms03-vio1 1 0 27004005 2.0 100.0
The operational value in the column STATUS shows that the associated physical SR-IOV port has a link, so network packets can be sent and received. The logical SR-IOV port 27004005 belonging to the vNIC backing device has a guaranteed capacity of 2% of the physical port.
The logical SR-IOV port 27004005 has been created on the virtual I/O server ms03-vio1:
$ lpar lssriov ms03-vio1
LPORT REQ ADAPTER PPORT CONFIG_ID CAPACITY MAX_CAPACITY PVID VLANS MAC_ADDR CLIENTS
27004005 Yes 1 0 16384 2.0 100.0 0 all a1b586737e00 aix22
The associated vNIC backing devices on the virtual I/O server can be displayed using “lpar lsvnicbkdev“:
$ lpar lsvnicbkdev ms03-vio1
FAILOVER PHYS LOGICAL MAX
LPAR_NAME ACTV STATUS PRIORITY ADAPTER PORT PORT CAPACITY CAPACITY
ms03-vio1 1 Operational 50 1 0 27004005 2.0 100.0
The output is similar to the output of “lpar lsvnic -a“.
Figure 7.20 shows parts of the device trees on the virtual I/O server and client LPAR, as well as the interaction of the various devices.