Bug 508317 - RFE: Allow sounds devices to be used with svirt - tunnel sound over VNC
Summary: RFE: Allow sounds devices to be used with svirt - tunnel sound over VNC
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 14
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 507226 513771 520613 524103 527639 534062 544936 569579 592671 (view as bug list)
Depends On: 477955 595880
Blocks: F13VirtTarget
TreeView+ depends on / blocked
 
Reported: 2009-06-26 14:42 UTC by Alexey Torkhov
Modified: 2013-01-08 10:38 UTC (History)
40 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-24 21:49:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Alexey Torkhov 2009-06-26 14:42:29 UTC
Description of problem:
Guest has sound device added to it with virt-manager.

It appears in config file:

host# virsh dumpxml Rawhide | grep sound
    <sound model='es1370'/>


But qemu command doesn't have -soundhw param:

host# ps -ef |grep qemu
root     24066     1 15 18:31 ?        00:00:14 /usr/bin/qemu-kvm -S -M pc -m 512 -smp 1 -name Rawhide -uuid b058d6bb-7a00-39c5-dc26-6fd321bc494f -monitor pty -pidfile /var/run/libvirt/qemu//Rawhide.pid -boot c -drive file=/home/alex/qemu/boot.iso,if=ide,media=cdrom,index=2 -drive file=/home/alex/qemu/rawhide.img,if=virtio,index=0,boot=on -net nic,macaddr=54:52:00:41:60:d0,vlan=0,model=virtio -net tap,fd=18,vlan=0 -serial pty -parallel none -usb -vnc 127.0.0.1:1


Neither sound device appear in guest:

guest# lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB Controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Ethernet controller: Qumranet, Inc. Virtio network device
00:04.0 Mass storage controller: Qumranet, Inc. Virtio block device
00:05.0 RAM memory: Qumranet, Inc. Virtio memory balloon


Version-Release number of selected component (if applicable):
qemu-0.10.5-3.fc11.x86_64
libvirt-0.6.2-12.fc11.x86_64
virt-manager-0.7.0-5.fc11.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Create VM with sound device in it.
2. Start.

Actual results:
No sound device in guest.

Expected results:
Sound device in guest appears.

Additional info:
Guest is Fedora Rawhide.

Comment 1 Michael Gruys 2009-07-02 09:14:00 UTC
Confirmed here too.
Also the case in other guests like Ubuntu, Windows.
I tried to understand the python script which generate the command line for qemu-kvm, but I never saw code which produce the -soundhw switch... strange.

Comment 2 Daniel Berrangé 2009-07-02 09:36:03 UTC
If you have SELinux enabled, then it is expected that there is no sound device. We have disabled sound because it caused security problems, and in any case did you correctly integrate with VNC. ie sound would play on the machine running QEMU, not the machine running the VNC client. We are aiming to fix this properly in F12

http://fedoraproject.org/wiki/Features/VirtVNCResourceTunnel

If you really do need sound working, then edit /etc/libvirt/qemu.conf and set security_driver="none" and restart libvirtd. This turns off the per-VM isolation.

Comment 3 Michael Gruys 2009-07-02 09:47:29 UTC
was indeed the case.
--thx f. sharing

Comment 4 Mark McLoughlin 2009-07-03 15:00:10 UTC
Making this depend on the qemu side

Comment 5 Mark McLoughlin 2009-07-31 09:38:35 UTC
The VirtVNCResourceTunnel feature has been punted to Fedora 13. Moving to F13VirtTarget

Comment 6 Mark McLoughlin 2009-08-07 12:40:48 UTC
*** Bug 507226 has been marked as a duplicate of this bug. ***

Comment 7 Mark McLoughlin 2009-08-11 16:50:02 UTC
*** Bug 513771 has been marked as a duplicate of this bug. ***

Comment 8 Mark McLoughlin 2009-09-04 13:09:07 UTC
*** Bug 520613 has been marked as a duplicate of this bug. ***

Comment 9 Mark McLoughlin 2009-09-21 13:38:42 UTC
*** Bug 524103 has been marked as a duplicate of this bug. ***

Comment 10 Mark McLoughlin 2009-10-09 10:55:57 UTC
*** Bug 527639 has been marked as a duplicate of this bug. ***

Comment 11 Serge Pavlovsky 2009-10-09 15:28:16 UTC
(In reply to comment #2)
> If you really do need sound working, then edit /etc/libvirt/qemu.conf and set
> security_driver="none" and restart libvirtd. This turns off the per-VM
> isolation.  

unfortunately, its not enough
now i get in log:
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu-kvm -S -M pc -m 512 -smp 1 -name f12alpha -uuid d6e88f00-ee73-fe6c-77d4-16ab4133cf81 -monitor pty -pidfile /var/run/libvirt/qemu//f12alpha.pid -boot c -drive file=,if=ide,media=cdrom,index=2 -drive file=/var/lib/libvirt/images/f12alpha.img,if=virtio,index=0,boot=on -net nic,macaddr=54:52:00:53:ca:3d,vlan=0,model=virtio -net tap,fd=19,vlan=0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:1 -soundhw es1370 
char device redirected to /dev/pts/6
char device redirected to /dev/pts/7
pulseaudio: pa_simple_new for playback failed
pulseaudio: Reason: Connection refused
pulseaudio: pa_simple_new for playback failed
pulseaudio: Reason: Connection refused
audio: Failed to create voice `es1370.dac2'
pulseaudio: pa_simple_new for capture failed
pulseaudio: Reason: Connection refused
pulseaudio: pa_simple_new for capture failed
pulseaudio: Reason: Connection refused
audio: Failed to create voice `es1370.adc'
...

is there any workaround for this ?

Comment 12 Russell Harrison 2009-10-16 17:00:59 UTC
(In reply to comment #11)
> pulseaudio: pa_simple_new for capture failed
> pulseaudio: Reason: Connection refused
> audio: Failed to create voice `es1370.adc'
> ...
> 
> is there any workaround for this ?  

Serge,
I modified my PulseAudio Preferences to "Enabled network access to local sound devices" without authentication as is described in this workaround for MPD.

http://mpd.wikia.com/wiki/PulseAudio#An_alternate_solution_for_fixing_access_rights

I don't know if this is a good idea from a security / stability standpoint but it did work for me.  I'll need to differ to others on the advisability of using this work around.

Comment 13 Bug Zapper 2009-11-16 10:29:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 14 Cole Robinson 2009-11-16 18:56:46 UTC
*** Bug 534062 has been marked as a duplicate of this bug. ***

Comment 15 Cole Robinson 2009-11-16 18:57:42 UTC
*** Bug 536692 has been marked as a duplicate of this bug. ***

Comment 16 Andrew McNabb 2009-11-19 18:54:21 UTC
My bug has been marked as a duplicate of this bug, but I'm not using SELinux.  Additionally, I'm using SDL instead of VNC.  I really don't think that all of these problems should be lumped into one report, but if that's what you want, that's what I'll do.

I'm getting the same error message as comment #11:

LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin XAUTHORITY=/aml/home/amcnabb/.Xautho
rity DISPLAY=:0.0 /usr/bin/qemu-kvm -S -M pc-0.11 -m 768 -smp 1 -name testvm -uu
id 356ef111-d264-ba73-be0c-bdbb1616577d -monitor unix:/var/lib/libvirt/qemu/test
vm.monitor,server,nowait -boot c -drive file=/var/lib/libvirt/images/testvm.img,
if=virtio,index=0,boot=on,format=raw -net nic,macaddr=22:22:22:22:22:22,vlan=0,n
ame=nic.0 -net tap,fd=18,vlan=0,name=tap.0 -serial pty -parallel none -usb -vga 
cirrus -soundhw es1370 
char device redirected to /dev/pts/1
pulseaudio: pa_simple_new for playback failed
pulseaudio: Reason: Connection refused
pulseaudio: pa_simple_new for playback failed
pulseaudio: Reason: Connection refused
audio: Failed to create voice `es1370.dac2'
pulseaudio: pa_simple_new for capture failed
pulseaudio: Reason: Connection refused
pulseaudio: pa_simple_new for capture failed
pulseaudio: Reason: Connection refused
audio: Failed to create voice `es1370.adc'

Comment 17 James 2009-11-20 23:16:33 UTC
sound seemed to work if I ran qemu-kvm from the command line, but didn't work if I ran it using the virtual machine manager, if that information helps.

Comment 18 Cole Robinson 2010-01-06 15:07:50 UTC
*** Bug 544936 has been marked as a duplicate of this bug. ***

Comment 19 Arthur Pemberton 2010-05-18 15:59:52 UTC
*** Bug 592671 has been marked as a duplicate of this bug. ***

Comment 20 Cole Robinson 2010-05-27 21:58:50 UTC
*** Bug 569579 has been marked as a duplicate of this bug. ***

Comment 21 Cole Robinson 2010-07-12 17:12:55 UTC
I've posted workaround steps to get audio working on the fedora wiki, as well as info on how we will eventually solve this out of the box:

https://fedoraproject.org/wiki/How_to_debug_Virtualization_problems#Audio_output

Comment 22 Jón Fairbairn 2010-07-12 17:39:03 UTC
I've used nc to get round this problem without switching off selinux.
There's a description of how at 

http://www.chaos.org.uk/~jf/Virtual-machine-notes/Paranoid-web-browsing.xhtml#NoSound

(a page mainly intended to remind myself how to do it)

Comment 23 Gilboa Davara 2010-08-17 13:54:58 UTC
I wonder if this shouldn't be filed against qemu/vnc instead of libvirt...

Comment 24 Andre Robatino 2010-09-29 12:44:48 UTC
Can this bug have its Version updated to 14 (assuming it's still broken there), and the Blocks: changed to F14VirtTarget?

Comment 25 Bug Zapper 2010-11-04 10:56:48 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 26 Gilboa Davara 2010-11-04 11:19:00 UTC
Still open in F13.

Comment 27 Julian Sikorski 2010-11-04 23:09:11 UTC
There is no sound in F-14 either.

Comment 28 Stefan Becker 2010-11-05 03:54:48 UTC
Exactly, it is still not fixed for F14.. Only after the upgrade I learned that the new SPICE feature is not available for libvirt/virt-manager use cases, because those haven't been updated to add SPICE support to the libvirt XML format or the UI :-(

Comment 29 Fedora Admin XMLRPC Client 2011-09-22 17:58:45 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 30 Fedora Admin XMLRPC Client 2011-09-22 18:02:31 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 31 Fedora Admin XMLRPC Client 2011-11-30 19:58:36 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 32 Fedora Admin XMLRPC Client 2011-11-30 19:59:36 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 33 Fedora Admin XMLRPC Client 2011-11-30 20:04:47 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 34 Fedora Admin XMLRPC Client 2011-11-30 20:05:08 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 35 Eric Blake 2011-12-07 15:43:22 UTC
Sound should now be supported through SPICE in F16.  Since F14 is near end-of-life, I'm wondering if we should just close this, and recommend upgrading and switching to SPICE.

Comment 36 Grant Williamson 2011-12-07 15:48:32 UTC
I would agree to that.

Comment 37 David Ayers 2011-12-07 16:15:35 UTC
I'm not sure... doesn't SPICE require user tools in the guest OS?

If OTOH SPICE can be used with an arbitrary OS and pickup sound from it's sound card emulation, then I'd agree.  Otherwise I think there is still a use case for forwarding sound from some sound card emulation that's transparent for the guest.

Comment 38 Daniel Berrangé 2011-12-07 16:42:17 UTC
SPICE does not require any agent support for audio.

In addition there are recent patches for GTK-VNC that finally do the audio work, so we'll likely get this supported in F17 for VNC.

Comment 39 Andrew McNabb 2011-12-07 17:23:43 UTC
I'm fine with using SPICE. Oddly, it doesn't seem to be the default, even in Fedora 16.

Comment 40 Cole Robinson 2012-01-24 21:49:24 UTC
As mentioned f14 is EOL, and sound works out of the box with virt-manager in F16, so closing this CURRENTRELEASE.


Note You need to log in before you can comment on or make changes to this bug.