]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Provide default LUN=0 for iSCSI if not provided
authorJohn Ferlan <jferlan@redhat.com>
Mon, 11 Sep 2017 23:18:21 +0000 (19:18 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 12 Sep 2017 14:33:25 +0000 (10:33 -0400)
commitf64f03b5b1e6f3ecd6c6d79316c3efedc00c2167
tree53e707289a630da89a92f2e0eaa89b8bd5be81ca
parent4fc305125833255de16d32289ae24902d670d166
qemu: Provide default LUN=0 for iSCSI if not provided

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.
src/conf/domain_conf.c
tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-lun.args
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.args
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi.args
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi.args
tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-network-iscsi.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-lsi-iscsi.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-virtio-iscsi.xml