5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-08 21:18:03 +03:00

check_storage_availability: make content type check generic

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-06-23 12:03:35 +02:00
parent 354e61aacc
commit 3148f0b053

View File

@ -2466,8 +2466,10 @@ sub check_storage_availability {
my $scfg = PVE::Storage::storage_check_enabled($storecfg, $sid);
PVE::Storage::storage_check_enabled($storecfg, $sid, $node);
die "content type 'images' is not available on storage '$sid'\n"
if !$scfg->{content}->{images};
my ($vtype) = PVE::Storage::parse_volname($storecfg, $volid);
die "$volid: content type '$vtype' is not available on storage '$sid'\n"
if !$scfg->{content}->{$vtype};
});
}