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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
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:

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux