This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1270581 - [RFE] Hostdev_passthrough: support SCSI FC tape device
[RFE] Hostdev_passthrough: support SCSI FC tape device
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: RFEs (Show other bugs)
---
Unspecified Unspecified
high Severity medium (vote)
: ovirt-4.0.0-beta
: 4.0.0
Assigned To: Martin Polednik
Nisim Simsolo
: FutureFeature
Depends On: 1301104
Blocks: 1097653 1416027
  Show dependency treegraph
 
Reported: 2015-10-11 08:24 EDT by Nisim Simsolo
Modified: 2017-01-24 06:56 EST (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Previously, Red Hat Virtualization only allowed hostdev passthrough of USB and PCI devices. To assign storage cards directly to a virtual machine users had to assign the whole adapter as PCI device. The problem with this approach is that PCI passthrough has specific hardware requirements. This feature allows administrators to passthrough a LUN directly to a virtual machine, allowing for full set of SG commands. This means tapes, changers, and anything speaking SCSI protocol can be assigned directly without specific hardware requirements with the exception of assigned device itself.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-05 03:39:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.0.0+
gklein: testing_plan_complete+
mgoldboi: planning_ack+
tjelinek: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)
engine.log (5.67 MB, text/plain)
2015-10-11 08:25 EDT, Nisim Simsolo
no flags Details
vdsm.log (5.66 MB, text/plain)
2015-10-11 08:26 EDT, Nisim Simsolo
no flags Details
libvirt XML (26.31 KB, text/plain)
2015-10-12 02:55 EDT, Nisim Simsolo
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 55022 master MERGED hostdev: expose generic scsi driver char device in device params 2016-05-08 09:50 EDT
oVirt gerrit 55023 master MERGED hostdev: make _update_usb_device_info more generic 2016-05-08 09:50 EDT
oVirt gerrit 55024 master MERGED hostdev: add support for SCSI 2016-05-08 09:50 EDT
oVirt gerrit 56037 master MERGED hostdev: use libvirt flags to select capability 2016-05-01 08:39 EDT
oVirt gerrit 56038 master MERGED hostdev: report additional information in 'scsi' device 2016-05-08 09:50 EDT
oVirt gerrit 56123 master MERGED hostdev: report storage model as product 2016-05-08 09:50 EDT

  None (edit)
Description Nisim Simsolo 2015-10-11 08:24:23 EDT
Description of problem:
Trying to run VM with emulated scsi tape device (https://bugzilla.redhat.com/show_bug.cgi?id=1103739#c10) attached, failed with the next event:
"VM rhel7_amd_cuda is down with error. Exit message: XML error: 'bus', 'target', and 'unit' must be specified for scsi hostdev source address."

Version-Release number of selected component (if applicable):
rhevm-3.6.0-0.18.el6
vdsm-4.17.8-1.el7ev.noarch
qemu-kvm-rhev-2.3.0-24.el7.x86_64
sanlock-3.2.4-1.el7.x86_64
libvirt-client-1.2.17-5.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create emulated scsi tape device on host (from bug https://bugzilla.redhat.com/show_bug.cgi?id=1103739#c10 comment):
- Install scsi-target-utils, iscsi-initiator-utils and lsscsi on host.
- Prepare the emulate scsi tape device. 
# modprobe sg
# service tgtd start
# tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.st:tape:sttarget1 
# tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL 
# dd if=/dev/zero of=/root/tape.device bs=1M count=100 
t# gtadm --lld iscsi --op new --mode logicalunit --tid 1 --device-type tape --lun 1 -b /root/tape.device
# tgtadm --lld iscsi --op show --mode target
# iscsiadm -m discovery -t st -p 127.0.0.1 127.0.0.1:3260,1 
# iqn.st:tape:sttarget1
# iscsiadm -m node -l
- Verify login successful.
- Verify virtual tape attached:
# lsscsi | grep -w tape
# cat /proc/scsi/scsi 

2. From webadmin Refresh host capabilities and attach host emulated device to VM.
3. Try to run VM.

Actual results:
VM failed to run and the next event logged: 
VM rhel7_amd_cuda is down with error. Exit message: XML error: 'bus', 'target', and 'unit' must be specified for scsi hostdev source address.

Expected results:
VM should run with wmulated device attached to it.

Additional info:
engine.log and vdsm.log attached.
Comment 1 Nisim Simsolo 2015-10-11 08:25 EDT
Created attachment 1081792 [details]
engine.log
Comment 2 Nisim Simsolo 2015-10-11 08:26 EDT
Created attachment 1081793 [details]
vdsm.log
Comment 3 Yaniv Kaul 2015-10-12 01:50:05 EDT
Nisim, I assume libvirt's XML is the interesting part here. Can you copy-paste the relevant part (which is probably missing some data)?
Comment 4 Nisim Simsolo 2015-10-12 02:55:03 EDT
Attaching libvirt XML file.
Comment 5 Nisim Simsolo 2015-10-12 02:55 EDT
Created attachment 1081897 [details]
libvirt XML
Comment 6 Martin Polednik 2015-10-12 05:41:14 EDT
Only VFIO (as in PCI) and USB passthrough were targeted at 3.6. SCSI passthrough is absent so the XML cannot be constructed at all unless the SCSI controller is used (but that is a PCI device - not SCSI).
Comment 7 Red Hat Bugzilla Rules Engine 2015-11-16 09:11:20 EST
This bug is flagged for 3.6, yet the milestone is for 4.0 version, therefore the milestone has been reset.
Please set the correct milestone or add the flag.
Comment 8 Michal Skrivanek 2016-01-22 10:27:01 EST
this is an RFE to support SCSI passthrough (not PCI VFIO passthrough)
Comment 13 Sandro Bonazzola 2016-05-02 05:49:11 EDT
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.
Comment 14 Nisim Simsolo 2016-06-16 11:12:46 EDT
Verified:
ovirt-engine-4.1.0-0.0.master.20160613231338.git6e72c0b.el7.centos.noarch
qemu-kvm-rhev-2.3.0-31.el7_2.15.x86_64
vdsm-4.18.999-80.git843444f.el7.centos.x86_64
libvirt-daemon-1.2.17-13.el7_2.5.x86_64
sanlock-3.2.4-2.el7_2.x86_64

Verification test case added to external trackers.
Comment 15 Sandro Bonazzola 2016-07-05 03:39:59 EDT
oVirt 4.0.0 has been released, closing current release.

Note You need to log in before you can comment on or make changes to this bug.