WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEND] If 'vncused' is set, it won't spec

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] If 'vncused' is set, it won't specify an explicit display num to QEMU.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 04 Oct 2006 11:20:30 +0000
Delivery-date: Wed, 04 Oct 2006 04:20:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID ddc56007bf3f82367988d3cc3f3a7e062fb906e2
# Parent  7a7e8cf9a4f9e91c643396447e8eb59dad3c9ea3
[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@xxxxxxxxxx>
---
 tools/python/xen/xend/image.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r 7a7e8cf9a4f9 -r ddc56007bf3f tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Wed Oct 04 09:32:01 2006 +0100
+++ b/tools/python/xen/xend/image.py    Wed Oct 04 09:42:41 2006 +0100
@@ -355,10 +355,12 @@ class HVMImageHandler(ImageHandler):
         if vnc:
             vncdisplay = sxp.child_value(config, 'vncdisplay',
                                          int(self.vm.getDomid()))
-            ret = ret + ['-vnc', '%d' % vncdisplay, '-k', 'en-us']
             vncunused = sxp.child_value(config, 'vncunused')
             if vncunused:
                 ret += ['-vncunused']
+            else:
+                ret += ['-vnc', '%d' % vncdisplay]
+            ret += ['-k', 'en-us']
         return ret
 
     def createDeviceModel(self):

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEND] If 'vncused' is set, it won't specify an explicit display num to QEMU., Xen patchbot-unstable <=