debuggers.hg
changeset 17274:bdaf721c3616
vfb: Add opengl option
(and replace bogus vncpasswd copy in xenapi_create in the SDL case)
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
(and replace bogus vncpasswd copy in xenapi_create in the SDL case)
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Tue Mar 18 15:51:19 2008 +0000 (2008-03-18) |
parents | c4de13817571 |
children | 2c2b442902e2 |
files | tools/python/xen/xend/XendConfig.py tools/python/xen/xend/image.py tools/python/xen/xend/server/vfbif.py tools/python/xen/xm/create.py tools/python/xen/xm/xenapi_create.py |
line diff
1.1 --- a/tools/python/xen/xend/XendConfig.py Tue Mar 18 15:26:35 2008 +0000 1.2 +++ b/tools/python/xen/xend/XendConfig.py Tue Mar 18 15:51:19 2008 +0000 1.3 @@ -165,7 +165,7 @@ XENAPI_PLATFORM_CFG_TYPES = { 1.4 # Xen API console 'other_config' keys. 1.5 XENAPI_CONSOLE_OTHER_CFG = ['vncunused', 'vncdisplay', 'vnclisten', 1.6 'vncpasswd', 'type', 'display', 'xauthority', 1.7 - 'keymap'] 1.8 + 'keymap', 'opengl'] 1.9 1.10 # List of XendConfig configuration keys that have no direct equivalent 1.11 # in the old world.
2.1 --- a/tools/python/xen/xend/image.py Tue Mar 18 15:26:35 2008 +0000 2.2 +++ b/tools/python/xen/xend/image.py Tue Mar 18 15:51:19 2008 +0000 2.3 @@ -202,6 +202,7 @@ class ImageHandler: 2.4 vnc_config = {} 2.5 has_vnc = int(vmConfig['platform'].get('vnc', 0)) != 0 2.6 has_sdl = int(vmConfig['platform'].get('sdl', 0)) != 0 2.7 + opengl = 1 2.8 for dev_uuid in vmConfig['console_refs']: 2.9 dev_type, dev_info = vmConfig['devices'][dev_uuid] 2.10 if dev_type == 'vfb': 2.11 @@ -209,6 +210,7 @@ class ImageHandler: 2.12 if vfb_type == 'sdl': 2.13 self.display = dev_info.get('display', {}) 2.14 self.xauthority = dev_info.get('xauthority', {}) 2.15 + opengl = int(dev_info.get('opengl', opengl)) 2.16 has_sdl = True 2.17 else: 2.18 vnc_config = dev_info.get('other_config', {}) 2.19 @@ -263,7 +265,7 @@ class ImageHandler: 2.20 2.21 elif has_sdl: 2.22 # SDL is default in QEMU. 2.23 - if int(vmConfig['platform'].get('opengl', 1)) != 1 : 2.24 + if int(vmConfig['platform'].get('opengl', opengl)) != 1 : 2.25 ret.append('-disable-opengl') 2.26 else: 2.27 ret.append('-nographic')
3.1 --- a/tools/python/xen/xend/server/vfbif.py Tue Mar 18 15:26:35 2008 +0000 3.2 +++ b/tools/python/xen/xend/server/vfbif.py Tue Mar 18 15:51:19 2008 +0000 3.3 @@ -7,7 +7,7 @@ import os 3.4 3.5 CONFIG_ENTRIES = ['type', 'vncdisplay', 'vnclisten', 'vncpasswd', 'vncunused', 3.6 'display', 'xauthority', 'keymap', 3.7 - 'uuid', 'location', 'protocol'] 3.8 + 'uuid', 'location', 'protocol', 'opengl'] 3.9 3.10 class VfbifController(DevController): 3.11 """Virtual frame buffer controller. Handles all vfb devices for a domain.
4.1 --- a/tools/python/xen/xm/create.py Tue Mar 18 15:26:35 2008 +0000 4.2 +++ b/tools/python/xen/xm/create.py Tue Mar 18 15:51:19 2008 +0000 4.3 @@ -319,7 +319,7 @@ gopts.var('irq', val='IRQ', 4.4 For example 'irq=7'. 4.5 This option may be repeated to add more than one IRQ.""") 4.6 4.7 -gopts.var('vfb', val="type={vnc,sdl},vncunused=1,vncdisplay=N,vnclisten=ADDR,display=DISPLAY,xauthority=XAUTHORITY,vncpasswd=PASSWORD", 4.8 +gopts.var('vfb', val="type={vnc,sdl},vncunused=1,vncdisplay=N,vnclisten=ADDR,display=DISPLAY,xauthority=XAUTHORITY,vncpasswd=PASSWORD,opengl=1", 4.9 fn=append_value, default=[], 4.10 use="""Make the domain a framebuffer backend. 4.11 The backend type should be either sdl or vnc. 4.12 @@ -330,7 +330,7 @@ gopts.var('vfb', val="type={vnc,sdl},vnc 4.13 default password. 4.14 For type=sdl, a viewer will be started automatically using the 4.15 given DISPLAY and XAUTHORITY, which default to the current user's 4.16 - ones.""") 4.17 + ones. OpenGL will be used by default unless opengl is set to 0.""") 4.18 4.19 gopts.var('vif', val="type=TYPE,mac=MAC,bridge=BRIDGE,ip=IPADDR,script=SCRIPT," + \ 4.20 "backend=DOM,vifname=NAME,rate=RATE,model=MODEL,accel=ACCEL", 4.21 @@ -645,7 +645,7 @@ def configure_vfbs(config_devs, vals): 4.22 d['type'] = 'sdl' 4.23 for (k,v) in d.iteritems(): 4.24 if not k in [ 'vnclisten', 'vncunused', 'vncdisplay', 'display', 4.25 - 'xauthority', 'type', 'vncpasswd' ]: 4.26 + 'xauthority', 'type', 'vncpasswd', 'opengl' ]: 4.27 err("configuration option %s unknown to vfbs" % k) 4.28 config.append([k,v]) 4.29 if not d.has_key("keymap"):
5.1 --- a/tools/python/xen/xm/xenapi_create.py Tue Mar 18 15:26:35 2008 +0000 5.2 +++ b/tools/python/xen/xm/xenapi_create.py Tue Mar 18 15:51:19 2008 +0000 5.3 @@ -810,7 +810,7 @@ class sxp2xml: 5.4 get_child_by_name(image, "vxauthority", "127.0.0.1"), 5.5 document)) 5.6 console.appendChild(self.mk_other_config( 5.7 - "vncpasswd", get_child_by_name(image, "vncpasswd", ""), 5.8 + "opengl", get_child_by_name(image, "opengl", "1"), 5.9 document)) 5.10 consoles.append(console) 5.11