diff --git a/README.md b/README.md
index 090cdaa..960514b 100644
--- a/README.md
+++ b/README.md
@@ -332,6 +332,8 @@ end
"cirrus", "vmvga", "xen", "vbox", or "qxl".
* `video_vram` - Used by some graphics card types to vary the amount of RAM
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
`qemu-system-x86_64 -machine help` to get a list of supported machines.
* `machine_arch` - Sets machine architecture. This helps libvirt to determine
diff --git a/lib/vagrant-libvirt/action/create_domain.rb b/lib/vagrant-libvirt/action/create_domain.rb
index a4866a8..750b3ce 100644
--- a/lib/vagrant-libvirt/action/create_domain.rb
+++ b/lib/vagrant-libvirt/action/create_domain.rb
@@ -61,6 +61,7 @@ module VagrantPlugins
"passwd='#{config.graphics_passwd}'"
end
@video_type = config.video_type
+ @sound_type = config.sound_type
@video_vram = config.video_vram
@keymap = config.keymap
@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(" -- Video Type: #{@video_type}")
env[:ui].info(" -- Video VRAM: #{@video_vram}")
+ env[:ui].info(" -- Sound Type: #{@sound_type}")
env[:ui].info(" -- Keymap: #{@keymap}")
env[:ui].info(" -- TPM Path: #{@tpm_path}")
diff --git a/lib/vagrant-libvirt/action/start_domain.rb b/lib/vagrant-libvirt/action/start_domain.rb
index 9a7a3d9..26ee676 100644
--- a/lib/vagrant-libvirt/action/start_domain.rb
+++ b/lib/vagrant-libvirt/action/start_domain.rb
@@ -221,6 +221,12 @@ module VagrantPlugins
end
end
+ # Sound device
+ if config.sound_type
+ sound = REXML::XPath.first(xml_descr,'/domain/devices/sound/model')
+ end
+
+
# dtb
if config.dtb
dtb = REXML::XPath.first(xml_descr, '/domain/os/dtb')
diff --git a/lib/vagrant-libvirt/config.rb b/lib/vagrant-libvirt/config.rb
index 055850b..5f72b85 100644
--- a/lib/vagrant-libvirt/config.rb
+++ b/lib/vagrant-libvirt/config.rb
@@ -184,6 +184,7 @@ module VagrantPlugins
@graphics_passwd = UNSET_VALUE
@video_type = UNSET_VALUE
@video_vram = UNSET_VALUE
+ @sound_type = UNSET_VALUE
@keymap = UNSET_VALUE
@kvm_hidden = UNSET_VALUE
@@ -585,6 +586,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
+ @sound_type = nil if @sound_type == UNSET_VALUE
@keymap = 'en-us' if @keymap == UNSET_VALUE
@kvm_hidden = false if @kvm_hidden == UNSET_VALUE
@tpm_model = 'tpm-tis' if @tpm_model == UNSET_VALUE
diff --git a/lib/vagrant-libvirt/templates/domain.xml.erb b/lib/vagrant-libvirt/templates/domain.xml.erb
index 5da9083..e4a270a 100644
--- a/lib/vagrant-libvirt/templates/domain.xml.erb
+++ b/lib/vagrant-libvirt/templates/domain.xml.erb
@@ -132,6 +132,12 @@
<% end %>
+ <% if !@sound_type.nil? %>
+ <%# Sound device-%>
+
+
+ <%# End Sound%>
+ <% end %>
<% if @graphics_type != 'none' %>
<%# Video device -%>
/>