[libvirt] [PATCH v2 1/9] qemu: Set QEMU_AUDIO_DRV=none with -nographic
Daniel P. Berrange
berrange at redhat.com
Wed Aug 21 13:20:36 UTC 2013
On Mon, Aug 19, 2013 at 12:24:39PM -0400, Cole Robinson wrote:
> On my machine, a guest fails to boot if it has a sound card, but not
> graphical device/display is configured, because pulseaudio fails to
> initialize since it can't access $HOME.
>
> A workaround is removing the audio device, however on ARM boards there
> isn't any option to do that, so -nographic always fails.
>
> Set QEMU_AUDIO_DRV=none if no <graphics> are configured. Unfortunately
> this has massive test suite fallout.
> @@ -7559,9 +7559,13 @@ qemuBuildCommandLine(virConnectPtr conn,
> * if you ask for nographic. So we have to make sure we override
> * these defaults ourselves...
> */
> - if (!def->graphics)
> + if (!def->graphics) {
> virCommandAddArg(cmd, "-nographic");
>
> + /* trying to talk directly to pulseaudio is generally problematic */
> + virCommandAddEnvString(cmd, "QEMU_AUDIO_DRV=none");
> + }
We do something similar with VNC by default, but we have a global qemu.conf
override for that.
/* Unless user requested it, set the audio backend to none, to
* prevent it opening the host OS audio devices, since that causes
* security issues and might not work when using VNC.
*/
if (cfg->vncAllowHostAudio)
virCommandAddEnvPass(cmd, "QEMU_AUDIO_DRV");
else
virCommandAddEnvString(cmd, "QEMU_AUDIO_DRV=none");
I think we probably want todo the same here, since it is in theory
possible to make pulseaudio work for the QEMU driver.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list