mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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>
This commit is contained in:
1 parent
472b6cb977
commit
96c551880a
3 files changed
+13
-9
No files matched your search
@@ -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):
|
||||
|
||||
@@ -406,6 +406,10 @@ 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,
|
||||
use="""Should the device model use SDL?""")
|
||||
@@ -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]])
|
||||
|
||||