As reported in the enterprise support, if something went wrong when
removing the dbus-vmstate object earlier, a following migrating using
'--with-conntrack-state' will lead to a crash.

Try to remove any leftover when migrating without the conntrack state.

Signed-off-by: Fiona Ebner <[email protected]>
---

Reported by Friedrich just after I sent the v3. Technically
orthogonal, and should get much less likely after patches 1+2 here,
but still good for future-proofing.

 src/PVE/QemuMigrate.pm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm
index 8fa84080..b3ddc34e 100644
--- a/src/PVE/QemuMigrate.pm
+++ b/src/PVE/QemuMigrate.pm
@@ -254,6 +254,12 @@ sub prepare {
                 'conntrack state migration not supported or disabled, '
                     . 'active connections might get dropped',
             );
+
+            # In case some leftover instance is running, stop it. The target 
QEMU instance won't
+            # have the 'dbus-vmstate' object, so the source must not have it 
either.
+            if 
(defined(PVE::QemuServer::DBusVMState::qemu_del_dbus_vmstate($vmid, quiet => 
1))) {
+                $self->log('warn', "stopped left-over dbus-vmstate helper for 
VM $vmid");
+            }
         }
     }
 
-- 
2.47.3



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to