You can configure the anet resource of a kernel zone with the available SR-IOV VF by setting the zonecfg property iov.
Allocates a VF if it is available. Otherwise, uses a paravirtual device.
Allocates a VF. If a VF is not available, the anet resource creation fails. For information about how to check the available VFs on a datalink, see Example 29, Displaying VFs Information for Datalinks.
VF is not allocated. The off value is the default value for the iov property.
For more information about SR-IOV on kernel zones, see Managing Single-Root I/O NIC Virtualization on Kernel Zones in Creating and Using Oracle Solaris Kernel Zones.Example 28 Configuring Kernel Zones With SR-IOV VFs
This example shows how to configure the anet resource of the kernel zone kz1 with a SR-IOV VF.
# zonecfg -z kz1 zonecfg:kz1> select anet id=0 zonecfg:kz1:anet> set iov=auto zonecfg:kz1:anet> end zonecfg:kz1> exit
If you configure the anet resource over the lower datalink net1, you must ensure that the iov link property for net1 is set to on before booting the kernel zone kz1. You can check the iov property for the lower datalink net1.
# dladm show-linkprop -p iov net1 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net1 iov rw off off auto auto,on,off
The output shows that the value of the iov property is off for the lower datalink net1. Set the iov property to on.
# dladm set-linkprop -p iov=on net1
After you boot the kernel zone, a VF is successfully allocated to the anet resource. Verify whether the VF is added to the kernel zone kz1.
# zlogin kz1 kz1# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net0 Ethernet up 10000 full ixgbevf0
You cannot use the iov property with native zones because the iov property does not provide any benefit for native zones.
You cannot set the iov property to auto or on if the anet resource is configured with any of the following properties:
Similarly, you cannot set these properties if you have already set the iov property to auto or on.
After you create a VF anet resource, it appears as a VNIC in the host similar to the other regular anet resources. The only difference is that you cannot modify any link property for the VF anet resource.
You can add multiple VF anet resources to a kernel zone. However, the VF physical links that appear in a kernel zone cannot be aggregated.
If you set the iov property to on or auto, the kernel zone does not support live migration and suspend or resume operations. The zoneadm migrate or zoneadm suspend commands fail.