if (my $targetstorage = delete $param->{'target-storage'}) {
my $storecfg = PVE::Storage::config();
my $storagemap = eval { PVE::JSONSchema::parse_idmap($targetstorage, 'pve-storage-id') };
- raise_param_exc({ targetstorage => "failed to parse storage map: $@" })
+ raise_param_exc({ 'target-storage' => "failed to parse storage map: $@" })
if $@;
$rpcenv->check_vm_perm($authuser, $vmid, undef, ['VM.Config.Disk'])
# check if storage is available on target node
my $targetsid = PVE::JSONSchema::map_id($self->{opts}->{storagemap}, $storeid);
- PVE::Storage::storage_check_enabled($self->{storecfg}, $targetsid, $self->{node});
+ my $target_scfg = PVE::Storage::storage_check_enabled($self->{storecfg}, $targetsid, $self->{node});
- die "content type 'rootdir' is not available on storage '$storeid'\n"
- if !$scfg->{content}->{rootdir};
+ die "content type 'rootdir' is not available on storage '$targetsid'\n"
+ if !$target_scfg->{content}->{rootdir};
PVE::Storage::foreach_volid($dl, sub {
my ($volid, $sid, $volname) = @_;