[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xend: Add keymap to vfb config for existing hvm guests



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1260258594 0
# Node ID ab0d71f7f596048194c4389bd4fc8a25221ac380
# Parent  cf4f3e2f425c86d54f4e8cebe1e193ca7839dbd9
xend: Add keymap to vfb config for existing hvm guests

I submitted a patch a while back to add keymap to vfb config for hvm
guests.  This patch works fine for new config (xm create|new) but not
existing, managed guests.  To cover the latter case I've introduced a
validator method in XendConfig.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py |    9 +++++++++
 1 files changed, 9 insertions(+)

diff -r cf4f3e2f425c -r ab0d71f7f596 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Tue Dec 08 07:48:45 2009 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Tue Dec 08 07:49:54 2009 +0000
@@ -518,6 +518,14 @@ class XendConfig(dict):
                self['platform'].get('enable_audio'):
                 self['platform']['soundhw'] = 'sb16'
 
+    def _vfb_sanity_check(self):
+        if 'keymap' in self['platform']:
+            for con in self['console_refs']:
+                if self['devices'][con][0] == 'vfb':
+                    if 'keymap' not in self['devices'][con][1]:
+                        self['devices'][con][1]['keymap'] = \
+                            self['platform']['keymap']
+
     def validate(self):
         self._uuid_sanity_check()
         self._name_sanity_check()
@@ -525,6 +533,7 @@ class XendConfig(dict):
         self._actions_sanity_check()
         self._vcpus_sanity_check()
         self._platform_sanity_check()
+        self._vfb_sanity_check()
 
     def _dominfo_to_xapi(self, dominfo, update_mem = False):
         self['domid'] = dominfo['domid']

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.