[libvirt] Proposal: A place to store metadata about guests

I think we need a place to store general metadata about guests. Here are some uses: - Store data about available installer ISOs, guests which are archived and not known to libvirt. - Replace the guest inspection thread in virt-manager. virt-manager would just collect the data from the store. The inspection data would be generated by another process. - Expand on <description/> field in the libvirt XML, and satisfy various requests we've had for a place to store metadata and extend libvirt XML. - Store data on behalf of applications, esp. virt-manager. I'm not envisaging a database or daemon for this. Just a simple directory per host containing flat files. Perhaps we can add some tools or a library to make creation/querying of these files easy. It would be nice if the database was made available over the network (Avahi?). You could also use this database to answer questions like: - "Do I have a Debian wheezy 32 bit guest anywhere on my network?" - "Does any guest have libpng <= <vulnerable-version> installed?" - "Bring up a Fedora 14 instance" (the tools would have to locate a suitable install ISO and put together the correct virt-install command line) There is some crossover with VDSM and even RHEV-M here. Thoughts? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org

Hi, On Mon, Aug 22, 2011 at 12:48 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
I think we need a place to store general metadata about guests.
Here are some uses:
- Store data about available installer ISOs, guests which are archived and not known to libvirt.
We will need this for our desktop integration plans but the understanding is that we depend on Tracker[1] for this. Tracker will need to be hacked to be able to differentiate between installer and non-installer ISOs though but thats pretty much doable. I just wonder if that solution also works for you? -- Regards, Zeeshan Ali (Khattak) FSF member#5124 [1] http://projects.gnome.org/tracker/

On Mon, Aug 22, 2011 at 01:04:07PM +0300, Zeeshan Ali (Khattak) wrote:
Hi,
On Mon, Aug 22, 2011 at 12:48 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
I think we need a place to store general metadata about guests.
Here are some uses:
- Store data about available installer ISOs, guests which are archived and not known to libvirt.
We will need this for our desktop integration plans but the understanding is that we depend on Tracker[1] for this. Tracker will need to be hacked to be able to differentiate between installer and non-installer ISOs though but thats pretty much doable. I just wonder if that solution also works for you? [...] [1] http://projects.gnome.org/tracker/
Where was it planned? Tracker seems to be a desktop search engine. Can we make the data available to Tracker without requiring it? (Seems one has to write a "tracker miner" to do this) Do we know that Tracker will stay around long-term (unlike Beagle etc)? Is it available without requiring GNOME and other heavyweight deps (eg. servers, KDE)? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/

On Mon, Aug 22, 2011 at 1:32 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
On Mon, Aug 22, 2011 at 01:04:07PM +0300, Zeeshan Ali (Khattak) wrote:
Hi,
On Mon, Aug 22, 2011 at 12:48 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
I think we need a place to store general metadata about guests.
Here are some uses:
- Store data about available installer ISOs, guests which are archived and not known to libvirt.
We will need this for our desktop integration plans but the understanding is that we depend on Tracker[1] for this. Tracker will need to be hacked to be able to differentiate between installer and non-installer ISOs though but thats pretty much doable. I just wonder if that solution also works for you? [...] [1] http://projects.gnome.org/tracker/
Where was it planned?
In a meeting we (a few members of the SPICE team) had at the desktop summit together with designers. Its not really a plan plan but more like a general agreement/understanding for now and we still await the designers to finalize it all.
Tracker seems to be a desktop search engine.
Can we make the data available to Tracker without requiring it? (Seems one has to write a "tracker miner" to do this)
The metadata you mean? Yes, thats going to be in osinfo. I intend to write a minor that extracts just volume, system and publisher IDs and a boolean indicating if the ISO is bootable but all that doesn't need to use libosinfo (though there will be some minor duplication of code).
Do we know that Tracker will stay around long-term (unlike Beagle etc)?
Beagle never really stayed around but Tracker hasn't just been around for quite some time now but is also a blessed dependency in GNOME and some of the core hackers of it are trust-worthy GNOME hackers.
Is it available without requiring GNOME and other heavyweight deps (eg. servers, KDE)?
Yes! You still need dbus session though. -- Regards, Zeeshan Ali (Khattak) FSF member#5124

On Mon, Aug 22, 2011 at 02:22:00PM +0300, Zeeshan Ali (Khattak) wrote:
On Mon, Aug 22, 2011 at 1:32 PM, Richard W.M. Jones <rjones@redhat.com> wrote> >> > - Store data about available installer ISOs, guests which are
archived and not known to libvirt.
[...]
The metadata you mean? Yes, thats going to be in osinfo. I intend to write a minor that extracts just volume, system and publisher IDs and a boolean indicating if the ISO is bootable but all that doesn't need to use libosinfo (though there will be some minor duplication of code).
I think we're talking at crossed purposes about the feature I mentioned above. I mean that if I have a directory full of ISO files, then it should be possible to make available some metadata about those files. I'm considering an ISO to be a special sort of guest that hasn't been installed yet. libvirt (nor libosinfo for that matter) doesn't currently know anything about directories full of ISOs. Nor about guest templates. In any case, ISOs aren't really the main point of my proposal. I'm more interested in making the inspection data that we collect about (actual, non-ISO) guests available to other consumers, specifically to virt-manager. Currently libvirt offers a <description/> field to do this, but it's extremely limited in what it can contain, it's liable to be wiped out by accident, and it doesn't support multiple users. It's a fairly frequent request to be able to extend the libvirt XML to store arbitrary guest data, and one which AFAIK has been rejected upstream each time. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw

On Mon, Aug 22, 2011 at 2:51 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
On Mon, Aug 22, 2011 at 02:22:00PM +0300, Zeeshan Ali (Khattak) wrote:
On Mon, Aug 22, 2011 at 1:32 PM, Richard W.M. Jones <rjones@redhat.com> wrote> >> > - Store data about available installer ISOs, guests which are
archived and not known to libvirt.
[...]
The metadata you mean? Yes, thats going to be in osinfo. I intend to write a minor that extracts just volume, system and publisher IDs and a boolean indicating if the ISO is bootable but all that doesn't need to use libosinfo (though there will be some minor duplication of code).
I think we're talking at crossed purposes about the feature I mentioned above.
I mean that if I have a directory full of ISO files, then it should be possible to make available some metadata about those files. I'm considering an ISO to be a special sort of guest that hasn't been installed yet. libvirt (nor libosinfo for that matter) doesn't currently know anything about directories full of ISOs. Nor about guest templates.
Yeah I think while you were talking of keeping a common metadata table/db while I was talking about tracking of all ISOs that user have so any app/lib can just make a simple query to get the list. -- Regards, Zeeshan Ali (Khattak) FSF member#5124

On Mon, Aug 22, 2011 at 10:48:09AM +0100, Richard W.M. Jones wrote:
There is some crossover with VDSM and even RHEV-M here.
I meant to add that there is also crossover with: - CIM - OVF - <name of any Configuration Management Database / DMTF standard here> Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v

On Mon, Aug 22, 2011 at 10:48:09AM +0100, Richard W.M. Jones wrote: <snip>
- "Does any guest have libpng <= <vulnerable-version> installed?"
So the guest would also be reporting up to its host what packages it has installed? Or is there some other mechanism in place that would all this information to come out of the guest? -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/

On Mon, Aug 22, 2011 at 09:03:45AM -0400, Darryl L. Pierce wrote:
On Mon, Aug 22, 2011 at 10:48:09AM +0100, Richard W.M. Jones wrote: <snip>
- "Does any guest have libpng <= <vulnerable-version> installed?"
So the guest would also be reporting up to its host what packages it has installed? Or is there some other mechanism in place that would all this information to come out of the guest?
virt-inspector provides this info. In particular I don't just want this database to work for running guests. It's possibly most useful for shut down or archived guests. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
participants (3)
-
Darryl L. Pierce
-
Richard W.M. Jones
-
Zeeshan Ali (Khattak)