[virt-manager PATCH] Fix checking for graphics spice for Xen

Charles Arnold carnold at suse.com
Wed Feb 9 18:32:02 UTC 2022


On 2/9/22 10:32 AM, Cole Robinson wrote:
> On 2/9/22 9:50 AM, Charles Arnold wrote:
>> Advertising graphics support doesn't necessarily mean spice support.
>> self.devices.graphics.supported seems to not be spice specific
>> but rather more generic in indicating whether graphics are supported.
>> For Xen, spice is not supported so fallback to the old logic.
>>
>> Signed-off-by: Charles Arnold <carnold at suse.com>
>>
>> diff --git a/virtinst/domcapabilities.py b/virtinst/domcapabilities.py
>> index 67bceaa3..ad6e3363 100644
>> --- a/virtinst/domcapabilities.py
>> +++ b/virtinst/domcapabilities.py
>> @@ -382,7 +382,7 @@ class DomainCapabilities(XMLBuilder):
>>           return len(models) > 0 and bool("emulator" in backends)
>>
>>       def supports_graphics_spice(self):
>> -        if not self.devices.graphics.supported:
>> +        if not self.devices.graphics.supported or self.conn.is_xen():
>>               # domcaps is too old, or the driver doesn't advertise graphics
>>               # support. Use our pre-existing logic
>>               if not self.conn.is_qemu() and not self.conn.is_test():
>>
>>
> Hmm but does that mean domcapabilities for xen is reporting that spice
> is available? If that's the case, seems like a domcapabilities bug in
> libvirt xen driver. Or am I missing something?
>
> Thanks,
> Cole
>

Booted into Xen, virsh domcapabilities reports,

<domainCapabilities>
   <path>/usr/bin/qemu-system-x86_64</path>
   <domain>xen</domain>
   <machine>xenpv</machine>
   <arch>x86_64</arch>
   <vcpu max='512'/>
   <iothreads supported='no'/>
   <os supported='yes'>
     <loader supported='no'/>
   </os>
   <cpu>
     <mode name='host-passthrough' supported='no'/>
     <mode name='maximum' supported='no'/>
     <mode name='host-model' supported='no'/>
     <mode name='custom' supported='no'/>
   </cpu>
   <devices>
     <disk supported='yes'>
       <enum name='diskDevice'>
         <value>disk</value>
         <value>cdrom</value>
       </enum>
       <enum name='bus'>
         <value>ide</value>
         <value>scsi</value>
         <value>xen</value>
       </enum>
       <enum name='model'/>
     </disk>
     <graphics supported='yes'>
       <enum name='type'>
         <value>sdl</value>
         <value>vnc</value>
         <value>spice</value>
       </enum>
     </graphics>
     <video supported='yes'>
       <enum name='modelType'>
         <value>vga</value>
         <value>cirrus</value>
         <value>xen</value>
       </enum>
     </video>
     <hostdev supported='yes'>
       <enum name='mode'>
         <value>subsystem</value>
       </enum>
       <enum name='startupPolicy'>
         <value>default</value>
         <value>mandatory</value>
         <value>requisite</value>
         <value>optional</value>
       </enum>
       <enum name='subsysType'>
         <value>usb</value>
         <value>pci</value>
       </enum>
       <enum name='capsType'/>
       <enum name='pciBackend'>
         <value>xen</value>
       </enum>
     </hostdev>
   </devices>
   <features>
     <gic supported='no'/>
     <vmcoreinfo supported='no'/>
     <genid supported='no'/>
     <sev supported='no'/>
   </features>
</domainCapabilities>





More information about the virt-tools-list mailing list