mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
conf: fix virDomainDefFormatInternal for parallels
We should add input devices with proper bus, not VIR_DOMAIN_INPUT_BUS_XEN. Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
79847f73c3
commit
ffb52467a2
@ -21177,12 +21177,18 @@ virDomainDefFormatInternal(virDomainDefPtr def,
|
|||||||
/* If graphics is enabled, add the implicit mouse/keyboard */
|
/* If graphics is enabled, add the implicit mouse/keyboard */
|
||||||
if ((ARCH_IS_X86(def->os.arch)) || def->os.arch == VIR_ARCH_NONE) {
|
if ((ARCH_IS_X86(def->os.arch)) || def->os.arch == VIR_ARCH_NONE) {
|
||||||
virDomainInputDef autoInput = {
|
virDomainInputDef autoInput = {
|
||||||
VIR_DOMAIN_INPUT_TYPE_MOUSE,
|
.type = VIR_DOMAIN_INPUT_TYPE_MOUSE,
|
||||||
STREQ(def->os.type, "hvm") ?
|
.info = { .alias = NULL },
|
||||||
VIR_DOMAIN_INPUT_BUS_PS2 : VIR_DOMAIN_INPUT_BUS_XEN,
|
|
||||||
{ .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)
|
if (virDomainInputDefFormat(buf, &autoInput, flags) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user