[libvirt] CLI management tool

Daniel P. Berrange berrange at redhat.com
Thu May 11 09:20:10 UTC 2017


On Thu, May 11, 2017 at 09:17:39AM +0200, Michal Privoznik wrote:
> Dear list,
> 
> you might have seen a discussion about virsh, and adding some new
> features to it [1]. While the feature was rejected, it got me thinking.
> What options do we offer for sysadmins that:
> 
> a) want to stay in command line
> b) want higher level mgmt of their domains
> c) yet want to manage a single host
> 
> Basically, virsh is just too low level for some operations (and using it
> in non-interactive mode from a script can mean hundreds of connections).
> Then we have virt-manager, which suits b) and c), but it's not a CLI
> tool. Therefore I was thinking whether we should start a new project on
> the top of libvirt that would fit all three points.
> 
> Personally, I've never been a sysadmin, so perhaps I am not the best one
> to write the tool. But I'm open for suggestions.
> 
> What do you think?

A long long long time ago, I did some work on creating an extensible
replacement for virsh.

The idea was to provide a minimal, pluggable framework for a CLI
tool using the GObject framework. Commands would emit structured
objects, and we'd have plugins to translate it to plain text,
JSON, XML, etc.  The commands themselves would also all be plugins,
likely written in a non-C language like Python/JavaScript/blah.

A key idea is that this tool would *not* simply target libvirt
APIs, it would be a more general virt shell that would include
other tasks. For example, 'virt-install' would just be a command
plugin, as would various libguestfs commands, and virt-top, etc
etc

By having commands written in a high level language, it was
inteded that sysadmins would be able to provide custom stuff
to automate jobs that they particularly cared about

I never got it developed far enough though to be worth publishing
it. Not even sure what happened to the code I did right...

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list