]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage.pm
Revert "vdisk list: only collect images from storages with an appropriate content...
[pve-storage.git] / PVE / Storage.pm
index 18c03ec30d0d6a054f85fcb37c873a2334542762..19f675d5bd2045ead97c23b56c35fb7bce73e57b 100755 (executable)
@@ -938,7 +938,7 @@ sub vdisk_list {
 
     storage_check_enabled($cfg, $storeid) if ($storeid);
 
-    my $res = { map { $_ => [] } keys %{$ids} };
+    my $res = {};
 
     # prepare/activate/refresh all storages
 
@@ -964,8 +964,10 @@ sub vdisk_list {
 
     activate_storage_list($cfg, $storage_list, $cache);
 
-    foreach my $sid (@{$storage_list}) {
+    # FIXME PVE 7.0: only scan storages with the correct content types
+    foreach my $sid (keys %$ids) {
        next if $storeid && $storeid ne $sid;
+       next if !storage_check_enabled($cfg, $sid, undef, 1);
 
        my $scfg = $ids->{$sid};
        my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});