[pve-devel] [RFC qemu-server 7/9] api: migrate_vm: improve check if target storages support vm images

Daniel Kral d.kral at proxmox.com
Wed Jan 22 14:19:03 CET 2025


On 11/29/24 15:23, Fiona Ebner wrote:
> Am 16.09.24 um 18:38 schrieb Daniel Kral:
>> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
>> index a0abe44f..13c1c4e0 100644
>> --- a/PVE/API2/Qemu.pm
>> +++ b/PVE/API2/Qemu.pm
>> @@ -220,18 +220,6 @@ my $check_storage_access_clone = sub {
>>      return $sharedvm;
>>   };
>>   
>> -my $check_storage_access_migrate = sub {
>> -    my ($rpcenv, $authuser, $storecfg, $storage, $node) = @_;
>> -
>> -    PVE::Storage::storage_check_enabled($storecfg, $storage, $node);
>> -
>> -    $rpcenv->check($authuser, "/storage/$storage", ['Datastore.AllocateSpace']);
>> -
>> -    my $scfg = PVE::Storage::storage_config($storecfg, $storage);
>> -    die "storage '$storage' does not support vm images\n"
>> -	if !$scfg->{content}->{images};
>> -};
> 
> I'd prefer to keep this helper and have it call the new ones.
> 

ACK

>> -
>>   my $import_from_volid = sub {
>>       my ($storecfg, $src_volid, $dest_info, $vollist) = @_;
>>   





More information about the pve-devel mailing list