<div dir="ltr">Thanks for you reply.<div><br></div><div style>I prefer to modify the Nova code.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/1/11 Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, Jan 11, 2013 at 10:53:25PM +0800, 孙玉新 wrote:<br>
> Davide,<br>
><br>
> If you use KVM, it's possible to enable audio.<br>
> Please refer  <a href="http://libvirt.org/formatdomain.html#elementsSound" target="_blank">http://libvirt.org/formatdomain.html#elementsSound</a><br>
><br>
> Here is some infomation about how to enable it in nova:<br>
>  <a href="http://www.gossamer-threads.com/lists/openstack/operators/21302" target="_blank">http://www.gossamer-threads.com/lists/openstack/operators/21302</a><br>
><br>
> Haven't test it, I think the steps should be:<br>
</div>> 1. cp /usr/lib/python2.7/dist-packages/*nova*/virt/libvirt.xml.template<br>
> /etc/*nova/*<br>
> 2. add next line to *nova*.conf<br>
> --*libvirt_xml_template*=/etc/*nova*/libvirt.xml.template<br>
> 3. Edit /etc/*nova*/libvirt.xml.template, add the following lines:<br>
<div class="im">><br>
>  <devices><br>
>     <sound model='ich6'><br>
>       <codec type='micro'/><br>
>     <sound/><br>
>   </devices><br>
><br>
> Hope this is helpful.<br>
<br>
<br>
</div>That won't work on Folsom since the libvirt.xml.template no longer<br>
exists.  See my reply elsewhere in this thread for how todo it in<br>
the Nova code.  If you want to just hack it in without modifying<br>
Nova though, it is possible to use a libvirt hook script:<br>
<br>
  <a href="http://libvirt.org/hooks.html" target="_blank">http://libvirt.org/hooks.html</a><br>
<br>
this is invoked by libvirt immediately prior to launching a guest,<br>
allowing you to modify the XML that is used.<br>
<div class="HOEnZb"><div class="h5"><br>
Daniel<br>
--<br>
|: <a href="http://berrange.com" target="_blank">http://berrange.com</a>      -o-    <a href="http://www.flickr.com/photos/dberrange/" target="_blank">http://www.flickr.com/photos/dberrange/</a> :|<br>
|: <a href="http://libvirt.org" target="_blank">http://libvirt.org</a>              -o-             <a href="http://virt-manager.org" target="_blank">http://virt-manager.org</a> :|<br>
|: <a href="http://autobuild.org" target="_blank">http://autobuild.org</a>       -o-         <a href="http://search.cpan.org/~danberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
|: <a href="http://entangle-photo.org" target="_blank">http://entangle-photo.org</a>       -o-       <a href="http://live.gnome.org/gtk-vnc" target="_blank">http://live.gnome.org/gtk-vnc</a> :|<br>
</div></div></blockquote></div><br></div>