Bug 1270581 - [RFE] Hostdev_passthrough: support SCSI FC tape device
Summary: [RFE] Hostdev_passthrough: support SCSI FC tape device
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RFEs
Version: ---
Hardware: Unspecified
OS: Unspecified
Target Milestone: ovirt-4.0.0-beta
: 4.0.0
Assignee: Martin Polednik
QA Contact: Nisim Simsolo
Depends On: 1301104
Blocks: 1097653 1416027
TreeView+ depends on / blocked
Reported: 2015-10-11 12:24 UTC by Nisim Simsolo
Modified: 2017-01-24 11:56 UTC (History)
16 users (show)

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.
Clone Of:
Last Closed: 2016-07-05 07:39:59 UTC
oVirt Team: Virt
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 12:25 UTC, Nisim Simsolo
no flags Details
vdsm.log (5.66 MB, text/plain)
2015-10-11 12:26 UTC, Nisim Simsolo
no flags Details
libvirt XML (26.31 KB, text/plain)
2015-10-12 06:55 UTC, Nisim Simsolo
no flags Details

System ID Private Priority Status Summary Last Updated
oVirt gerrit 55022 0 master MERGED hostdev: expose generic scsi driver char device in device params 2020-11-05 15:24:41 UTC
oVirt gerrit 55023 0 master MERGED hostdev: make _update_usb_device_info more generic 2020-11-05 15:24:41 UTC
oVirt gerrit 55024 0 master MERGED hostdev: add support for SCSI 2020-11-05 15:24:40 UTC
oVirt gerrit 56037 0 master MERGED hostdev: use libvirt flags to select capability 2020-11-05 15:24:41 UTC
oVirt gerrit 56038 0 master MERGED hostdev: report additional information in 'scsi' device 2020-11-05 15:24:41 UTC
oVirt gerrit 56123 0 master MERGED hostdev: report storage model as product 2020-11-05 15:24:41 UTC

Description Nisim Simsolo 2015-10-11 12:24:23 UTC
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):

How reproducible:

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,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 12:25:12 UTC
Created attachment 1081792 [details]

Comment 2 Nisim Simsolo 2015-10-11 12:26:04 UTC
Created attachment 1081793 [details]

Comment 3 Yaniv Kaul 2015-10-12 05:50:05 UTC
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 06:55:03 UTC
Attaching libvirt XML file.

Comment 5 Nisim Simsolo 2015-10-12 06:55:30 UTC
Created attachment 1081897 [details]
libvirt XML

Comment 6 Martin Polednik 2015-10-12 09:41:14 UTC
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 14:11:20 UTC
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 15:27:01 UTC
this is an RFE to support SCSI passthrough (not PCI VFIO passthrough)

Comment 13 Sandro Bonazzola 2016-05-02 09:49:11 UTC
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 15:12:46 UTC

Verification test case added to external trackers.

Comment 15 Sandro Bonazzola 2016-07-05 07:39:59 UTC
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.