From: Thomas Lamprecht Date: Thu, 9 Jul 2020 14:14:04 +0000 (+0200) Subject: vdisk_list: skip scanning storages which cannot have images/rootdisks X-Git-Url: https://git.proxmox.com/?p=pve-storage.git;a=commitdiff_plain;h=c43655d2ed63f1ca690807c7d6c3cdff8cce30b8 vdisk_list: skip scanning storages which cannot have images/rootdisks Do not try to scan (and thus activate) storages which aren't configured to support (or cannot support) "vdisks" anyway. Avoids seemingly strange failures of VM migrations due to a backup storage not being currently online - even if that storage isn't referenced in the VM config anywhere.. Signed-off-by: Thomas Lamprecht --- diff --git a/PVE/Storage.pm b/PVE/Storage.pm index edf9a2e..8375a91 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -882,6 +882,8 @@ sub vdisk_list { foreach my $sid (keys %$ids) { next if $storeid && $storeid ne $sid; next if !storage_check_enabled($cfg, $sid, undef, 1); + my $content = $ids->{$sid}->{content}; + next if !($content->{rootdir} || $content->{images}); push @$storage_list, $sid; } }