This patch implements NPIV support. I don't have easy access to an
NPIV capable switch at the moment, so this is all untested code at
least from the perspective of whether it actually creates and deletes
virtual adapters, but I thought I should get it out to the list for
comment sooner rather than later. I'll have a switch shortly. If
anybody has an NPIV capable test SAN and wants to test it as well, I'd
much appreciate the feedback.
Note that libvirt doesn't do any sanity checking of the WWPN/WWNN. It
expects the kernel to verify that the names are valid and the calling
application to verify that the names are appropriate for the fabric.
The XML to create a pool and create the virtual adapter when the pool
is started is:
<pool type="scsi">
<name>npiv</name>
<source>
<adapter name="host6" wwpn="0000111122223333"
wwnn="4444555566667777"/>
</source>
<target>
<path>/dev/disk/by-id</path>
</target>
</pool>
Stopping the pool deletes the vport.
Dave