[pve-devel] [RFC v10 qemu-server 6/7] api: support VM disk import
Fabian Ebner
f.ebner at proxmox.com
Tue Feb 22 13:11:45 CET 2022
Am 13.01.22 um 11:08 schrieb Fabian Ebner:
> @@ -89,6 +90,10 @@ my $check_storage_access = sub {
> } else {
> PVE::Storage::check_volume_access($rpcenv, $authuser, $storecfg, $vmid, $volid);
> }
> +
> + if (my $source_image = $drive->{'import-from'}) {
> + PVE::Storage::check_volume_access($rpcenv, $authuser, $storecfg, $vmid, $source_image);
> + }
> });
>
AFAICT, if $vmid doesn't match the one from the volume, the check
requires Datastore.Allocate privileges on the storage, which might be a
bit much for many scenarios. Should the check rather be something like
if ($ownerid) {
# check VM.Clone for owner VM
# Note that v11 will use clone_disk() for such disks
} else {
# PVE::Storage::check_volume_access
}
?
More information about the pve-devel
mailing list