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'. Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- src/qemu/qemu_command.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 96c4f31..9adf0fe 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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; -- 2.7.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list