Availability of the vmpvscsi controller model is gated by the pvscsi
capability.
Signed-off-by: Chris Jester-Young <cky(a)cky.nz>
---
src/qemu/qemu_command.c | 4 +++-
src/qemu/qemu_validate.c | 9 ++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 2d8a6fb0dd..bfe70ed228 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2573,9 +2573,11 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSISAS1078:
virBufferAddLit(&buf, "megasas");
break;
+ case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSCSI:
+ virBufferAddLit(&buf, "pvscsi");
+ break;
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_AUTO:
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_BUSLOGIC:
- case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSCSI:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported controller model: %s"),
virDomainControllerModelSCSITypeToString(def->model));
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index d34151050f..fde1892d42 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -2362,9 +2362,16 @@ qemuValidateCheckSCSIControllerModel(virQEMUCapsPtr qemuCaps,
return false;
}
break;
+ case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSCSI:
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_PVSCSI)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("This QEMU doesn't support "
+ "the pvscsi (VMware paravirtual SCSI)
controller"));
+ return false;
+ }
+ break;
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_AUTO:
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_BUSLOGIC:
- case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSCSI:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported controller model: %s"),
virDomainControllerModelSCSITypeToString(model));
--
2.25.1