
There is an error in Kimchi when you try to start a guest created based on a template that is using an iscsi storage pool. A lun should be used as disk, but the iscsi case was not being expected and kimchi assigned an .img file to the guest, raising error in the starting. This patch fixed this problem. Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com> --- src/kimchi/vmtemplate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py index f380170..9825159 100644 --- a/src/kimchi/vmtemplate.py +++ b/src/kimchi/vmtemplate.py @@ -24,6 +24,7 @@ import urlparse from kimchi import osinfo +from kimchi.config import READONLY_POOL_TYPE from kimchi.exception import InvalidParameter, IsoFormatError from kimchi.isoinfo import IsoImage from kimchi.utils import check_url_path, pool_name_from_uri @@ -271,7 +272,7 @@ class VMTemplate(object): # Current implementation just allows to create disk in one single # storage pool, so we cannot mix the types (scsi volumes vs img file) - if self._get_storage_type() == 'scsi': + if self._get_storage_type() in READONLY_POOL_TYPE: params['disks'] = self._get_scsi_disks_xml(kwargs.get('volumes')) else: params['disks'] = self._get_disks_xml(vm_uuid) -- 1.8.5.3