[pve-devel] [PATCH qemu-server v2 9/13] migrate: flush old VM conntrack entries after successful migration
Christoph Heiss
c.heiss at proxmox.com
Thu Apr 24 13:19:29 CEST 2025
After a successful live-migration, the old VM-specific conntrack entries
are not needed anymore on the source node and can thus be flushed.
Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
Changes v1 -> v2:
* no changes
PVE/QemuMigrate.pm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 7665c398..55fc070c 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -11,6 +11,7 @@ use Time::HiRes qw( usleep );
use PVE::AccessControl;
use PVE::Cluster;
use PVE::Format qw(render_bytes);
+use PVE::Firewall::Helpers;
use PVE::GuestHelpers qw(safe_boolean_ne safe_string_ne);
use PVE::INotify;
use PVE::JSONSchema;
@@ -1657,6 +1658,10 @@ sub phase3_cleanup {
if (my $err = $@) {
$self->log('warn', "failed to stop dbus-vmstate on $targetnode: $err\n");
}
+
+ # also flush now-old local conntrack entries for the migrated VM
+ $self->log('info', 'flushing conntrack state for guest on source');
+ PVE::Firewall::Helpers::flush_fw_ct_entries_by_mark($vmid);
}
}
--
2.49.0
More information about the pve-devel
mailing list