[pve-devel] [PATCH 2/3] use scsi-generic by default with libiscsi

Alexandre Derumier aderumier at odiso.com
Tue Aug 28 12:46:07 CEST 2012


This add scsi passthrough with libiscsi

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 74b8b65..8731d99 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -988,7 +988,13 @@ sub print_drivedevice_full {
               } else {
                   $path = PVE::Storage::path($storecfg, $drive->{file});
               }
-	      $devicetype = 'block' if path_is_scsi($path);
+
+	      if($path =~ m/^iscsi\:\/\//){
+		 $devicetype = 'generic';
+	      }
+	      else {
+		 $devicetype = 'block' if path_is_scsi($path);
+	      }
          }
 
         if (!$conf->{scsihw} || $conf->{scsihw} eq 'lsi'){
-- 
1.7.2.5




More information about the pve-devel mailing list