[pve-devel] [PATCH] parse_drive : set default format=raw if !cdrom or no file extension
Alexandre Derumier
aderumier at odiso.com
Tue Jun 9 15:53:59 CEST 2015
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/QemuServer.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 047fecd..eb69282 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -915,6 +915,8 @@ sub parse_drive {
if($res->{file} =~ m/\.(raw|cow|qcow|qcow2|vmdk|cloop)$/){
$res->{format} = $1;
+ }else{
+ $res->{format} = 'raw' if !$res->{media} || $res->{media} ne 'cdrom';
}
return undef if $res->{cache} &&
--
2.1.4
More information about the pve-devel
mailing list