From: Dmitry Guryanov Date: Tue, 7 Apr 2015 20:35:12 +0000 (+0300) Subject: conf: fix virDomainDefFormatInternal for parallels X-Git-Tag: v1.2.15-rc1~239 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffb52467a28a3ce7e12d4bcc1c1fe7d2d193c2e9;p=thirdparty%2Flibvirt.git conf: fix virDomainDefFormatInternal for parallels We should add input devices with proper bus, not VIR_DOMAIN_INPUT_BUS_XEN. Signed-off-by: Dmitry Guryanov Signed-off-by: Michal Privoznik --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1ff42f9e7c..880b89cc43 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -21177,12 +21177,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, "exe") && + def->virtType == VIR_DOMAIN_VIRT_PARALLELS) + autoInput.bus = VIR_DOMAIN_INPUT_BUS_PARALLELS; + else + autoInput.bus = VIR_DOMAIN_INPUT_BUS_XEN; + if (virDomainInputDefFormat(buf, &autoInput, flags) < 0) goto error;