Description of problem: When using vGPU as a display device, an video of type "none" needs to be included in the XML to prevent an insertion of a default video device. However, when queried, libvirt reports the "none" video device but replaces device's alias with a different value. Version-Release number of selected component (if applicable): libvirt-4.5.0-10.el7_6.9.x86_64 qemu-kvm-rhev-2.12.0-18.el7_6.5.x86_64 How reproducible: 100% Steps to Reproduce: 1. Define a VM with the following elements: <video> <model type="none"/> <alias name="ua-1035e984-8238-46e1-bf56-b546246e1a14"/> </video> <hostdev mode="subsystem" type="mdev" model="vfio-pci" display="on"> <source> <address uuid="4c38d85c-8ad8-44b8-a98f-b48448ff8e18"/> </source> </hostdev> and a graphics element. 2. Start a VM 3. Query libvirt for VM's XML definition Actual results: The following video element is returned: <video> <model type='none'/> <alias name='video0'/> </video> Expected results: Video should match the one used when defining the VM.
Out of curiosity, what's the use case for assigning a user alias to a video of type 'none'? This is really an indication that there are no devices rather than an actual device with properties.
oVirt uses it to correlate between the devices it keeps track of and the devices libvirt reports. It uses aliases to do it.
fix pushed upstream: commit 9f90a4bfb4f93b9922680a11eaff9baa9046b4f8 Author: Jonathon Jongsma <jjongsma> qemu: maintain user alias for video type 'none'
Verified with libvirt-6.0.0-2.module+el8.2.0+5513+34927b6c.x86_64. Test steps: 1.Edit a guest with 'none' type video and alias name: #virsh edit vm1 <video> <model type='none'/> <alias name='ua-1035e984-8238-46e1-bf56-b546246e1a35'/> </video> 2.Check the alias name of 'none' type video: #virsh dumpxml xm1 | grep -A5 video <video> <model type='none'/> <alias name='ua-1035e984-8238-46e1-bf56-b546246e1a35'/> </video> 3.Start guest: #virsh start vm1 4.Check the alias name of 'none' type video: #virsh dumpxml xm1 | grep -A5 video <video> <model type='none'/> <alias name='ua-1035e984-8238-46e1-bf56-b546246e1a35'/> </video>
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2017