Add vnc_keymap flag and enable setting keymap for vnc console.

This commit is contained in:
Masanori Itoh 2011-05-17 01:00:16 +09:00
parent 8d8076ff87
commit d44299be90
3 changed files with 4 additions and 1 deletions

View File

@ -116,7 +116,7 @@
</serial>
#if $getVar('vncserver_host', False)
<graphics type='vnc' port='-1' autoport='yes' keymap='en-us' listen='${vncserver_host}'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='${vnc_keymap}' listen='${vncserver_host}'/>
#end if
</devices>
</domain>

View File

@ -1022,6 +1022,7 @@ class LibvirtConnection(driver.ComputeDriver):
if FLAGS.vnc_enabled:
if FLAGS.libvirt_type != 'lxc':
xml_info['vncserver_host'] = FLAGS.vncserver_host
xml_info['vnc_keymap'] = FLAGS.vnc_keymap
if not rescue:
if instance['kernel_id']:
xml_info['kernel'] = xml_info['basepath'] + "/kernel"

View File

@ -32,3 +32,5 @@ flags.DEFINE_string('vncserver_host', '0.0.0.0',
'the host interface on which vnc server should listen')
flags.DEFINE_bool('vnc_enabled', True,
'enable vnc related features')
flags.DEFINE_string('vnc_keymap', 'en-us',
'keymap for vnc')