Hi Everyone,

We are working towards building on the virtualization management functionality in cockpit (http://cockpit-project.org/) and wanted to get some feedback on the best way to integrate with libvirt.

As a quick overview, cockpit aims to talk to existing remotable system APIs. Usually these API’s take the form of dbus, REST or executable commands. The majority of cockpit is implemented in javascript. There is no cockpit backend that knows how to change a hostname for example. The cockpit backend knows how to handle a dbus payload. The javascript running in the users browser knows how to use the systemd dbus API at org.freedesktop.hostname1 to manage the system hostname.

Right now some of the basics have been implemented by spawning commands on the system. This isn't ideal because it involves parsing / screen scraping output and doesn't support receiving events so we have to poll (ei run the command again) to keep the UI up to date.

As far as I know libvirt doesn't currently have a remoteable API. It does have a daemon that communicates with clients via a XDR RPC. (https://libvirt.org/internals/rpc.html) However from what I'm hearing the RPC is considered an internal implementation and shouldn't be used by external applications. Is that still the case? Is there any chance of getting talking the daemon directly using the XDR standard for a subset of methods blessed as part of the externally supported API?

An alternative is to implement a standards based remotable API, using something like dbus or REST, that can be used by external applications. I imagine that this would be at a bit of a higher level than the current RPC and contain at least some of the logic around the actions it performs rather than being a direct passthrough to the daemon.

Of course that is a pretty big undertaking and would, in my opinion, only be worth it if there is broader interest in the community and use cases beyond what cockpit would like to.

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to