Signed-off-by: Wolfgang Link <w.l...@proxmox.com>
---
 PVE/Storage/ZFSPlugin.pm |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/PVE/Storage/ZFSPlugin.pm b/PVE/Storage/ZFSPlugin.pm
index f020985..e7acfb8 100644
--- a/PVE/Storage/ZFSPlugin.pm
+++ b/PVE/Storage/ZFSPlugin.pm
@@ -270,9 +270,11 @@ sub alloc_image {
     die "illegal name '$name' - sould be 'vm-$vmid-*'\n"
     if $name && $name !~ m/^vm-$vmid-/;
 
-    my $volname = $class->zfs_find_free_diskname($storeid, $scfg, $vmid) if 
!$name;
+    my $volname = $name;
+
+    $volname = $class->zfs_find_free_diskname($storeid, $scfg, $vmid) if 
!$volname;
     
-    $class->zfs_create_zvol($scfg, $name, $size);
+    $class->zfs_create_zvol($scfg, $volname, $size);
  
     my $guid = $class->zfs_create_lu($scfg, $volname);
     $class->zfs_add_lun_mapping_entry($scfg, $volname, $guid);
-- 
1.7.10.4


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to