diff options
| author | Masanori Itoh <itoumsn@nttdata.co.jp> | 2011-05-31 18:11:01 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-05-31 18:11:01 +0000 |
| commit | 2ae01f6f426e774107c60b87ad40efa1e4413bf6 (patch) | |
| tree | 838e1c8e33d8c85bdcc58943fd3eeafacf1e717b | |
| parent | f903911a078f4356b91cb7d0965456612b26698c (diff) | |
| parent | 4960dac9dd099a7b8402bef1807f15cb8c43dd30 (diff) | |
Add vnc_keymap flag, enable setting keymap for vnc console and fix bug #782611.
| -rw-r--r-- | nova/virt/libvirt.xml.template | 2 | ||||
| -rw-r--r-- | nova/virt/libvirt/connection.py | 1 | ||||
| -rw-r--r-- | nova/vnc/__init__.py | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/nova/virt/libvirt.xml.template b/nova/virt/libvirt.xml.template index de2497a76..20986d4d5 100644 --- a/nova/virt/libvirt.xml.template +++ b/nova/virt/libvirt.xml.template @@ -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> diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index 94a703954..b156fb0bc 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -962,6 +962,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" diff --git a/nova/vnc/__init__.py b/nova/vnc/__init__.py index b5b00e44e..859bfd65f 100644 --- a/nova/vnc/__init__.py +++ b/nova/vnc/__init__.py @@ -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') |
