disk = [ 'file:/var/images/min-el3-i386.img,hda,w', ',hdc:cdrom,r' ]
# Actual output via PVFB
-vfb = [ 'type=sdl' ]
+vfb = [ 'sdl=1' ]
#
# To create one using the SDL backend and sensible defaults:
#
-# vfb = [ 'type=sdl' ]
+# vfb = [ 'sdl=1' ]
#
# This uses environment variables XAUTHORITY and DISPLAY. You
# can override that:
#
-# vfb = [ 'type=sdl,xauthority=/home/bozo/.Xauthority,display=:1' ]
+# vfb = [ 'sdl=1,xauthority=/home/bozo/.Xauthority,display=:1' ]
#
# To create one using the VNC backend and sensible defaults:
#
-# vfb = [ 'type=vnc' ]
+# vfb = [ 'vnc=1' ]
#
# The backend listens on 127.0.0.1 port 5900+N by default, where N is
# the domain ID. You can override both address and N:
#
-# vfb = [ 'type=vnc,vnclisten=127.0.0.1,vncdisplay=1' ]
+# vfb = [ 'vnc=1,vnclisten=127.0.0.1,vncdisplay=1' ]
#
# Or you can bind the first unused port above 5900:
#
-# vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncunused=1' ]
+# vfb = [ 'vnc=1,vnclisten=0.0.0.0,vncunused=1' ]
#
# You can override the password:
#
-# vfb = [ 'type=vnc,vncpasswd=MYPASSWD' ]
+# vfb = [ 'vnc=1,vncpasswd=MYPASSWD' ]
#
# Empty password disables authentication. Defaults to the vncpasswd
# configured in xend-config.sxp.
#
# To create one using the SDL backend and sensible defaults:
#
-# vfb = [ 'type=sdl' ]
+# vfb = [ 'sdl=1' ]
#
# This uses environment variables XAUTHORITY and DISPLAY. You
# can override that:
#
-# vfb = [ 'type=sdl,xauthority=/home/bozo/.Xauthority,display=:1' ]
+# vfb = [ 'sdl=1,xauthority=/home/bozo/.Xauthority,display=:1' ]
#
# To create one using the VNC backend and sensible defaults:
#
-# vfb = [ 'type=vnc' ]
+# vfb = [ 'vnc=1' ]
#
# The backend listens on 127.0.0.1 port 5900+N by default, where N is
# the domain ID. You can override both address and N:
#
-# vfb = [ 'type=vnc,vnclisten=127.0.0.1,vncdisplay=1' ]
+# vfb = [ 'vnc=1,vnclisten=127.0.0.1,vncdisplay=1' ]
#
# Or you can bind the first unused port above 5900:
#
-# vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncunused=1' ]
+# vfb = [ 'vnc=1,vnclisten=0.0.0.0,vncunused=1' ]
#
# You can override the password:
#
-# vfb = [ 'type=vnc,vncpasswd=MYPASSWD' ]
+# vfb = [ 'vnc=1,vncpasswd=MYPASSWD' ]
#
# Empty password disables authentication. Defaults to the vncpasswd
# configured in xend-config.sxp.
#
# To create one using the SDL backend and sensible defaults:
#
-# vfb = [ 'type=sdl' ]
+# vfb = [ 'sdl=1' ]
#
# This uses environment variables XAUTHORITY and DISPLAY. You
# can override that:
#
-# vfb = [ 'type=sdl,xauthority=/home/bozo/.Xauthority,display=:1' ]
+# vfb = [ 'sdl=1,xauthority=/home/bozo/.Xauthority,display=:1' ]
#
# To create one using the VNC backend and sensible defaults:
#
-# vfb = [ 'type=vnc' ]
+# vfb = [ 'vnc=1' ]
#
# The backend listens on 127.0.0.1 port 5900+N by default, where N is
# the domain ID. You can override both address and N:
#
-# vfb = [ 'type=vnc,vnclisten=127.0.0.1,vncdisplay=%d' % vmid ]
+# vfb = [ 'vnc=1,vnclisten=127.0.0.1,vncdisplay=%d' % vmid ]
#
# Or you can bind the first unused port above 5900:
#
-# vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncunused=1' ]
+# vfb = [ 'vnc=1,vnclisten=0.0.0.0,vncunused=1' ]
#
# You can override the password:
#
-# vfb = [ 'type=vnc,vncpasswd=MYPASSWD' ]
+# vfb = [ 'vnc=1,vncpasswd=MYPASSWD' ]
#
# Empty password disables authentication. Defaults to the vncpasswd
# configured in xend-config.sxp.
#
# To create one using the SDL backend and sensible defaults:
#
-# vfb = [ 'type=sdl' ]
+# vfb = [ 'sdl=1' ]
#
# This uses environment variables XAUTHORITY and DISPLAY. You
# can override that:
#
-# vfb = [ 'type=sdl,xauthority=/home/bozo/.Xauthority,display=:1' ]
+# vfb = [ 'sdl=1,xauthority=/home/bozo/.Xauthority,display=:1' ]
#
# To create one using the VNC backend and sensible defaults:
#
-# vfb = [ 'type=vnc' ]
+# vfb = [ 'vnc=1' ]
#
# The backend listens on 127.0.0.1 port 5900+N by default, where N is
# the domain ID. You can override both address and N:
#
-# vfb = [ 'type=vnc,vnclisten=127.0.0.1,vncdisplay=%d' % vmid ]
+# vfb = [ 'vnc=1,vnclisten=127.0.0.1,vncdisplay=%d' % vmid ]
#
# Or you can bind the first unused port above 5900:
#
-# vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncunused=1' ]
+# vfb = [ 'vnc=1,vnclisten=0.0.0.0,vncunused=1' ]
#
# You can override the password:
#
-# vfb = [ 'type=vnc,vncpasswd=MYPASSWD' ]
+# vfb = [ 'vnc=1,vncpasswd=MYPASSWD' ]
#
# Empty password disables authentication. Defaults to the vncpasswd
# configured in xend-config.sxp.
# Xen API console 'other_config' keys.
XENAPI_CONSOLE_OTHER_CFG = ['vncunused', 'vncdisplay', 'vnclisten',
- 'vncpasswd', 'type', 'display', 'xauthority',
+ 'vncpasswd', 'sdl', 'vnc', 'display', 'xauthority',
'keymap', 'opengl']
# List of XendConfig configuration keys that have no direct equivalent
# add vfb device if it isn't there already
if not self.has_rfb():
dev_config = ['vfb']
- dev_config.append(['type', 'vnc'])
+ dev_config.append(['vnc', '1'])
# copy VNC related params from platform config to vfb dev conf
for key in ['vncpasswd', 'vncunused', 'vncdisplay',
'vnclisten']:
# collapse other config into devinfo for things
# such as vncpasswd, vncunused, etc.
dev_info.update(console_other_config)
- dev_info['type'] = console_other_config.get('type', 'vnc')
+ dev_info['vnc'] = console_other_config.get('vnc', '0')
+ dev_info['sdl'] = console_other_config.get('sdl', '0')
target['devices'][dev_uuid] = ('vfb', dev_info)
target['console_refs'].append(dev_uuid)
if dev_type == 'vfb':
if 'keymap' in dev_info:
keymap = dev_info.get('keymap',{})
- vfb_type = dev_info.get('type', {})
- if vfb_type == 'sdl':
+ if int(dev_info.get('vnc', 0)) != 0 :
+ has_vnc = True
+ if int(dev_info.get('sdl', 0)) != 0 :
+ has_sdl = True
+ if has_sdl:
self.display = dev_info.get('display', {})
self.xauthority = dev_info.get('xauthority', {})
opengl = int(dev_info.get('opengl', opengl))
- has_sdl = True
- else:
+ if has_vnc:
vnc_config = dev_info.get('other_config', {})
- has_vnc = True
break
if keymap:
if int(vnc_config.get('vncunused', 1)) != 0:
ret.append('-vncunused')
- elif has_sdl:
- # SDL is default in QEMU.
+ if has_sdl:
+ ret.append('-sdl')
if int(vmConfig['platform'].get('opengl', opengl)) != 1 :
ret.append('-disable-opengl')
- else:
+
+ if not has_sdl and not has_vnc :
ret.append('-nographic')
if int(vmConfig['platform'].get('monitor', 0)) != 0:
rtc_timeoffset = vmConfig['platform'].get('rtc_timeoffset')
+ if not self.display :
+ self.display = ''
self.vm.storeVm(("image/dmargs", " ".join(self.dmargs)),
("image/device-model", self.device_model),
("image/display", self.display))
For example 'irq=7'.
This option may be repeated to add more than one IRQ.""")
-gopts.var('vfb', val="type={vnc,sdl},vncunused=1,vncdisplay=N,vnclisten=ADDR,display=DISPLAY,xauthority=XAUTHORITY,vncpasswd=PASSWORD,opengl=1,keymap=FILE",
+gopts.var('vfb', val="vnc=1,sdl=1,vncunused=1,vncdisplay=N,vnclisten=ADDR,display=DISPLAY,xauthority=XAUTHORITY,vncpasswd=PASSWORD,opengl=1,keymap=FILE",
fn=append_value, default=[],
use="""Make the domain a framebuffer backend.
- The backend type should be either sdl or vnc.
- For type=vnc, connect an external vncviewer. The server will listen
+ Both sdl=1 and vnc=1 can be enabled at the same time.
+ For vnc=1, connect an external vncviewer. The server will listen
on ADDR (default 127.0.0.1) on port N+5900. N defaults to the
domain id. If vncunused=1, the server will try to find an arbitrary
unused port above 5900. vncpasswd overrides the XenD configured
default password.
- For type=sdl, a viewer will be started automatically using the
+ For sdl=1, a viewer will be started automatically using the
given DISPLAY and XAUTHORITY, which default to the current user's
ones. OpenGL will be used by default unless opengl is set to 0.
keymap overrides the XendD configured default layout file.""")
for f in vals.vfb:
d = comma_sep_kv_to_dict(f)
config = ['vfb']
- if not d.has_key("type"):
- d['type'] = 'sdl'
+ #handle the legacy case
+ if d.has_key("type"):
+ d[d['type']] = '1'
+ del d['type']
for (k,v) in d.iteritems():
if not k in [ 'vnclisten', 'vncunused', 'vncdisplay', 'display',
- 'videoram', 'xauthority', 'type', 'vncpasswd',
+ 'videoram', 'xauthority', 'sdl', 'vnc', 'vncpasswd',
'opengl', 'keymap' ]:
err("configuration option %s unknown to vfbs" % k)
config.append([k,v])