diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index d2538563..a2d033eb 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -127,7 +127,7 @@ my $create_disks = sub { $res->{$ds} = PVE::QemuServer::print_drive($vmid, $disk); } else { - my $path = $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $volid); + $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $volid); my $volid_is_new = 1; @@ -372,13 +372,8 @@ __PACKAGE__->register_method({ die "pipe requires cli environment\n" if $rpcenv->{type} ne 'cli'; } else { - my $path = $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $archive); - - PVE::Storage::activate_volumes($storecfg, [ $archive ]) - if PVE::Storage::parse_volume_id ($archive, 1); - - die "can't find archive file '$archive'\n" if !($path && -f $path); - $archive = $path; + $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $archive); + $archive = PVE::Storage::abs_filesystem_path($storecfg, $archive); } }