From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
When vol_info reports unsupported type, such as an iscsi volume with type
'unknown',
use 'raw' without overwriting it, this applied to type 'unknown',
'iso'
and so on.
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
src/kimchi/model/vmstorages.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/kimchi/model/vmstorages.py b/src/kimchi/model/vmstorages.py
index f11bcec..3a656b2 100644
--- a/src/kimchi/model/vmstorages.py
+++ b/src/kimchi/model/vmstorages.py
@@ -153,7 +153,8 @@ class VMStoragesModel(object):
raise InvalidParameter("KCHVMSTOR0015E", {'error': e})
if vol_info['ref_cnt'] != 0:
raise InvalidParameter("KCHVMSTOR0016E")
- params['format'] = vol_info['format']
+ if vol_info['format'] in ["raw", "bochs",
"qcow2", "qed"]:
+ params['format'] = vol_info['format']
params['path'] = vol_info['path']
params['src_type'] = _check_path(params['path'])
if (params['bus'] not in HOTPLUG_TYPE
--
1.8.3.2