From 98e67d4d8ca933b5fa2ec4fbc35dfe7cd8b1547b Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Tue, 23 Feb 2021 17:21:56 -0500 Subject: [PATCH] qemu: allow migration of generic with MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 010ed0856b and commit db64acfbda introduced the ability to use the element in a generic (previously it could only be used with ). However, the patch omitted one crucial detail - along with parsing the element in , and adding the necessary info to the qemu commandline, we also need to modify qemuMigrationSrcIsAllowedHostdev() to allow migration when the generic has a element. https://bugzilla.redhat.com/1927984 Fixes: 010ed0856bb06f439e6fdf44e4f529f53441c398 Reported-by: Yalan Zhang Signed-off-by: Laine Stump Reviewed-by: Ján Tomko --- src/qemu/qemu_migration.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 08f60c6db3..d7231f68ae 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1247,13 +1247,17 @@ qemuMigrationSrcIsAllowedHostdev(const virDomainDef *def) case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI: /* - * if this is a network interface with , migration *is* allowed because - * the device will be auto-unplugged by QEMU during - * migration. + * if the device has a + * element, then migration *is* allowed because the + * device will be auto-unplugged by QEMU during + * migration. Generic and have their teaming configuration + * stored in different places. */ - if (hostdev->parentnet && hostdev->parentnet->teaming && - hostdev->parentnet->teaming->type == VIR_DOMAIN_NET_TEAMING_TYPE_TRANSIENT) { + if ((hostdev->teaming && + hostdev->teaming->type == VIR_DOMAIN_NET_TEAMING_TYPE_TRANSIENT) || + (hostdev->parentnet && hostdev->parentnet->teaming && + hostdev->parentnet->teaming->type == VIR_DOMAIN_NET_TEAMING_TYPE_TRANSIENT)) { continue; }