mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-03-09 08:58:25 +03:00
fix #1417: check if storage has 'images' set in content
otherwise, qm and the api ignore this setting completely when creating a vm Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
5f54c8d443
commit
c46366fd49
@ -70,6 +70,9 @@ my $check_storage_access = sub {
|
||||
my ($storeid, $size) = ($2 || $default_storage, $3);
|
||||
die "no storage ID specified (and no default storage)\n" if !$storeid;
|
||||
$rpcenv->check($authuser, "/storage/$storeid", ['Datastore.AllocateSpace']);
|
||||
my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
|
||||
raise_param_exc({ storage => "storage '$storeid' does not support vm images"})
|
||||
if !$scfg->{content}->{images};
|
||||
} else {
|
||||
PVE::Storage::check_volume_access($rpcenv, $authuser, $storecfg, $vmid, $volid);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user