api: clone: add missing sort to hash

When cloning was repeatedly attempted, the error message indicated a
different unsupported volume each time. The hash is now sorted to always
mention the same volume as long as it has not been fixed.

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
[FE: replace old-style 'foreach' with 'for' while at it]
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Alexander Zeidler 2024-12-04 11:30:02 +01:00 committed by Fiona Ebner
parent 7547eb37a9
commit 081c5de3d6

View File

@ -3874,7 +3874,7 @@ __PACKAGE__->register_method({
my $fullclone = {}; my $fullclone = {};
my $vollist = []; my $vollist = [];
foreach my $opt (keys %$oldconf) { for my $opt (sort keys %$oldconf) {
my $value = $oldconf->{$opt}; my $value = $oldconf->{$opt};
# do not copy snapshot related info # do not copy snapshot related info