It is on par with prlsdkLoadDomain actions. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx> --- src/vz/vz_driver.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index ffa6f45..1497b72 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -227,13 +227,37 @@ vzConnectGetCapabilities(virConnectPtr conn) xml = virCapabilitiesFormatXML(privconn->driver->caps); return xml; } +static int +vzDomainDefAddDefaultInputDevices(virDomainDefPtr def) +{ + if (def->ngraphics == 0) + return 0; + + int bus = IS_CT(def) ? VIR_DOMAIN_INPUT_BUS_PARALLELS : + VIR_DOMAIN_INPUT_BUS_PS2; + + if (virDomainDefMaybeAddInput(def, + VIR_DOMAIN_INPUT_TYPE_MOUSE, + bus) < 0) + return -1; + + if (virDomainDefMaybeAddInput(def, + VIR_DOMAIN_INPUT_TYPE_KBD, + bus) < 0) + return -1; + + return 0; +} static int -vzDomainDefPostParse(virDomainDefPtr def ATTRIBUTE_UNUSED, +vzDomainDefPostParse(virDomainDefPtr def, virCapsPtr caps ATTRIBUTE_UNUSED, unsigned int parseFlags ATTRIBUTE_UNUSED, void *opaque) { + if (vzDomainDefAddDefaultInputDevices(def) < 0) + return -1; + if (vzCheckUnsupportedDisks(def, opaque) < 0) return -1; -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list