[PATCH v3 13/14] conf: fix virDomainDefFormatInternal for parallels

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

 



We should add input devices with proper bus,
not VIR_DOMAIN_INPUT_BUS_XEN.

Signed-off-by: Dmitry Guryanov <dguryanov@xxxxxxxxxxxxx>
---
 src/conf/domain_conf.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b8a6b84..da81e72 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -21176,12 +21176,18 @@ virDomainDefFormatInternal(virDomainDefPtr def,
         /* If graphics is enabled, add the implicit mouse/keyboard */
         if ((ARCH_IS_X86(def->os.arch)) || def->os.arch == VIR_ARCH_NONE) {
             virDomainInputDef autoInput = {
-                VIR_DOMAIN_INPUT_TYPE_MOUSE,
-                STREQ(def->os.type, "hvm") ?
-                VIR_DOMAIN_INPUT_BUS_PS2 : VIR_DOMAIN_INPUT_BUS_XEN,
-                { .alias = NULL },
+                .type = VIR_DOMAIN_INPUT_TYPE_MOUSE,
+                .info = { .alias = NULL },
             };
 
+            if (STREQ(def->os.type, "hvm"))
+                autoInput.bus = VIR_DOMAIN_INPUT_BUS_PS2;
+            else if (STREQ(def->os.type, "xen"))
+               autoInput.bus = VIR_DOMAIN_INPUT_BUS_XEN;
+            else if (STREQ(def->os.type, "exe") &&
+                     def->virtType == VIR_DOMAIN_VIRT_PARALLELS)
+                autoInput.bus = VIR_DOMAIN_INPUT_BUS_PARALLELS;
+
             if (virDomainInputDefFormat(buf, &autoInput, flags) < 0)
                 goto error;
 
-- 
2.1.0

--
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]