[Kimchi-devel] [PATCH] Fix guest disk return when disk is a iscsi volume

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Tue Aug 26 04:51:43 UTC 2014


When a guest has an ISCSI volume attached as disk, backend is not
returning path correctly, it return a blank field. This patch fixes
this problem, returning the path = <iscsi pool> - <volume unit>.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
---
 src/kimchi/vmdisks.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/kimchi/vmdisks.py b/src/kimchi/vmdisks.py
index 6012ada..6835172 100644
--- a/src/kimchi/vmdisks.py
+++ b/src/kimchi/vmdisks.py
@@ -53,6 +53,9 @@ def get_vm_disk(dom, dev_name):
                 path = (source.attrib['protocol'] + '://' +
                         host.attrib['name'] + ':' +
                         host.attrib['port'] + source.attrib['name'])
+            # ISCSI, Fibre Channel
+            elif src_type == 'volume':
+                path = source.attrib['pool'] + ' - ' + source.attrib['volume']
             else:
                 path = source.attrib[DEV_TYPE_SRC_ATTR_MAP[src_type]]
         # Retrieve storage bus type
-- 
1.9.3




More information about the Kimchi-devel mailing list