[Kimchi-devel] [PATCH 1/2] Issue#338: Change the default cdrom bus to scsi

lvroyce at linux.vnet.ibm.com lvroyce at linux.vnet.ibm.com
Thu Mar 13 10:47:42 UTC 2014


From: Royce Lv <lvroyce at linux.vnet.ibm.com>

CDROM cannot be extended to more than 4,
this is limitation of IDE bus.
Change default bus of cdrom to scsi to overcome this limitation.

Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
---
 src/kimchi/model/vmstorages.py | 2 +-
 src/kimchi/osinfo.py           | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/kimchi/model/vmstorages.py b/src/kimchi/model/vmstorages.py
index c1c90ce..b858703 100644
--- a/src/kimchi/model/vmstorages.py
+++ b/src/kimchi/model/vmstorages.py
@@ -55,7 +55,7 @@ def _get_storage_xml(params):
         source.set(DEV_TYPE_SRC_ATTR_MAP[src_type], params.get('path'))
         disk.append(source)
 
-    disk.append(E.target(dev=params.get('dev'), bus='ide'))
+    disk.append(E.target(dev=params.get('dev'), bus='scsi'))
     return ET.tostring(disk)
 
 
diff --git a/src/kimchi/osinfo.py b/src/kimchi/osinfo.py
index 02dbabf..8d64422 100644
--- a/src/kimchi/osinfo.py
+++ b/src/kimchi/osinfo.py
@@ -32,7 +32,7 @@ SUPPORTED_ARCHS = {'x86': ('i386', 'x86_64'), 'power': ('ppc', 'ppc64')}
 
 
 common_spec = {'cpus': 1, 'cpu_cores': 1, 'cpu_threads': 1, 'memory': 1024,
-               'disks': [{'index': 0, 'size': 10}], 'cdrom_bus': 'ide',
+               'disks': [{'index': 0, 'size': 10}],
                'cdrom_index': 2, 'mouse_bus': 'ps2'}
 
 
@@ -40,8 +40,10 @@ modern_spec = dict(common_spec, disk_bus='virtio', nic_model='virtio')
 
 
 template_specs = {'x86': {'old': dict(common_spec, disk_bus='ide',
-                                      nic_model='e1000', sound_model='ich6'),
+                                      cdrom_bus='ide', nic_model='e1000',
+                                      sound_model='ich6'),
                           'modern': dict(common_spec, disk_bus='virtio',
+                                         cdrom_bus='scsi',
                                          nic_model='virtio',
                                          sound_model='ich6')},
                   'power': {'old': dict(common_spec, disk_bus='scsi',
-- 
1.8.1.2




More information about the Kimchi-devel mailing list