mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-28 18:45:07 +00:00
avoid writing the config if there are no pending changes to apply
We drop properties which we do not understand and we call `vmconfig_apply_pending` on stop and before start, so if a user tried to edit the config or downgraded qemu-server they may get stuff dropped from the config just by doing a stop/start, which may be a bit too confusing, also the write is just unnecessary then. we also have the same skipping logic when starting vms, this way we avoid calling 'write_config' when there are no present changes to commit. Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
This commit is contained in:
parent
e3e34a10e7
commit
a644de298c
@ -4998,6 +4998,8 @@ sub vmconfig_delete_or_detach_drive {
|
||||
sub vmconfig_apply_pending {
|
||||
my ($vmid, $conf, $storecfg, $errors) = @_;
|
||||
|
||||
return if !scalar(keys %{$conf->{pending}});
|
||||
|
||||
my $add_apply_error = sub {
|
||||
my ($opt, $msg) = @_;
|
||||
my $err_msg = "unable to apply pending change $opt : $msg";
|
||||
|
Loading…
Reference in New Issue
Block a user