ia64/xen-unstable

changeset 11733:ddc56007bf3f

[XEND] If 'vncused' is set, it won't specify an explicit display num to QEMU.

In the current xen-unstable.hg tree tough, XenD will always pass an
explicit '-vnc <display num>' parameter to qemu-dm, regardless of
whether 'vncunused' is set. So the 'vncunused' bit only takes effect
if the explicitly passed display already has something bound to it.

Consider what happens when the host machine has been up for a while -
the Domain ID's start getting very high. This plays havoc with
firewalls - for example an admin may know that only 10 domains will
ever be running at any time, so they should be able to simply open up
ports 5900 -> 5910.

The correct behaviour should be:

- If 'vncdisplay' is set, use that explicit display
- If 'vncunused' is set non-zero, allocate first port about 5900
- Allocate fixed port based on domain-ID

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Oct 04 09:42:41 2006 +0100 (2006-10-04)
parents 7a7e8cf9a4f9
children 6a8ae4c34abe
files tools/python/xen/xend/image.py
line diff
     1.1 --- a/tools/python/xen/xend/image.py	Wed Oct 04 09:32:01 2006 +0100
     1.2 +++ b/tools/python/xen/xend/image.py	Wed Oct 04 09:42:41 2006 +0100
     1.3 @@ -355,10 +355,12 @@ class HVMImageHandler(ImageHandler):
     1.4          if vnc:
     1.5              vncdisplay = sxp.child_value(config, 'vncdisplay',
     1.6                                           int(self.vm.getDomid()))
     1.7 -            ret = ret + ['-vnc', '%d' % vncdisplay, '-k', 'en-us']
     1.8              vncunused = sxp.child_value(config, 'vncunused')
     1.9              if vncunused:
    1.10                  ret += ['-vncunused']
    1.11 +            else:
    1.12 +                ret += ['-vnc', '%d' % vncdisplay]
    1.13 +            ret += ['-k', 'en-us']
    1.14          return ret
    1.15  
    1.16      def createDeviceModel(self):