[Spice-devel] How to get sound working from guest VM?

Christophe Fergeau cfergeau at redhat.com
Wed Jan 6 03:44:36 PST 2016


Hey,

On Thu, Dec 24, 2015 at 10:51:20AM +0200, Andrey Aleksandrovich wrote:
> Hi, Can you help me in my problem?
> The host system is Gentoo Linux, KDE (I have tried both VLC/Gstreamer
> sound engines), Qemu, virt-manager. I have installed Windows XP as
> guest OS. Everything is OK, except sound (there is no it).
> The Qemu is starting from Virt-manager. The XML config is
> https://bpaste.net/show/ce2db0251dc7
> The log is https://bpaste.net/show/162e031910ca (second line is the
> command for Qemu start)
> Windows XP detects AC97 sound card and even doesn't require special
> drivers, while QXL, virtio... was installed from RedHat.
> I have also installed spice-guest-tools-0.100, but have no luck :(

Looking good so far, for audio support you should not need any guest
drivers.

> When I asked at forums people told me that I need 'spicec' to connect
> to VM (the only way for sound working), but starting from
> 'spice-gtk-0.30' there is no longer 'spicec' and I have to downgrade
> it :( 

You can use remote-viewer (part of virt-viewer instead).


> The others told me that I need to set QEMU_AUDIO_DRV=alsa to
> hear the sound (yes it's working, although with periodical crackling
> distortion, and windows working is terribly slow; also, as far as I
> can understand, this way brings permission threats).

Setting QEMU_AUDIO_DRV should not be needed, might even cause more
issues, so don't do that :)


> So, I would still like to set up the sound through the 'spice' and virt-manager.

In general, this should just work out of the box. spice-gtk has a
pulseaudio backend, and a gstreamer backend. I think the default is
pulseaudio. So I'd check what is being used on your system, and check
remote-viewer console output (you can get more with G_MESSAGES_DEBUG=all
remote-viewer --spice-debug).

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20160106/09908317/attachment.sig>


More information about the Spice-devel mailing list