ia64/xen-unstable

changeset 19444:b89a9e97bd39

xend: Properly save/restore vnc/vfb configuration

In 19284:0942BAA2A088 provision was made for running vnc and sdl
simultaneously. However, arrangements for saving and restoring the
new structure-configuration, and arrangements for allowing the new
code to load old savefiles, were not made.

This patch adds these facilities. Amongst other things, HVM VNC
save/restore will now work properly again.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 31 11:23:38 2009 +0100 (2009-03-31)
parents b8d2f08f98d0
children 35fd5a1922bc
files tools/python/xen/xend/XendConfig.py tools/python/xen/xend/server/vfbif.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Tue Mar 31 11:21:14 2009 +0100
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Tue Mar 31 11:23:38 2009 +0100
     1.3 @@ -1410,6 +1410,21 @@ class XendConfig(dict):
     1.4                  if dev_uuid not in target['console_refs']:
     1.5                      target['console_refs'].append(dev_uuid)
     1.6  
     1.7 +		# Cope with old-format save files which say under vfb
     1.8 +		# (type vfb) rather than (vfb 1)
     1.9 +		try:
    1.10 +		    vfb_type = dev_info['type']
    1.11 +		except KeyError:
    1.12 +		    vfb_type = None
    1.13 +		log.debug("iwj dev_type=%s vfb type %s" %
    1.14 +			(dev_type, `vfb_type`))
    1.15 +
    1.16 +		if vfb_type == 'vnc' or vfb_type == 'sdl':
    1.17 +		    dev_info[vfb_type] = 1
    1.18 +		    del dev_info['type']
    1.19 +		    log.debug("iwj dev_type=%s vfb setting dev_info['%s']" %
    1.20 +				(dev_type, vfb_type))
    1.21 +                
    1.22              elif dev_type == 'console':
    1.23                  if 'console_refs' not in target:
    1.24                      target['console_refs'] = []
     2.1 --- a/tools/python/xen/xend/server/vfbif.py	Tue Mar 31 11:21:14 2009 +0100
     2.2 +++ b/tools/python/xen/xend/server/vfbif.py	Tue Mar 31 11:23:38 2009 +0100
     2.3 @@ -6,7 +6,7 @@ import xen.xend
     2.4  import os
     2.5  
     2.6  CONFIG_ENTRIES = ['type', 'vncdisplay', 'vnclisten', 'vncpasswd', 'vncunused',
     2.7 -                  'videoram', 'display', 'xauthority', 'keymap',
     2.8 +                  'videoram', 'display', 'xauthority', 'keymap', 'vnc', 'sdl',
     2.9                    'uuid', 'location', 'protocol', 'opengl']
    2.10  
    2.11  class VfbifController(DevController):