[libvirt-users] Question about vport operation for FC HBA

Dennis Chen xschen at tnsoft.com.cn
Thu Jun 20 09:07:47 UTC 2013


Hi,

When I want to use NPIV for a FC HBA in my Linux machine, I got the 
below error msg in virsh:

virsh # nodedev-create /home/kvm/vHBA.xml
error: Failed to create node device from /home/kvm/vHBA.xml
error: internal error Parent device scsi_host20 is not capable of vport 
operations

I checked the /sys/class folder for my HBA device that I want to use its 
NPIV feature, it's there:
/sys/class/fc_host/host20/vport_create

I can create a vHBA by using "echo 'xxxx:xxxx' > ./vport_create", a new 
fc host will be created after that.

But I can't find any FC host with:
#virsh nodedev-list --cap fc_host

SCSI hosts can be found for above "nodedev-list  --cap scsi_host".

The libvirt I am working on is based ver 1.0.5, I checked the code and 
found below function is seems related with this issue:
src/util/virutil.c:
int
virIsCapableVport(const char *sysfs_prefix,
                   int host)

This function looks up if there is "vport_create" file under 
/sys/class/fc_host/host20, as the way to decide if a HBA device is 
capable of vport operation.

But seems this file is not compiled and virsh doesn't call it in my 
source code environment... is there any tips  ?

BRs,
Dennis




More information about the libvirt-users mailing list