[Pkg-libvirt-maintainers] Bug#649442: Bug#649442: libvirt-bin: please document how to have sound with/without VNC

Guido Günther agx at sigxcpu.org
Sat Dec 3 13:59:32 UTC 2011


Hi Luca,
Thanks for taking the time to document this.

On Mon, Nov 21, 2011 at 12:01:36AM +0100, Luca Capello wrote:
[..snip..] 
> 2) /etc/libvirt/qemu.conf:user = "libvirt-qemu"
>    => same as point 1 above
> 
> 3) /etc/libvirt/qemu.conf:user = "luca"
>    => sound with both ac97 and es1370

Looking at this wouldn't it be better to recommend using qemu:///session
instead of qemu:///system. This way setting vnc_allow_host_audio should
do the trick. Did you try that?
Cheers,
 -- Guido

P.S.: There are patches on the gtk-vnc list to enable sound via VNC
using puluseaudio which will hopefully make this very easy in the near
future.
There's also spice which also supports audio but since it's not
available for all platforms having this working (and documented!) is
still a good thing.

> 
> This means that I guess a user with login capabilities (is this the user
> who accesses the VM?) must own the QEmu process to have sound.  If this
> is the case, can it be documented in the README.Debian?
> 
> If I re-enable the VNC output, the only way to get sound (even through
> SSH), is setting 'vnc_allow_host_audio = 1' in /etc/libvirt/qemu.conf,
> together with 'user = "luca"' in the same file, otherwise you get the
> same error as point 1 above.  It seems that 'export QEMU_AUDIO_DRV=alsa'
> in /etc/default/libvirt-bin has no effect, is this the correct behavior?
> I have found #533585, but I am not sure it is still relevant.
> 
> [5] <http://bugs.debian.org/533585>
> 
> Considering the two results above, here a simple patch:
> 
> --8<---------------cut here---------------start------------->8---
> --- /usr/share/doc/libvirt-bin/README.Debian	2011-11-02 12:45:25.000000000 +0100
> +++ /home/luca/README.Debian	2011-11-20 23:57:19.551619850 +0100
> @@ -76,4 +76,21 @@
>    <http://bugs.debian.org/453627>
>    <http://bugs.debian.org/614291>
>  
> - -- Guido Günther <agx at sigxcpu.org>  Mon, 06 Feb 2011 17:28:35 +0200
> +Sound support
> +=============
> +
> +The easiest way to have sound in the guest OS is to restrict the QEmu
> +processes run by the system instance to a single user, which must have
> +login capabilities.  The variable to be changed is called "user" in
> +/etc/libvirt/qemu.conf.
> +
> +Moreover, until both upstream libvirt and gtk-vnc will support sound
> +through VNC, if you want sound with the VNC output you also have to
> +set "vnc_allow_host_audio = 1" in the same /etc/libvirt/qemu.conf
> +file.  Please see the following bug reports:
> +
> +  <http://bugs.debian.org/TO-BE-FILLED>
> +  <https://bugzilla.redhat.com/show_bug.cgi?id=508317>
> +  <https://bugzilla.redhat.com/show_bug.cgi?id=595880>
> +
> + -- Luca Capello <luca at pca.it>, Sun, 20 Nov 2011 23:57:19 +0100
> --8<---------------cut here---------------end--------------->8---
> 
> Thx, bye,
> Gismo / Luca
> 
> -- System Information:
> Debian Release: wheezy/sid
>   APT prefers unstable
>   APT policy: (990, 'unstable'), (1, 'experimental')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 3.1.0-rc7-amd64 (SMP w/2 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages libvirt-bin depends on:
> ii  adduser             3.113         
> ii  gettext-base        0.18.1.1-5    
> ii  libavahi-client3    0.6.30-5      
> ii  libavahi-common3    0.6.30-5      
> ii  libblkid1           2.19.1-5      
> ii  libc6               2.13-21       
> ii  libcap-ng0          0.6.6-1       
> ii  libdevmapper1.02.1  2:1.02.67-1   
> ii  libgcrypt11         1.5.0-3       
> ii  libgnutls26         2.12.14-3     
> ii  libnl1              1.1-7         
> ii  libnuma1            2.0.5-1       
> ii  libparted0debian1   2.3-8         
> ii  libpcap0.8          1.1.1-10      
> ii  libpciaccess0       0.12.1-2      
> ii  libreadline6        6.2-7         
> ii  libsasl2-2          2.1.25.dfsg1-2
> ii  libudev0            175-2         
> ii  libvirt0            0.9.7-2       
> ii  libxenstore3.0      4.1.1-3       
> ii  libxml2             2.7.8.dfsg-5  
> ii  libyajl1            1.0.12-2      
> ii  logrotate           3.7.8-6       
> 
> Versions of packages libvirt-bin recommends:
> ii  bridge-utils    1.5-2        
> ii  dmidecode       2.11-4       
> ii  dnsmasq-base    2.59-2       
> ii  ebtables        2.0.9.2-2    
> ii  gawk            <none>       
> ii  iproute         20110629-1   
> ii  iptables        1.4.12-1     
> ii  libxml2-utils   <none>       
> ii  netcat-openbsd  1.89-4       
> ii  parted          <none>       
> ii  qemu            0.15.1+dfsg-1
> ii  qemu-kvm        0.15.1+dfsg-1
> 
> Versions of packages libvirt-bin suggests:
> pn  policykit-1  0.102-1
> pn  radvd        <none> 
> 
> -- Configuration Files:
> /etc/libvirt/qemu.conf changed:
> user = "luca"
> vnc_allow_host_audio = 1
> 
> /etc/libvirt/qemu/networks/default.xml changed:
> <network>
>   <name>default</name>
>   <bridge name="virbr0" />
>   <forward/>
>   <ip address="192.168.122.1" netmask="255.255.255.0">
>     <dhcp>
>       <range start="192.168.122.2" end="192.168.122.254" />
>       <host mac='52:54:00:85:fa:a0' name='gismo-sid.pca.it' ip='192.168.122.4' />
>     </dhcp>
>   </ip>
> </network>
> 
> 
> -- no debconf information



> _______________________________________________
> Pkg-libvirt-maintainers mailing list
> Pkg-libvirt-maintainers at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-libvirt-maintainers






More information about the Pkg-libvirt-maintainers mailing list