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>
This commit is contained in:
Keir Fraser committed 2009-12-08 07:49:54 +00:00
1 parent 80bae1b6dc
commit ef86b9f18b
1 file changed
+9
+9
View File
@@ -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']
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.