]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/ISCSIDirectPlugin.pm
remove running from Storage and check it in QemuServer
[pve-storage.git] / PVE / Storage / ISCSIDirectPlugin.pm
index b648fd513561296303b61a49f82a578af008bfae..763c48280e179909e78cbf1f199a608b87ad9680 100644 (file)
@@ -97,6 +97,17 @@ sub path {
     return ($path, $vmid, $vtype);
 }
 
+sub create_base {
+    my ($class, $storeid, $scfg, $volname) = @_;
+
+    die "can't create base images in iscsi storage\n";
+}
+
+sub clone_image {
+    my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
+
+    die "can't clone images in iscsi storage\n";
+}
 
 sub alloc_image {
     my ($class, $storeid, $scfg, $vmid, $fmt, $name, $size) = @_;
@@ -105,7 +116,7 @@ sub alloc_image {
 }
 
 sub free_image {
-    my ($class, $storeid, $scfg, $volname) = @_;
+    my ($class, $storeid, $scfg, $volname, $isBase) = @_;
 
     die "can't free space in iscsi storage\n";
 }
@@ -194,7 +205,7 @@ sub volume_resize {
 }
 
 sub volume_snapshot {
-    my ($class, $scfg, $storeid, $volname, $snap, $running) = @_;
+    my ($class, $scfg, $storeid, $volname, $snap) = @_;
     die "volume snapshot is not possible on iscsi device";
 }
 
@@ -211,6 +222,21 @@ sub volume_snapshot_delete {
 sub volume_has_feature {
     my ($class, $scfg, $feature, $storeid, $volname, $snapname, $running) = @_;
     
+    my $features = {
+       copy => { current => 1},
+    };
+
+    my ($vtype, $name, $vmid, $basename, $basevmid, $isBase) =
+       $class->parse_volname($volname);
+
+    my $key = undef;
+    if($snapname){
+       $key = 'snap';
+    }else{
+       $key =  $isBase ? 'base' : 'current';
+    }
+    return 1 if $features->{$feature}->{$key};
+
     return undef;
 }