[Kimchi-devel] [PATCH] Fix bug #647: Properly set qxl as video model for Fedora 22
Aline Manera
alinefm at linux.vnet.ibm.com
Tue Jun 9 16:30:36 UTC 2015
Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
---
src/kimchi/osinfo.py | 6 ++++++
src/kimchi/vmtemplate.py | 8 ++++++++
2 files changed, 14 insertions(+)
diff --git a/src/kimchi/osinfo.py b/src/kimchi/osinfo.py
index 35aa594..78eb828 100644
--- a/src/kimchi/osinfo.py
+++ b/src/kimchi/osinfo.py
@@ -68,6 +68,9 @@ template_specs = {'x86': {'old': dict(disk_bus='ide',
memory=1280)}}
+custom_specs = {'fedora': {'22': dict(video_model='qxl')}}
+
+
modern_version_bases = {'x86': {'debian': '6.0', 'ubuntu': '7.10',
'opensuse': '10.3', 'centos': '5.3',
'rhel': '6.0', 'fedora': '16', 'gentoo': '0',
@@ -199,6 +202,9 @@ def lookup(distro, version):
params['os_distro'] = params['os_version'] = "unknown"
params.update(template_specs[arch]['old'])
+ # Get custom specifications
+ params.update(custom_specs.get(distro, {}).get(version, {}))
+
if distro in icon_available_distros:
params['icon'] = 'images/icon-%s.png' % distro
else:
diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py
index 4143839..79e04ed 100644
--- a/src/kimchi/vmtemplate.py
+++ b/src/kimchi/vmtemplate.py
@@ -259,6 +259,12 @@ class VMTemplate(object):
<input type='tablet' bus='%(kbd_bus)s'> </input>
"""
+ video = """
+ <video>
+ <model type='%(video_model)s'/>
+ </video>
+ """
+
input_output = ""
if 'mouse_bus' in self.info.keys():
input_output += mouse % self.info
@@ -268,6 +274,8 @@ class VMTemplate(object):
input_output += tablet % self.info
if 'sound_model' in self.info.keys():
input_output += sound % self.info
+ if 'video_model' in self.info.keys():
+ input_output += video % self.info
return input_output
def _get_cpu_xml(self):
--
2.1.0
More information about the Kimchi-devel
mailing list