[Libosinfo] domain XML for tracking libosinfo ID

Cole Robinson crobinso at redhat.com
Tue Sep 4 19:44:12 UTC 2018


Right now in virt-manager we only track a VM's OS name (win10, fedora28, 
etc.) during the VM install phase. This piece of data is important 
post-install though: if the user adds a new disk to the VM later, we 
want to be able to ask libosinfo about what devices the installed OS 
supports, so we can set optimal defaults, like enabling virtio.

There isn't any standard libvirt XML field to track this kind of info 
though, so apps have to invent their own schema. nova and rhev do it 
indirectly AFAICT. gnome-boxes does it directly with XML like this:

   <metadata>
     <boxes:gnome-boxes xmlns:boxes="https://wiki.gnome.org/Apps/Boxes">
       <os-id>http://fedoraproject.org/fedora/28</os-id>
       ....
     </boxes:gnome-boxes>
   </metadata>

I want to add something similar to virt-manager but it seems a shame to 
invent our own private schema for something that most non-trivial virt 
apps will want to know about. I was thinking a schema we could document 
with libosinfo, something like

<metadata>
   <libosinfo 
xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
     <os-id>http://fedoraproject.org/fedora/28</os-id>
   </libosinfo>
</metadata>

FWIW there's an oooold bug about possible tracking something like this 
in the domain XML as a first class citizen:

https://bugzilla.redhat.com/show_bug.cgi?id=509164

But I think nowadays that's a bad fit and is likely off the table

Thoughts?

- Cole




More information about the Libosinfo mailing list