[Libvir] Web Interface Question

Henri Cook henri at theplayboymansion.net
Mon Apr 7 15:01:12 UTC 2008

Thanks, I think the way forward for me is as follows:

- I've had to discard oVirt and Enomalism, thanks for letting me know
they exist on here/IRC. oVirt seems to be a complete solution that would
require me to reconfigure many of my existing vms and Enomalism is just
inappropriate for VPS hosts and more company-with-lots-of-machines
centric it appears.

- I'm really after something that can slot into my existing setup of
'/home/virt/domains/Machine/vm.cfg' (a name I just chose arbitrarily)
and use the cfg files to provide info about the machine to a user over
the web, then the perl bindings to start/stop/restart.

- So, the perl bindings and a socket with permissions for the web user
or possibly a 'vmadmins' group

- Eventually i hope to package it up into a standalone web server (a-la
webmin) style solution and release it, but i've got to finish my degree
first so that will be months, my customers are my immediate concern and
I have a basic version of the above which can do
shutdowns/reboots/startups in action at the moment.

- It was regrettably necessary to have to have some actions contingent
on things like libvirt error code: 42 i.e. If you try to retrieve a
domain that doesn't exist (and is not defined). I expect these to break
when the ubuntu package maintainers upgrade to 0.4.1 - but i'll have to
deal with that when the time comes

I'll keep hanging out in #virt for as long as i can remember to stay
connected :p



Richard W.M. Jones wrote:
> On Sat, Apr 05, 2008 at 09:35:33PM +0100, Henri Cook wrote:
>> I'm designing a web interface for libvirt so that my customers can
>> manage their DomUs - unless you know of a good one that already exists???
>> I'm thinking that the best way to run this is have the web server
>> connected to libvirtd - but I can't find any documentation about the API
>> it presents - can you help?
> I sort of gathered from IRC that you are using Perl & Dan's Perl
> bindings.  This is the right approach.
> In order to be able to contact libvirtd without needing to run
> anything as root you (may) need to change the permissions on the
> libvirtd socket (normally /var/run/libvirt/libvirt-sock).  If your
> libvirt was configured to use PolicyKit you may also need to edit the
> configuration file /etc/PolicyKit/PolicyKit.conf to allow your web
> server user access to the privilege 'org.libvirt.unix.manage'.
> I would test this out using 'virsh -c ... list' as the web daemon user
> first of all.
> Rich.

More information about the libvir-list mailing list