ia64/xen-unstable

changeset 10734:a70c4f9657cc

Update xend to support vnc configuration for qemu 0.8.1 based ioemu.
Also add vncdisplay= option which allows setting the display number
instead of using the default display number (= domid).

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author chris@kneesaa.uk.xensource.com
date Wed Jul 12 19:16:14 2006 +0100 (2006-07-12)
parents 6d8f2d78d7c8
children af9809f51f81
files tools/examples/xmexample.hvm tools/python/xen/xend/image.py tools/python/xen/xm/create.py
line diff
     1.1 --- a/tools/examples/xmexample.hvm	Wed Jul 12 19:16:12 2006 +0100
     1.2 +++ b/tools/examples/xmexample.hvm	Wed Jul 12 19:16:14 2006 +0100
     1.3 @@ -130,6 +130,10 @@ sdl=0
     1.4  vnc=1
     1.5  
     1.6  #----------------------------------------------------------------------------
     1.7 +# set VNC display number, default = domid
     1.8 +#vncdisplay=1
     1.9 +
    1.10 +#----------------------------------------------------------------------------
    1.11  # enable spawning vncviewer(only valid when vnc=1), default = 1
    1.12  vncviewer=1
    1.13  
     2.1 --- a/tools/python/xen/xend/image.py	Wed Jul 12 19:16:12 2006 +0100
     2.2 +++ b/tools/python/xen/xend/image.py	Wed Jul 12 19:16:14 2006 +0100
     2.3 @@ -318,20 +318,16 @@ class HVMImageHandler(ImageHandler):
     2.4      def configVNC(self, config):
     2.5          # Handle graphics library related options
     2.6          vnc = sxp.child_value(config, 'vnc')
     2.7 +        vncdisplay = sxp.child_value(config, 'vncdisplay',
     2.8 +                                     int(self.vm.getDomid()))
     2.9          sdl = sxp.child_value(config, 'sdl')
    2.10          ret = []
    2.11          nographic = sxp.child_value(config, 'nographic')
    2.12          if nographic:
    2.13              ret.append('-nographic')
    2.14              return ret
    2.15 -
    2.16 -        if vnc and sdl:
    2.17 -            ret = ret + ['-vnc-and-sdl', '-k', 'en-us']
    2.18 -        elif vnc:
    2.19 -            ret = ret + ['-vnc', '-k', 'en-us']
    2.20          if vnc:
    2.21 -            vncport = int(self.vm.getDomid()) + 5900
    2.22 -            ret = ret + ['-vncport', '%d' % vncport]
    2.23 +            ret = ret + ['-vnc', '%d' % vncdisplay, '-k', 'en-us']
    2.24          return ret
    2.25  
    2.26      def createDeviceModel(self):
     3.1 --- a/tools/python/xen/xm/create.py	Wed Jul 12 19:16:12 2006 +0100
     3.2 +++ b/tools/python/xen/xm/create.py	Wed Jul 12 19:16:14 2006 +0100
     3.3 @@ -406,6 +406,10 @@ gopts.var('vnc', val='',
     3.4            fn=set_value, default=None,
     3.5            use="""Should the device model use VNC?""")
     3.6  
     3.7 +gopts.var('vncdisplay', val='',
     3.8 +          fn=set_value, default=None,
     3.9 +          use="""VNC display to use""")
    3.10 +
    3.11  gopts.var('sdl', val='',
    3.12            fn=set_value, default=None,
    3.13            use="""Should the device model use SDL?""")
    3.14 @@ -615,8 +619,8 @@ def configure_hvm(config_image, vals):
    3.15      """
    3.16      args = [ 'device_model', 'pae', 'vcpus', 'cdrom', 'boot', 'fda', 'fdb',
    3.17               'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'audio',
    3.18 -             'vnc', 'vncviewer', 'sdl', 'display', 'acpi', 'apic',
    3.19 -             'xauthority', 'usb', 'usbdevice' ]
    3.20 +             'vnc', 'vncdisplay', 'vncviewer', 'sdl', 'display',
    3.21 +             'acpi', 'apic', 'xauthority', 'usb', 'usbdevice' ]
    3.22      for a in args:
    3.23          if (vals.__dict__[a]):
    3.24              config_image.append([a, vals.__dict__[a]])