From edd48c325aee7208f0956cbddf1f827bce66d90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 6 Sep 2017 11:32:13 +0200 Subject: [PATCH] update_vm: sort logged parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit otherwise the (log) output looks really strange when mass-updating VMs, e.g.: update VM 400001: -scsi1 somestore:64 -scsi0 somestore:64 -ide2 isostore:iso/somefile.iso,media=cdrom update VM 400002: -ide2 isostore:iso/somefile.iso,media=cdrom -scsi1 somestore:64 -scsi0 somestore:64 update VM 400003: -scsi0 somestore:64 -ide2 isostore:iso/somefile.iso,media=cdrom -scsi1 somestore:64 Signed-off-by: Fabian Grünbichler --- 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 aa7c8329..2f4a023f 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -908,7 +908,7 @@ my $update_vm_api = sub { my $background_delay = extract_param($param, 'background_delay'); my @paramarr = (); # used for log message - foreach my $key (keys %$param) { + foreach my $key (sort keys %$param) { push @paramarr, "-$key", $param->{$key}; }