mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
qemu: Only allow 'raw' format for scsi-block using virtio-scsi
https://bugzilla.redhat.com/show_bug.cgi?id=1379196 Add check in qemuCheckDiskConfig for an invalid combination of using the 'scsi' bus for a block 'lun' device and any disk source format other than 'raw'.
This commit is contained in:
parent
bfdefc0f02
commit
f694f3ff6b
@ -1238,6 +1238,14 @@ qemuCheckDiskConfig(virDomainDiskDefPtr disk)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI &&
|
||||
disk->src->format != VIR_STORAGE_FILE_RAW) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("disk device 'lun' using target 'scsi' must use "
|
||||
"'raw' format"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (qemuDomainDefValidateDiskLunSource(disk->src) < 0)
|
||||
return -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user