[libvirt] [PATCH v2] qemu: Provide default LUN=0 for iSCSI if not provided
Peter Krempa
pkrempa at redhat.com
Tue Sep 12 13:26:03 UTC 2017
On Mon, Sep 11, 2017 at 19:26:18 -0400, John Ferlan wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1477880
>
> If the "/#" is missing from the provided iSCSI path, then we need
> to provide the default LUN of /0; otherwise, QEMU will fail to parse
> the URL causing a failure to either create the guest or hotplug
> attach the storage.
>
> During post parse, for any iSCSI disk or hostdev, scan the source
> path looking for the presence of '/', if found, then we can assume
> the LUN is provided. If not found, alter the input XML to add the
> "/0". This will cause the generated XML to have the generated
> value when the domain config is saved after post parse.
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>
> v1: https://www.redhat.com/archives/libvir-list/2017-September/msg00122.html
>
> Alter the patch to make the adjustment during device post parsing rather
> than command line creation as requested by code review. This will alter
> the output XML as well as the command line arguments for those entries
> that don't supply a LUN. We had a few, so that works out testing wise!
>
> src/conf/domain_conf.c | 43 ++++++++++++++++++++++
> .../qemuargv2xml-disk-drive-network-iscsi.xml | 2 +-
> .../qemuxml2argv-disk-drive-network-iscsi-lun.args | 2 +-
> .../qemuxml2argv-disk-drive-network-iscsi.args | 2 +-
> .../qemuxml2argv-hostdev-scsi-lsi-iscsi.args | 2 +-
> .../qemuxml2argv-hostdev-scsi-virtio-iscsi.args | 2 +-
> .../qemuxml2xmlout-disk-drive-network-iscsi.xml | 2 +-
> .../qemuxml2xmlout-hostdev-scsi-lsi-iscsi.xml | 2 +-
> .../qemuxml2xmlout-hostdev-scsi-virtio-iscsi.xml | 2 +-
> 9 files changed, 51 insertions(+), 8 deletions(-)
>
ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170912/fd7ce168/attachment-0001.sig>
More information about the libvir-list
mailing list