[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Update xend to support vnc configuration for qemu 0.8.1 based ioemu.



# HG changeset patch
# User chris@xxxxxxxxxxxxxxxxxxxxxxxx
# Node ID a70c4f9657cc2a9606ea37650b351e222527d72f
# Parent  6d8f2d78d7c8fe510d14d6ab9766f0bce11b936a
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@xxxxxxxxxxxxx>
---
 tools/examples/xmexample.hvm   |    4 ++++
 tools/python/xen/xend/image.py |   10 +++-------
 tools/python/xen/xm/create.py  |    8 ++++++--
 3 files changed, 13 insertions(+), 9 deletions(-)

diff -r 6d8f2d78d7c8 -r a70c4f9657cc tools/examples/xmexample.hvm
--- a/tools/examples/xmexample.hvm      Wed Jul 12 19:16:12 2006 +0100
+++ b/tools/examples/xmexample.hvm      Wed Jul 12 19:16:14 2006 +0100
@@ -130,6 +130,10 @@ vnc=1
 vnc=1
 
 #----------------------------------------------------------------------------
+# set VNC display number, default = domid
+#vncdisplay=1
+
+#----------------------------------------------------------------------------
 # enable spawning vncviewer(only valid when vnc=1), default = 1
 vncviewer=1
 
diff -r 6d8f2d78d7c8 -r a70c4f9657cc tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Wed Jul 12 19:16:12 2006 +0100
+++ b/tools/python/xen/xend/image.py    Wed Jul 12 19:16:14 2006 +0100
@@ -318,20 +318,16 @@ class HVMImageHandler(ImageHandler):
     def configVNC(self, config):
         # Handle graphics library related options
         vnc = sxp.child_value(config, 'vnc')
+        vncdisplay = sxp.child_value(config, 'vncdisplay',
+                                     int(self.vm.getDomid()))
         sdl = sxp.child_value(config, 'sdl')
         ret = []
         nographic = sxp.child_value(config, 'nographic')
         if nographic:
             ret.append('-nographic')
             return ret
-
-        if vnc and sdl:
-            ret = ret + ['-vnc-and-sdl', '-k', 'en-us']
-        elif vnc:
-            ret = ret + ['-vnc', '-k', 'en-us']
         if vnc:
-            vncport = int(self.vm.getDomid()) + 5900
-            ret = ret + ['-vncport', '%d' % vncport]
+            ret = ret + ['-vnc', '%d' % vncdisplay, '-k', 'en-us']
         return ret
 
     def createDeviceModel(self):
diff -r 6d8f2d78d7c8 -r a70c4f9657cc tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Wed Jul 12 19:16:12 2006 +0100
+++ b/tools/python/xen/xm/create.py     Wed Jul 12 19:16:14 2006 +0100
@@ -405,6 +405,10 @@ gopts.var('vnc', val='',
 gopts.var('vnc', val='',
           fn=set_value, default=None,
           use="""Should the device model use VNC?""")
+
+gopts.var('vncdisplay', val='',
+          fn=set_value, default=None,
+          use="""VNC display to use""")
 
 gopts.var('sdl', val='',
           fn=set_value, default=None,
@@ -615,8 +619,8 @@ def configure_hvm(config_image, vals):
     """
     args = [ 'device_model', 'pae', 'vcpus', 'cdrom', 'boot', 'fda', 'fdb',
              'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'audio',
-             'vnc', 'vncviewer', 'sdl', 'display', 'acpi', 'apic',
-             'xauthority', 'usb', 'usbdevice' ]
+             'vnc', 'vncdisplay', 'vncviewer', 'sdl', 'display',
+             'acpi', 'apic', 'xauthority', 'usb', 'usbdevice' ]
     for a in args:
         if (vals.__dict__[a]):
             config_image.append([a, vals.__dict__[a]])

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.