From af6d2db4b3dd54dee517a3ae6a49eac43c068af9 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Mon, 29 May 2017 10:37:23 +0200 Subject: [PATCH] check also pending changes when reverting/deleting otherwise we are not able to revert/delete pending changes which introduce a new config line Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index eb61cb8..54db5ab 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1012,7 +1012,7 @@ my $update_vm_api = sub { foreach my $opt (@delete) { $modified->{$opt} = 1; $conf = PVE::QemuConfig->load_config($vmid); # update/reload - if (!defined($conf->{$opt})) { + if (!defined($conf->{$opt}) && !defined($conf->{pending}->{$opt})) { warn "cannot delete '$opt' - not set in current configuration!\n"; $modified->{$opt} = 0; next; -- 2.39.2