[pve-devel] [PATCH] bugfix #340 : don't set cache=none to cdrom

Alexandre Derumier aderumier at odiso.com
Wed Feb 27 07:47:11 CET 2013


Cdrom devices don't works with cache=none and no reason to force cache mode on cdrom

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

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 8b08d9a..80f7cf4 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1106,7 +1106,7 @@ sub print_drive_full {
 	}
     }
 
-    $opts .= ",cache=none" if !$drive->{cache};
+    $opts .= ",cache=none" if !$drive->{cache} && !drive_is_cdrom($drive);
 
     my $pathinfo = $path ? "file=$path," : '';
 
-- 
1.7.10.4




More information about the pve-devel mailing list