[pve-devel] [PATCH qemu-server] check also pending changes when reverting/deleting
Dominik Csapak
d.csapak at proxmox.com
Mon May 29 10:37:23 CEST 2017
otherwise we are not able to revert/delete pending changes which
introduce a new config line
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
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 41ffad5..2439f92 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1010,7 +1010,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.11.0
More information about the pve-devel
mailing list