From: Martin Kletzander Date: Mon, 15 Jul 2013 07:19:06 +0000 (+0200) Subject: Add virtio-scsi to fallback models of scsi controller X-Git-Tag: v1.1.1-rc1~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b7f1c0c38729e5eba44ba134b93b1b95a4dae8d8;p=thirdparty%2Flibvirt.git Add virtio-scsi to fallback models of scsi controller When user does not specify any model for scsi controller, or worse, no controller at all, but libvirt automatically adds scsi controller with no model, we are not searching for virtio-scsi and thus this can fail for example on qemu which doesn't support lsi logic adapter. This means that when qemu on x86 doesn't support lsi53c895a and the user adds the following to an XML without any scsi controller: ... libvirt fails like this: # virsh define asdf.xml error: Failed to define domain from asdf.xml error: internal error Unable to determine model for scsi controller Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=974943 --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 110c87e768..8c58a7c709 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -704,6 +704,8 @@ qemuSetScsiControllerModel(virDomainDefPtr def, *model = VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI; } else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_LSI)) { *model = VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSILOGIC; + } else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_SCSI)) { + *model = VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI; } else { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Unable to determine model for scsi controller"));