[pve-devel] [PATCH qemu-server 7/7] api2: add revert ip support

Alexandre Derumier aderumier at odiso.com
Thu Jun 24 15:34:25 CEST 2021


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/API2/Qemu.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index e8c7107..014dee6 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1275,6 +1275,9 @@ my $update_vm_api  = sub {
 		    $modified->{$opt} = 0;
 		    next;
 		}
+		if (defined($conf->{pending}->{$opt}) && $opt =~ m/^net(\d+)$/) {
+		    PVE::QemuServer::vmconfig_delete_net_ip($conf, $vmid, $1);
+		}
 		my $is_pending_val = defined($conf->{pending}->{$opt});
 		delete $conf->{pending}->{$opt};
 
-- 
2.20.1





More information about the pve-devel mailing list