[pve-devel] [PATCH v3 qemu-server 4/5] migration: sort volumes migrated with storage_migrate

Fabian Ebner f.ebner at proxmox.com
Tue Dec 1 13:07:01 CET 2020


Having a deterministic order here is useful for testing.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

New in v3.

 PVE/QemuMigrate.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 97af397..5c019fc 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -610,7 +610,7 @@ sub sync_disks {
 
 	$self->log('info', "copying local disk images") if scalar(%$local_volumes);
 
-	foreach my $volid (keys %$local_volumes) {
+	foreach my $volid (sort keys %$local_volumes) {
 	    my ($sid, $volname) = PVE::Storage::parse_volume_id($volid);
 	    my $targetsid = PVE::QemuServer::map_storage($self->{opts}->{storagemap}, $sid);
 	    my $ref = $local_volumes->{$volid}->{ref};
-- 
2.20.1






More information about the pve-devel mailing list