Description of problem:
When multiple <graphics> devices are present, only one of them can be selected for audio output. AFAIK this is a QEMU limitation, related to QEMU_AUDIO_DRV environment variable used for selecting the audio output.
Apparently libvirt selects the last <graphics> device in the domain XML for audio output. This mechanism is not documented and is not very clear and robust. It would be better if libvirt could provide better means for selecting the proper device for audio output.
One possibility would be to automatically select the device that works. For instance, while audio output works with SPICE, it's unclear whether and how it can work with VNC and libvirt probably doesn't properly support VNC audio output. So if SPICE and VNC graphics devices are present, libvirt should select the SPICE one for audio output.
Another (or complementary) option would be to provide an attribute to <graphics> element that would allow selecting the device for audio output explicitly, instead of relying on the order of the elements in the domain XML.
Version-Release number of selected component (if applicable):
*** Bug 1371243 has been marked as a duplicate of this bug. ***
Upstream patches posted:
RHV implemented workaround for this issue and because there was no other request for this feature I'm closing this BZ.