support keymap settings close #326

This commit is contained in:
dima
2015-03-26 08:07:27 +01:00
parent ac3582ae53
commit c881f98079
4 changed files with 8 additions and 2 deletions

View File

@@ -156,6 +156,7 @@ end
* `graphics_ip` - Sets the IP for the display protocol to bind to. Defaults to "127.0.0.0.1".
* `graphics_passwd` - Sets the password for the display protocol. Working for vnc and spice. by default working without passsword.
* `video_type` - Sets the graphics card type exposed to the guest. Defaults to "cirrus". [Possible values](http://libvirt.org/formatdomain.html#elementsVideo) are "vga", "cirrus", "vmvga", "xen", "vbox", or "qxl".
* `keymap` - Set keymap for vm. default: en-us
* `video_vram` - Used by some graphics card types to vary the amount of RAM dedicated to video. Defaults to 9216.
@@ -302,7 +303,7 @@ vagrant-libvirt supports vagrant's [standard ssh settings](https://docs.vagrantu
## Forwarded Ports
vagrant-libvirt supports Forwarded Ports via ssh port forwarding. Please note that due to a well known limitation only the TCP protocol is supported. For each `forwarded_port` directive you specify in your Vagrantfile, vagrant-libvirt will maintain an active ssh process for the lifetime of the VM.
vagrant-libvirt supports Forwarded Ports via ssh port forwarding. Please note that due to a well known limitation only the TCP protocol is supported. For each `forwarded_port` directive you specify in your Vagrantfile, vagrant-libvirt will maintain an active ssh process for the lifetime of the VM.
vagrant-libvirt supports an additional `forwarded_port` option
`gateway_ports` which defaults to `false`, but can be set to `true` if

View File

@@ -46,6 +46,7 @@ module VagrantPlugins
end
@video_type = config.video_type
@video_vram = config.video_vram
@keymap = config.keymap
# Storage
@storage_pool_name = config.storage_pool_name
@@ -111,6 +112,7 @@ module VagrantPlugins
env[:ui].info(" -- Graphics Password: #{@graphics_passwd.empty? ? 'Not defined': 'Defined'}")
env[:ui].info(" -- Video Type: #{@video_type}")
env[:ui].info(" -- Video VRAM: #{@video_vram}")
env[:ui].info(" -- Keymap: #{@keymap}")
if @disks.length > 0
env[:ui].info(" -- Disks: #{_disks_print(@disks)}")

View File

@@ -69,6 +69,7 @@ module VagrantPlugins
attr_accessor :graphics_ip
attr_accessor :video_type
attr_accessor :video_vram
attr_accessor :keymap
# Storage
attr_accessor :disks
@@ -105,6 +106,7 @@ module VagrantPlugins
@graphics_passwd = UNSET_VALUE
@video_type = UNSET_VALUE
@video_vram = UNSET_VALUE
@keymap = UNSET_VALUE
# Storage
@disks = UNSET_VALUE
@@ -237,6 +239,7 @@ module VagrantPlugins
@graphics_ip = '127.0.0.1' if @graphics_ip == UNSET_VALUE
@video_type = 'cirrus' if @video_type == UNSET_VALUE
@video_vram = 9216 if @video_vram == UNSET_VALUE
@keymap = 'en-us' if @keymap == UNSET_VALUE
# Storage
@disks = [] if @disks == UNSET_VALUE

View File

@@ -52,7 +52,7 @@
</console>
<input type='mouse' bus='ps2'/>
<%# Video device -%>
<graphics type='<%= @graphics_type %>' port='<%= @graphics_port %>' autoport='<%= @graphics_autoport %>' listen='<%= @graphics_ip %>' keymap='en-us' <%= @graphics_passwd%> />
<graphics type='<%= @graphics_type %>' port='<%= @graphics_port %>' autoport='<%= @graphics_autoport %>' listen='<%= @graphics_ip %>' keymap='<%= @keymap %>' <%= @graphics_passwd%> />
<video>
<model type='<%= @video_type %>' vram='<%= @video_vram %>' heads='1'/>
</video>