[libvirt] [PATCH] domain_conf: fix migration/managedsave with usb keyboad

Commint 36785c7e refactored the code for input devices but introduced a bug that we removed all keyboard from migratable XML. We have to remove only implicit keyboards like PS2 or XEN. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/conf/domain_conf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2c97bc1..b90c2b6 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -21193,8 +21193,10 @@ virDomainInputDefFormat(virBufferPtr buf, const char *bus = virDomainInputBusTypeToString(def->bus); /* don't format keyboard into migratable XML for backward compatibility */ - if (def->type == VIR_DOMAIN_INPUT_TYPE_KBD && - flags & VIR_DOMAIN_DEF_FORMAT_MIGRATABLE) + if (flags & VIR_DOMAIN_DEF_FORMAT_MIGRATABLE && + def->type == VIR_DOMAIN_INPUT_TYPE_KBD && + (def->bus == VIR_DOMAIN_INPUT_BUS_PS2 || + def->bus == VIR_DOMAIN_INPUT_BUS_XEN)) return 0; if (!type) { -- 2.8.2

On Fri, May 06, 2016 at 14:19:39 +0200, Pavel Hrdina wrote:
Commint 36785c7e refactored the code for input devices but introduced a
commit
bug that we removed all keyboard from migratable XML. We have to remove
bug where
only implicit keyboards like PS2 or XEN.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/conf/domain_conf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
ACK and I think this might be worth backporting to the appropriate maint branches if they were created. Peter
participants (2)
-
Pavel Hrdina
-
Peter Krempa