[Libvir] Web Interface Question

Richard W.M. Jones rjones at redhat.com
Mon Apr 7 13:38:17 UTC 2008

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.


Richard Jones, Emerging Technologies, Red Hat  http://et.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.

More information about the libvir-list mailing list