[qemu] Add vncunused option.

If the port used for the requested display number is in use, try
additional ports until a free port is found.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
This commit is contained in:
chris@kneesaa.uk.xensource.com committed 2006-08-09 15:03:38 +01:00
1 parent 29ee8ec824
commit 26453d70cc
6 files changed
+37 -8

No files matched your search

+3
View File
@@ -307,6 +307,7 @@ class HVMImageHandler(ImageHandler):
vnc = sxp.child_value(config, 'vnc')
vncdisplay = sxp.child_value(config, 'vncdisplay',
int(self.vm.getDomid()))
vncunused = sxp.child_value(config, 'vncunused')
sdl = sxp.child_value(config, 'sdl')
ret = []
nographic = sxp.child_value(config, 'nographic')
@@ -315,6 +316,8 @@ class HVMImageHandler(ImageHandler):
return ret
if vnc:
ret = ret + ['-vnc', '%d' % vncdisplay, '-k', 'en-us']
if vncunused:
ret += ['-vncunused']
return ret
def createDeviceModel(self):
+6 -1
View File
@@ -412,6 +412,11 @@ gopts.var('vncdisplay', val='',
fn=set_value, default=None,
use="""VNC display to use""")
gopts.var('vncunused', val='',
fn=set_bool, default=1,
use="""Try to find an unused port for the VNC server.
Only valid when vnc=1.""")
gopts.var('sdl', val='',
fn=set_value, default=None,
use="""Should the device model use SDL?""")
@@ -627,7 +632,7 @@ def configure_hvm(config_image, vals):
"""
args = [ 'device_model', 'pae', 'vcpus', 'boot', 'fda', 'fdb',
'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
'vnc', 'vncdisplay', 'vncconsole', 'sdl', 'display',
'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'sdl', 'display',
'acpi', 'apic', 'xauthority', 'usb', 'usbdevice' ]
for a in args:
if (vals.__dict__[a]):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.