How do you get sound working on a Windows 7 guest OS in KVM on Ubuntu 11.10?
Solution 1:
This is a known bug with KVM, and there are several bug reports and potential work arounds.
Some people have reported using alternate sound drivers, the es1370 in particular.
If that does not work , try editing /etc/libvirt/qemu.conf
and changing vnc_allow_host_audio = 0
to
vnc_allow_host_audio = 1
Restart libvirtd or reboot.
For additional information , see these links.
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/591489/comments/11
https://fedoraproject.org/wiki/How_to_debug_Virtualization_problems#Audio_output
Solution 2:
Actually, if anything it's a bug with the /etc/apparmor.d/
profiles for libvirt.
Near as I can tell apparmor gleefully stomps Qemu/KVMs access to pulseaudio even if you try to do the right thing and set the respective profiles into complain mode with aa-complain (you need to sudo apt-get install apparmor-utils
to even have that command but as it turns out it is a waste of time).
To make a long story short - as of March 2012 on Ubuntu 11.10 you have a choice between apparmor and KVM guest sound for Windows 7.
Also, in addition to the qemu.conf change above, you should also bypass any other perms issues by explicitly setting:
user = "yourlogin"
group = "yourlogin"
as well. Reboot. You'll be able to hear things.