]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Bypass sending VIR_DOMAIN_EVENT_RESUMED event when TD VM reboot
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Thu, 10 Jul 2025 07:21:22 +0000 (03:21 -0400)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 31 Jul 2025 10:40:55 +0000 (11:40 +0100)
When TD VM reboot, qemu process is recreated by destroying old and
creating new one. When new qemu process starts, it sends a RESUME
event while libvirt domain isn't in run state yet. Then event
VIR_DOMAIN_EVENT_RESUMED is sent out and confuse control plane.

Check priv->pausedShutdown and bypass the event for TD VM, for
normal VM, domain is in run state and already bypassing it.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_process.c

index 6b7b971f27ee2c65522d39494c29fe80bd993970..a81c02c9d514b1c9068291e45b93f25b2d4ef069 100644 (file)
@@ -816,9 +816,11 @@ qemuProcessHandleResume(qemuMonitor *mon G_GNUC_UNUSED,
                 reason = VIR_DOMAIN_RUNNING_POSTCOPY;
         }
         virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, reason);
-        event = virDomainEventLifecycleNewFromObj(vm,
-                                                  VIR_DOMAIN_EVENT_RESUMED,
-                                                  eventDetail);
+
+        if (!priv->pausedShutdown)
+            event = virDomainEventLifecycleNewFromObj(vm,
+                                                      VIR_DOMAIN_EVENT_RESUMED,
+                                                      eventDetail);
         qemuDomainSaveStatus(vm);
     }