[pve-devel] applied: [PATCH qemu-server] fix #1417: check if storage has 'images' set in content
Wolfgang Bumiller
w.bumiller at proxmox.com
Fri Jun 30 09:34:40 CEST 2017
applied to master & stable-4
On Mon, Jun 19, 2017 at 01:54:49PM +0200, Dominik Csapak wrote:
> otherwise, qm and the api ignore this setting completely when creating
> a vm
>
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> PVE/API2/Qemu.pm | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index 76fd0e4..388ade1 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -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);
> }
> --
> 2.11.0
More information about the pve-devel
mailing list