Hi,

ok, after some testing:  the problem is actually that the libvirt-qemu
user is not allowed to access some files.  I've not tracked down exactly
which ones are the problem, but when I run

        kvm -hda x.img -cdrom ubuntu_precise-desktop-amd64.iso -m 1G \
        -smp 2 -vnc :1 -device AC97,id=sound0,bus=pci.0,addr=0x4

as user serge or user root, it works.  If as root si do

        sudo -u libvirt-qemu -- kvm -hda x.img -cdrom \
        ubuntu_precise-desktop-amd64.iso -m 1G -smp 2 -vnc :1 -device \
        AC97,id=sound0,bus=pci.0,addr=0x4

then I get no sound.  (I'd have expected that adding libvirt-qemu to the
audio group which owns /dev/snd/* would have sufficed, but it didn't.)

Note that I don't consider this bad.  People run >1 VMs and wouldn't
want all to have sound.  Note also that vnc does not - and never has -
forward sound, so if you are accessing the vm remotely, you'll get
video on the remote host, and audio on the kvm server.

A workaround would be to use spice, which does forward sound in addition
to improved video, and is available as of raring.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1246929

Title:
  no audio in KVM virtual machines : cannot select alsa or pa

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to