[pve-devel] [PATCH] openvz : create_vm : check_volume_access : find $path is undef

Alexandre Derumier aderumier at odiso.com
Wed Sep 25 10:29:39 CEST 2013


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/API2/OpenVZ.pm |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/API2/OpenVZ.pm b/PVE/API2/OpenVZ.pm
index 11b4a9d..e6820d8 100644
--- a/PVE/API2/OpenVZ.pm
+++ b/PVE/API2/OpenVZ.pm
@@ -343,6 +343,8 @@ __PACKAGE__->register_method({
 	    $archive = '-';
 	} else {
 	    $archive = $rpcenv->check_volume_access($authuser, $storage_cfg, $vmid, $ostemplate);
+	    $archive = PVE::Storage::path($storage_cfg, $ostemplate) if !$archive;
+
 	    die "can't find file '$archive'\n" if ! -f $archive;
 	}
 
-- 
1.7.10.4




More information about the pve-devel mailing list