Signed-off-by: Dietmar Maurer <diet...@proxmox.com>
---
 src/PVE/API2/LXC.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 128a89b..0c9ee40 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1326,6 +1326,13 @@ __PACKAGE__->register_method({
 
                        if ($mp->{type} eq 'volume') {
                            my $volid = $mp->{volume};
+
+                           my ($sid, $volname) = 
PVE::Storage::parse_volume_id($volid);
+                           $sid = $storage if defined($storage);
+                           my $scfg = PVE::Storage::storage_config($storecfg, 
$sid);
+
+                           $rpcenv->check($authuser, "/storage/$sid", 
['Datastore.AllocateSpace']);
+
                            if ($full) {
                                die "Cannot do full clones on a running 
container without snapshots\n"
                                    if $running && !defined($snapname);
-- 
2.11.0

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to