[pve-devel] [PATCH v2 qemu-server 5/9] ipam : add revert ip support
Alexandre Derumier
aderumier at odiso.com
Mon Jul 12 00:47:03 CEST 2021
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/API2/Qemu.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 6bf88b7..e2a6a0a 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1286,6 +1286,10 @@ my $update_vm_api = sub {
$modified->{$opt} = 0;
next;
}
+ if (defined($conf->{pending}->{$opt}) && $opt =~ m/^net(\d+)$/) {
+ my $net = PVE::QemuServer::parse_net($conf->{pending}->{$opt});
+ PVE::QemuServer::vmconfig_delete_net_ip($conf, $net);
+ }
my $is_pending_val = defined($conf->{pending}->{$opt});
delete $conf->{pending}->{$opt};
--
2.30.2
More information about the pve-devel
mailing list