debuggers.hg

changeset 20639:ab0d71f7f596

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@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Dec 08 07:49:54 2009 +0000 (2009-12-08)
parents cf4f3e2f425c
children 66ff18dd3858
files tools/python/xen/xend/XendConfig.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Tue Dec 08 07:48:45 2009 +0000
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Tue Dec 08 07:49:54 2009 +0000
     1.3 @@ -518,6 +518,14 @@ class XendConfig(dict):
     1.4                 self['platform'].get('enable_audio'):
     1.5                  self['platform']['soundhw'] = 'sb16'
     1.6  
     1.7 +    def _vfb_sanity_check(self):
     1.8 +        if 'keymap' in self['platform']:
     1.9 +            for con in self['console_refs']:
    1.10 +                if self['devices'][con][0] == 'vfb':
    1.11 +                    if 'keymap' not in self['devices'][con][1]:
    1.12 +                        self['devices'][con][1]['keymap'] = \
    1.13 +                            self['platform']['keymap']
    1.14 +
    1.15      def validate(self):
    1.16          self._uuid_sanity_check()
    1.17          self._name_sanity_check()
    1.18 @@ -525,6 +533,7 @@ class XendConfig(dict):
    1.19          self._actions_sanity_check()
    1.20          self._vcpus_sanity_check()
    1.21          self._platform_sanity_check()
    1.22 +        self._vfb_sanity_check()
    1.23  
    1.24      def _dominfo_to_xapi(self, dominfo, update_mem = False):
    1.25          self['domid'] = dominfo['domid']