[libvirt] [PATCH] qemu_domain: Error out eariler when adding an IDE controller to a q35-based vm

Ján Tomko jtomko at redhat.com
Mon Oct 23 06:37:30 UTC 2017


s/eariler/earlier/ in the commit summary

On Sun, Oct 22, 2017 at 11:05:08PM +0800, Lin Ma wrote:
>Signed-off-by: Lin Ma <lma at suse.com>
>---
> src/qemu/qemu_domain.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
>diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
>index ece8ee7..120d31c 100644
>--- a/src/qemu/qemu_domain.c
>+++ b/src/qemu/qemu_domain.c
>@@ -3975,10 +3975,18 @@ qemuDomainControllerDefPostParse(virDomainControllerDefPtr cont,

This function is called when parsing every XML. Adding new errors here
could cause already existing machines (even though they aren't working)
disappear from libvirt.

qemuDomainDeviceDefValidate is called only for newly defined domains and
on domain startup, so the error from qemuBuildControllerDevStr can be
moved there.

Jan

>         }
>         break;
>
>+    case VIR_DOMAIN_CONTROLLER_TYPE_IDE:
>+        if (qemuDomainIsQ35(def)) {
>+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>+                           _("IDE controllers are unsupported for q35 "
>+                             "machine type"));
>+            return -1;
>+        }
>+        break;
>+
>     case VIR_DOMAIN_CONTROLLER_TYPE_SATA:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20171023/85fd2813/attachment-0001.sig>


More information about the libvir-list mailing list