mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
patch to include virtual sound card support
This commit is contained in:
committed by
Dmitry Galkin
parent
cb25d70d7a
commit
2f091b1cdc
@@ -332,6 +332,8 @@ end
|
|||||||
"cirrus", "vmvga", "xen", "vbox", or "qxl".
|
"cirrus", "vmvga", "xen", "vbox", or "qxl".
|
||||||
* `video_vram` - Used by some graphics card types to vary the amount of RAM
|
* `video_vram` - Used by some graphics card types to vary the amount of RAM
|
||||||
dedicated to video. Defaults to 9216.
|
dedicated to video. Defaults to 9216.
|
||||||
|
* `sound_type` - [Set the virtual sound card](https://libvirt.org/formatdomain.html#elementsSound)
|
||||||
|
Defaults to "ich6".
|
||||||
* `machine_type` - Sets machine type. Equivalent to qemu `-machine`. Use
|
* `machine_type` - Sets machine type. Equivalent to qemu `-machine`. Use
|
||||||
`qemu-system-x86_64 -machine help` to get a list of supported machines.
|
`qemu-system-x86_64 -machine help` to get a list of supported machines.
|
||||||
* `machine_arch` - Sets machine architecture. This helps libvirt to determine
|
* `machine_arch` - Sets machine architecture. This helps libvirt to determine
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ module VagrantPlugins
|
|||||||
"passwd='#{config.graphics_passwd}'"
|
"passwd='#{config.graphics_passwd}'"
|
||||||
end
|
end
|
||||||
@video_type = config.video_type
|
@video_type = config.video_type
|
||||||
|
@sound_type = config.sound_type
|
||||||
@video_vram = config.video_vram
|
@video_vram = config.video_vram
|
||||||
@keymap = config.keymap
|
@keymap = config.keymap
|
||||||
@kvm_hidden = config.kvm_hidden
|
@kvm_hidden = config.kvm_hidden
|
||||||
@@ -192,6 +193,7 @@ module VagrantPlugins
|
|||||||
env[:ui].info(" -- Graphics Password: #{@graphics_passwd.empty? ? 'Not defined' : 'Defined'}")
|
env[:ui].info(" -- Graphics Password: #{@graphics_passwd.empty? ? 'Not defined' : 'Defined'}")
|
||||||
env[:ui].info(" -- Video Type: #{@video_type}")
|
env[:ui].info(" -- Video Type: #{@video_type}")
|
||||||
env[:ui].info(" -- Video VRAM: #{@video_vram}")
|
env[:ui].info(" -- Video VRAM: #{@video_vram}")
|
||||||
|
env[:ui].info(" -- Sound Type: #{@sound_type}")
|
||||||
env[:ui].info(" -- Keymap: #{@keymap}")
|
env[:ui].info(" -- Keymap: #{@keymap}")
|
||||||
env[:ui].info(" -- TPM Path: #{@tpm_path}")
|
env[:ui].info(" -- TPM Path: #{@tpm_path}")
|
||||||
|
|
||||||
|
|||||||
@@ -221,6 +221,12 @@ module VagrantPlugins
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Sound device
|
||||||
|
if config.sound_type
|
||||||
|
sound = REXML::XPath.first(xml_descr,'/domain/devices/sound/model')
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
# dtb
|
# dtb
|
||||||
if config.dtb
|
if config.dtb
|
||||||
dtb = REXML::XPath.first(xml_descr, '/domain/os/dtb')
|
dtb = REXML::XPath.first(xml_descr, '/domain/os/dtb')
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ module VagrantPlugins
|
|||||||
@graphics_passwd = UNSET_VALUE
|
@graphics_passwd = UNSET_VALUE
|
||||||
@video_type = UNSET_VALUE
|
@video_type = UNSET_VALUE
|
||||||
@video_vram = UNSET_VALUE
|
@video_vram = UNSET_VALUE
|
||||||
|
@sound_type = UNSET_VALUE
|
||||||
@keymap = UNSET_VALUE
|
@keymap = UNSET_VALUE
|
||||||
@kvm_hidden = UNSET_VALUE
|
@kvm_hidden = UNSET_VALUE
|
||||||
|
|
||||||
@@ -585,6 +586,7 @@ module VagrantPlugins
|
|||||||
@graphics_ip = '127.0.0.1' if @graphics_ip == UNSET_VALUE
|
@graphics_ip = '127.0.0.1' if @graphics_ip == UNSET_VALUE
|
||||||
@video_type = 'cirrus' if @video_type == UNSET_VALUE
|
@video_type = 'cirrus' if @video_type == UNSET_VALUE
|
||||||
@video_vram = 9216 if @video_vram == UNSET_VALUE
|
@video_vram = 9216 if @video_vram == UNSET_VALUE
|
||||||
|
@sound_type = 'ich6' if @sound_type == UNSET_VALUE
|
||||||
@keymap = 'en-us' if @keymap == UNSET_VALUE
|
@keymap = 'en-us' if @keymap == UNSET_VALUE
|
||||||
@kvm_hidden = false if @kvm_hidden == UNSET_VALUE
|
@kvm_hidden = false if @kvm_hidden == UNSET_VALUE
|
||||||
@tpm_model = 'tpm-tis' if @tpm_model == UNSET_VALUE
|
@tpm_model = 'tpm-tis' if @tpm_model == UNSET_VALUE
|
||||||
|
|||||||
@@ -131,7 +131,12 @@
|
|||||||
<% @inputs.each do |input| %>
|
<% @inputs.each do |input| %>
|
||||||
<input type='<%= input[:type] %>' bus='<%= input[:bus] %>'/>
|
<input type='<%= input[:type] %>' bus='<%= input[:bus] %>'/>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if @sound_type != 'none' %>
|
||||||
|
<%# Sound device-%>
|
||||||
|
<sound model='<%= @sound_type %>'>
|
||||||
|
</sound>
|
||||||
|
<%# End Sound%>
|
||||||
|
<% end %>
|
||||||
<% if @graphics_type != 'none' %>
|
<% if @graphics_type != 'none' %>
|
||||||
<%# Video device -%>
|
<%# Video device -%>
|
||||||
<graphics type='<%= @graphics_type %>' port='<%= @graphics_port %>' autoport='<%= @graphics_autoport %>' listen='<%= @graphics_ip %>' keymap='<%= @keymap %>' <%= @graphics_passwd%> />
|
<graphics type='<%= @graphics_type %>' port='<%= @graphics_port %>' autoport='<%= @graphics_autoport %>' listen='<%= @graphics_ip %>' keymap='<%= @keymap %>' <%= @graphics_passwd%> />
|
||||||
|
|||||||
Reference in New Issue
Block a user