[libvirt] [PATCH 2/2] qemu: Relax interface type change check when changing an interface

Michal Privoznik mprivozn at redhat.com
Fri Apr 26 09:11:01 UTC 2019


Then changing some runtime knobs for an interface the
qemuDomainChangeNet() is called. This does all kinds of checks to
ensure that only supported changes are requested. There is one
particular check which purpose is to make sure that interface
type does not change. And even if it does, it's a change we can
deal with. But since for a running domain any interface with type
network becomes interface type bridge, this check fails and an
error is reported. What we need to compare are actual types
instead of configured ones.

Fixes 518026e1595.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/qemu/qemu_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 630be12d54..ace171cd52 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3966,7 +3966,7 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
         goto cleanup;
     }
 
-    if (olddev->type == newdev->type && oldType == newType) {
+    if (oldType == newType) {
 
         /* if type hasn't changed, check the relevant fields for the type */
         switch (newdev->type) {
-- 
2.21.0




More information about the libvir-list mailing list