mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: Do not support 'serial' scsi-block 'lun' devices
https://bugzilla.redhat.com/show_bug.cgi?id=1021480 Seems the property has been deprecated for qemu, although seemingly ignored. This patch enforces from a libvirt perspective that a scsi-block 'lun' device should not provide the 'serial' property.
This commit is contained in:
parent
1feaccf000
commit
4fce9e8479
@ -2511,6 +2511,9 @@
|
|||||||
<dd>If present, this specify serial number of virtual hard drive.
|
<dd>If present, this specify serial number of virtual hard drive.
|
||||||
For example, it may look
|
For example, it may look
|
||||||
like <code><serial>WD-WMAP9A966149</serial></code>.
|
like <code><serial>WD-WMAP9A966149</serial></code>.
|
||||||
|
Not supported for scsi-block devices, that is those using
|
||||||
|
disk <code>type</code> 'block' using <code>device</code> 'lun'
|
||||||
|
on <code>bus</code> 'scsi'.
|
||||||
<span class="since">Since 0.7.1</span>
|
<span class="since">Since 0.7.1</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><code>wwn</code></dt>
|
<dt><code>wwn</code></dt>
|
||||||
|
@ -3731,6 +3731,13 @@ qemuBuildDriveStr(virConnectPtr conn,
|
|||||||
virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_SERIAL)) {
|
virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_SERIAL)) {
|
||||||
if (qemuSafeSerialParamValue(disk->serial) < 0)
|
if (qemuSafeSerialParamValue(disk->serial) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI &&
|
||||||
|
disk->device == VIR_DOMAIN_DISK_DEVICE_LUN) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("scsi-block 'lun' devices do not support the "
|
||||||
|
"serial property"));
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
virBufferAddLit(&opt, ",serial=");
|
virBufferAddLit(&opt, ",serial=");
|
||||||
virBufferEscape(&opt, '\\', " ", "%s", disk->serial);
|
virBufferEscape(&opt, '\\', " ", "%s", disk->serial);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user