]> git.proxmox.com Git - qemu-server.git/commitdiff
update_vm: sort logged parameters
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 6 Sep 2017 09:32:13 +0000 (11:32 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 7 Sep 2017 08:21:47 +0000 (10:21 +0200)
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 <f.gruenbichler@proxmox.com>
PVE/API2/Qemu.pm

index aa7c83296d1e4184cc881cb203a3a3453e9c55db..2f4a023f0cd96db6bbb63e051de27b2f09e860da 100644 (file)
@@ -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};
     }