48 lines
2.1 KiB
Diff
48 lines
2.1 KiB
Diff
|
Index: xen-3.0.3-testing/tools/python/xen/xm/create.py
|
||
|
===================================================================
|
||
|
--- xen-3.0.3-testing.orig/tools/python/xen/xm/create.py
|
||
|
+++ xen-3.0.3-testing/tools/python/xen/xm/create.py
|
||
|
@@ -428,6 +428,10 @@ gopts.var('sdl', val='',
|
||
|
fn=set_value, default=None,
|
||
|
use="""Should the device model use SDL?""")
|
||
|
|
||
|
+gopts.var('keymap', val='',
|
||
|
+ fn=set_value, default=None,
|
||
|
+ use="""Keyboard mapping for SDL/VNC""")
|
||
|
+
|
||
|
gopts.var('display', val='DISPLAY',
|
||
|
fn=set_value, default=None,
|
||
|
use="X11 display to use")
|
||
|
@@ -639,7 +643,7 @@ def configure_hvm(config_image, vals):
|
||
|
'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
|
||
|
'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
|
||
|
'sdl', 'display', 'xauthority',
|
||
|
- 'acpi', 'apic', 'usb', 'usbdevice' ]
|
||
|
+ 'acpi', 'apic', 'usb', 'usbdevice', 'keymap' ]
|
||
|
for a in args:
|
||
|
if (vals.__dict__[a]):
|
||
|
config_image.append([a, vals.__dict__[a]])
|
||
|
Index: xen-3.0.3-testing/tools/python/xen/xend/image.py
|
||
|
===================================================================
|
||
|
--- xen-3.0.3-testing.orig/tools/python/xen/xend/image.py
|
||
|
+++ xen-3.0.3-testing/tools/python/xen/xend/image.py
|
||
|
@@ -352,6 +352,10 @@ class HVMImageHandler(ImageHandler):
|
||
|
if nographic:
|
||
|
ret.append('-nographic')
|
||
|
return ret
|
||
|
+ keymap = sxp.child_value(config, 'keymap')
|
||
|
+ if not keymap:
|
||
|
+ keymap = "en-us"
|
||
|
+ ret += ['-k', keymap]
|
||
|
if vnc:
|
||
|
vncdisplay = sxp.child_value(config, 'vncdisplay',
|
||
|
int(self.vm.getDomid()))
|
||
|
@@ -360,7 +364,6 @@ class HVMImageHandler(ImageHandler):
|
||
|
ret += ['-vncunused']
|
||
|
else:
|
||
|
ret += ['-vnc', '%d' % vncdisplay]
|
||
|
- ret += ['-k', 'en-us']
|
||
|
vnclisten = sxp.child_value(config, 'vnclisten')
|
||
|
if not(vnclisten):
|
||
|
vnclisten = xen.xend.XendRoot.instance().get_vnclisten_address()
|