<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I found how to do it (I have other errors now but at least it looks
like I can export).<br>
<br>
I am with archlinux and I launch libivirtd with systemctl so the
explanations are for this way to launch libvirtd<br>
<br>
There is two options to uncomment in the file /etc/libvirt/qemu.conf<br>
uncomment the following lines and be sure to put them equal to 1:<b><br>
</b>
<blockquote><b>vnc_allow_host_audio = 1 </b><br>
</blockquote>
and further down <b><br>
</b>
<blockquote><b>nographics_allow_host_audio = 1</b><br>
</blockquote>
<br>
This options will stop libvirt to set up QEMU_AUDIO_DRV=none but to
export the environment variable you need to change another file<br>
<br>
edit the file: <b>/usr/lib/systemd/system/libvirtd.service</b><br>
and under the [Service] section add the linde<br>
<b> Environment=export QEMU_AUDIO_DRV=alsa<br>
<br>
</b>If you check your log in /var/log/libvirt/qemu/yourdomain.log
you should see that the environment variable is activate. <br>
<br>
However, as said, I face others issues now:<br>
<blockquote>Home directory not accessible: Permission denied<br>
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'<br>
ALSA lib conf.c:4292:(_snd_config_evaluate) function
snd_func_card_driver returned error: No such file or directory<br>
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings<br>
ALSA lib conf.c:4292:(_snd_config_evaluate) function
snd_func_concat returned error: No such file or directory<br>
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name<br>
ALSA lib conf.c:4292:(_snd_config_evaluate) function
snd_func_refer returned error: No such file or directory<br>
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such
file or directory<br>
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM sysdefault<br>
alsa: Could not initialize ADC<br>
alsa: Failed to open `default':<br>
alsa: Reason: No such file or directory<br>
audio: Failed to create voice `ac97.pi'<br>
</blockquote>
So I don't know if it is linked to the way I export the variable or
not. I haven't check that but I thought you may want to know how to
do it.<br>
<br>
Regards.<br>
<br>
Feadurn<br>
<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 08/12/15 05:18, Okky Hendriansyah
wrote:<br>
</div>
<blockquote cite="mid:etPan.56666824.e085ab3.307@Freyr.local"
type="cite">
<style>body{font-family:Helvetica,Arial;font-size:13px}</style>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">On December 8,
2015 at 06:24:29, Feadurn (<a moz-do-not-send="true"
href="mailto:feadurn@gmail.com">feadurn@gmail.com</a>) wrote:</div>
<div>
<blockquote type="cite" class="clean_bq" style="font-family:
Helvetica, Arial; font-size: 13px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span>
<div>
<div>I am still a little bit lost on the way to activate
the "export<span class="Apple-converted-space"> </span><br>
QEMU_AUDIO_DRV=alsa" when using libvirtd. There is an
option in<span class="Apple-converted-space"> </span><br>
libvirt/qemu.conf : nographics_allow_host_audio=1. Do I
just need to<span class="Apple-converted-space"> </span><br>
uncomment that line?<span class="Apple-converted-space"> </span><br>
<br>
Thank you very much<span class="Apple-converted-space"> </span></div>
</div>
</span></blockquote>
</div>
<p>Hi Feadurn,</p>
<p>That was one of my reasons I haven’t migrate all my QEMU script
to libvirt. I had issues enabling the host audio like I use in
my plain QEMU script. If you’re using Alex’ wrapper script way
[1], probably you can regex replace it with ALSA. I never tried
myself though.</p>
<p>Reading the description,</p>
<p><span style="font-family: 'dejavu sans mono', monaco, 'lucida
console', 'courier new', monospace; font-size: x-small;
white-space: nowrap; background-color: rgb(238, 238, 255);">#
By default, if no graphical front end is configured, libvirt
will disable</span><br style="font-family: 'dejavu sans mono',
monaco, 'lucida console', 'courier new', monospace;
white-space: nowrap; background-color: rgb(238, 238, 255);">
<span style="font-family: 'dejavu sans mono', monaco, 'lucida
console', 'courier new', monospace; font-size: x-small;
white-space: nowrap; background-color: rgb(238, 238, 255);">#
QEMU audio output since directly talking to alsa/pulseaudio
may not work</span><br style="font-family: 'dejavu sans mono',
monaco, 'lucida console', 'courier new', monospace;
white-space: nowrap; background-color: rgb(238, 238, 255);">
<span style="font-family: 'dejavu sans mono', monaco, 'lucida
console', 'courier new', monospace; font-size: x-small;
white-space: nowrap; background-color: rgb(238, 238, 255);">#
with various security settings. If you know what you're doing,
enable</span><br style="font-family: 'dejavu sans mono',
monaco, 'lucida console', 'courier new', monospace;
white-space: nowrap; background-color: rgb(238, 238, 255);">
<span style="font-family: 'dejavu sans mono', monaco, 'lucida
console', 'courier new', monospace; font-size: x-small;
white-space: nowrap; background-color: rgb(238, 238, 255);">#
the setting below and libvirt will passthrough the
QEMU_AUDIO_DRV</span><br style="font-family: 'dejavu sans
mono', monaco, 'lucida console', 'courier new', monospace;
white-space: nowrap; background-color: rgb(238, 238, 255);">
<span style="font-family: 'dejavu sans mono', monaco, 'lucida
console', 'courier new', monospace; font-size: x-small;
white-space: nowrap; background-color: rgb(238, 238, 255);">#
environment variable when using nographics.</span></p>
<p>I think that option is worth to try. Thanks for pointing this.</p>
<p><br>
</p>
<p>[1] <a class="moz-txt-link-freetext" href="http://vfio.blogspot.com/2015/05/vfio-gpu-how-to-series-part-5-vga-mode.html">http://vfio.blogspot.com/2015/05/vfio-gpu-how-to-series-part-5-vga-mode.html</a></p>
<p><font face="helvetica, arial">-- </font><br>
<span data-mce-style="orphans: 2; text-align: -webkit-auto;
widows: 2; background-color: #ffffff; color: #020103;
font-family: 'Times New Roman', serif;" style="color: rgb(2,
1, 3);"><font face="Calibri"><b>Okky Hendriansyah</b></font></span></p>
</blockquote>
<br>
</body>
</html>