Bug 1375433

Summary: Selection of audio output among <graphics> devices
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Milan Zamazal <mzamazal>
Component: libvirtAssignee: Pavel Hrdina <phrdina>
Status: CLOSED DEFERRED QA Contact: yafu <yafu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: dyuan, jsuchane, rbalakri, xuzhang
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.0Flags: areis: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-23 15:47:24 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1672981    

Description Milan Zamazal 2016-09-13 06:19:22 UTC
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):

libvirt-2.0.0

Comment 1 Pavel Hrdina 2017-03-24 08:31:54 UTC
*** Bug 1371243 has been marked as a duplicate of this bug. ***

Comment 3 Pavel Hrdina 2017-11-16 14:32:36 UTC
Upstream patches posted:

https://www.redhat.com/archives/libvir-list/2017-November/msg00492.html

Comment 8 Pavel Hrdina 2020-11-23 15:47:24 UTC
RHV implemented workaround for this issue and because there was no other request for this feature I'm closing this BZ.