RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1174569 - guest cannot start with a shareable hostdev network iscsi device
Summary: guest cannot start with a shareable hostdev network iscsi device
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2014-12-16 03:16 UTC by Luyao Huang
Modified: 2015-11-19 05:59 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.2.13-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-11-19 05:59:07 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Luyao Huang 2014-12-16 03:16:18 UTC
description of problem:
guest cannot start with a shareable hostdev network iscsi device

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

1.prepare a guest have a shareable hostdev network iscsi device
<hostdev mode='subsystem' type='scsi' managed='no'>
      <source protocol='iscsi' name='iqn.2014-11.com.lhuang:tgt1/2'>
        <host name='test1' port='3260'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>

2.start the guest
# virsh start test4
error: Failed to start domain test4
error: internal error: Cannot parse adapter 'iqn.2014-11.com.lhuang:tgt1/2'

Actual results:
cannot start
Expected results:
can start

Additional info:

Comment 1 Michal Privoznik 2014-12-17 10:32:37 UTC
I've just pushed the patch upstream:

commit dddd83273538d0248cc16aecab012169d6552341
Author:     Luyao Huang <lhuang>
AuthorDate: Tue Dec 16 11:16:58 2014 +0800
Commit:     Michal Privoznik <mprivozn>
CommitDate: Wed Dec 17 11:23:00 2014 +0100

    conf: fix cannot start a guest have a shareable network iscsi hostdev
    There's nothing we need to do for shared iSCSI devices in
    qemuAddSharedHostdev and qemuRemoveSharedHostdev. The iSCSI layer
    takes care about that for us.
    Signed-off-by: Luyao Huang <lhuang>
    Signed-off-by: Michal Privoznik <mprivozn>


Comment 2 yisun 2015-04-01 14:52:56 UTC


1. discover a iscsi lun disk
# iscsiadm --mode discovery --type sendtargets --portal 10.xx.yy.zz  (ip hidden)
10.xx.yy.zz:3260,1 www.lento.com:sunyi1 

2. start a vm with above iscsi disk
    <hostdev mode='subsystem' type='scsi' managed='no'>
      <source protocol='iscsi' name='www.lento.com:sunyi1/1'>
        <host name='10.xx.yy.zz' port='3260'/>
      <alias name='hostdev0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>

  # virsh start rhel7.0
Domain rhel7.0 started

3. in guest os, check the iscsi disk really attached. 
root@guest # fdisk -l 
Disk /dev/sda: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Comment 4 errata-xmlrpc 2015-11-19 05:59:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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