Skip to contentSkip to conversation

Testing NPIV Feature with Qemu-KVM

DISCUSSION chandrashekar shastri 3 participants 4 messages Sep 2, 2013 – Sep 5, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi All,

I am testing NPIV feature on upstream Qemu, I have configured the zone and able to see the created vport on the storage array.

Since, I am learning on how to setup the NPIV, I haven't created the different zone for the vport and the array, I just added in the existing zone.

Now, how do pass the LUN to the qemu, from Dr. Hannes Reineckei mail thread I got to know that lspci command on the host doesn't show the virtual HBA.

I didn't understand why there is limitation on that and if I specify /usr/libexec/qemu-kvm -enable-kvm Fedora19 -m 3000 -smp 2 -net nic -net \ user -vnc 127.0.0.1:0 -drive if=scsi,file=/dev/sdj

How do I make sure that qemu is using the virtual HBA or (vport)?

Thanks,
Shastri

#1 lore raw
Quoted 8 lines · chandrashekar shastri

I am testing NPIV feature on upstream Qemu, I have configured the zone and able to see the created vport on the storage array.

Since, I am learning on how to setup the NPIV, I haven't created the different zone for the vport and the array, I just added in the existing zone.

Now, how do pass the LUN to the qemu, from Dr. Hannes Reineckei mail thread I got to know that lspci command on the host doesn't show the virtual HBA.

Quoted 7 lines

I didn't understand why there is limitation on that and if I specify /usr/libexec/qemu-kvm -enable-kvm Fedora19 -m 3000 -smp 2 -net nic -net \ user -vnc 127.0.0.1:0 -drive if=scsi,file=/dev/sdj

How do I make sure that qemu is using the virtual HBA or (vport)?

From my limited knowledge of NPIV, after you create the vport on the

host you'll have a new "SCSI host" which scans LUNs. That means new SCSI devices appear on the host.

You can use "ls -al /sys/class/scsi_host" to see the SCSI hosts that are active.

You can use "virsh nodedev-list --tree" to see the details of the devices.

This should help you find the NPIV LUNs which can be passed to QEMU.

Stefan

#2 lore raw

<snip>

Quoted 8 lines
Quoted 1 line

How do I make sure that qemu is using the virtual HBA or (vport)?

From my limited knowledge of NPIV, after you create the vport on the host you'll have a new "SCSI host" which scans LUNs. That means new SCSI devices appear on the host.

You can use "ls -al /sys/class/scsi_host" to see the SCSI hosts that are active.

Also, there will be a /sys/class/fc_host, associated with the scsi_host. It will have a port_type, that when read, should show "NPIV VPORT".

//Rob

#3 lore raw
In reply to Stefan Hajnoczi
Quoted 19 lines · Stefan Hajnoczi
Quoted 6 lines · chandrashekar shastri

I am testing NPIV feature on upstream Qemu, I have configured the zone and able to see the created vport on the storage array.

Since, I am learning on how to setup the NPIV, I haven't created the different zone for the vport and the array, I just added in the existing zone.

Quoted 7 lines

Now, how do pass the LUN to the qemu, from Dr. Hannes Reineckei mail thread I got to know that lspci command on the host doesn't show the virtual HBA.

I didn't understand why there is limitation on that and if I specify /usr/libexec/qemu-kvm -enable-kvm Fedora19 -m 3000 -smp 2 -net nic -net \ user -vnc 127.0.0.1:0 -drive if=scsi,file=/dev/sdj

How do I make sure that qemu is using the virtual HBA or (vport)?

From my limited knowledge of NPIV, after you create the vport on the
host you'll have a new "SCSI host" which scans LUNs. That means new SCSI devices appear on the host.

Quoted 6 lines

You can use "ls -al /sys/class/scsi_host" to see the SCSI hosts that are active.

You can use "virsh nodedev-list --tree" to see the details of the devices.

This should help you find the NPIV LUNs which can be passed to QEMU.

Also, there will be a /sys/class/fc_host, associated with the scsi_host. It will have a port_type, that when read, should show "NPIV VPORT".

//Rob