mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
support keymap settings close #326
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
|
||||
@@ -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)}")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user