[fedora-virt] Sound not working on vm clients

Cole Robinson crobinso at redhat.com
Tue Jun 19 13:21:55 UTC 2012


On 06/18/2012 11:05 PM, David Highley wrote:
> "Cole Robinson wrote:"
>>
>> On 06/17/2012 06:23 PM, David Highley wrote:
>>> "Cole Robinson wrote:"
>>>>
>>>> On 06/16/2012 10:06 PM, David Highley wrote:
>>>>> We have two vm clients and neither have sound.
>>>>> hosting platform is Fedora 16 x86_64
>>>>> first client is Fedora 17 i686
>>>>> second client is Ubuntu 12.04 i686
>>>>>
>>>>> libvirt-0.9.6-5.fc16.x86_64
>>>>> qemu-kvm-0.15.1-5.fc16.x86_64
>>>>>
>>>>> Tried both VNC and Spice modes. Did set, vnc_allow_host_audio = 1, in
>>>>> /etc/libvirt/qemu.conf file. Just in case we put selinux in Permissive
>>>>> mode. Still no sound.
>>>>>
>>>>
>>>> On F16, using SPICE is the only good way to get sound, so do your testing with
>>>> that. Please provide the following info
>>>>
>>>> - How are you connecting to the guest console?
>>>> - sudo virsh dumpxml $vmname
>>>> - sudo cat /var/log/libvirt/qemu/$vmname.log
>>>
>>> I did switch to using SPICE and both the host and quest show the same
>>> audio configuration. Attached the two requested files.
>>>
>>
>> Your qemu log file only shows guest config when the VM was configured with
>> VNC. Please try running with spice, and see if that works. If not, attach the
>> log file after running with spice enabled.
> 
> Got it working after a pointer about QEMU_AUDIO_DRV=none. Lots of
> postings without solutions. Finally found we could define
> QEMU_AUDIO_DRV=pa in /etc/sysconfig/libvirtd. Sound is now working.
> 

Hmm, did you have QEMU_AUDIO_DRV=none set in /etc/sysconfig/libvirtd before
that change? If so, does just commenting out everything in that file make
things work? If using Spice, libvirt should be passing QEMU_AUDIO_DRV=spice
automatically, which sends the audio stream through the spice connection, so
sound is played by the client (virt-manager, spicec, virt-viewer). This is the
ideal solution, since it handles permissions correctly, and allows hearing
local sound from VMs on remote machines.

> There are choices for video with no information about picking one over
> any other. We left it default to cirrus. It might make a difference on
> the 3D graphics issue, but we have not found any information about
> making choices here. Thanks for the help.
> 

The default in Fedora should be QXL + Spice, but it was busted for a while in
virt-manager.

- Cole


More information about the virt mailing list