* Sorry, I fail email 101, third attempt to make this go to the list *<br><br>Radek,<br><br>Not to advertise blatantly, but how attached are you to PHP? I'm<br>currently working on a Django (python) WebApp that (although its *very*<br>
pre-release) could probably be adapted to what you're doing. If you are<br>interested in assisting in development you'd be welcome to, or if you<br>just wanted to fork off the code into your own thing you could do that<br>
too. My system consists of a python daemon used for actual libvirt<br>interaction and a separate django web interface that interacts with the<br>daemon via AMF over https.<br><br>If you want to stick with what you have now, you could try doing<br>
something similar with a python daemon (you really need something like<br>that for the sake of efficiency anyway, unless you can come up with a<br>better way of maintaining libvirt connections from a stateless webapp)<br>
that your PHP frontend connects to. Or you could just steal my daemon<br>code, although at the moment all it really does is monitoring and (as of<br>yesterday) live migrations.<br><br>What I have so far: <a href="http://trac.osuosl.org/trac/virtadmin">http://trac.osuosl.org/trac/virtadmin</a><br>
<br>On Wed, Mar 25, 2009 at 2:01 PM, Radek Hladik <<a href="mailto:radek@eadresa.cz">radek@eadresa.cz</a>> wrote:<br>> Hi,<br>>        I am developing wimple web application in PHP to monitor and control<br>> VMs using libvirt. I hope it could become simple library for doing basic<br>
> things with VMs. And I would like to ask for your opinion about different<br>> possibilities of calling libvirt.<br>><br>> Option 1) I am calling virsh via exec command now (one virsh for every<br>> libvirt command). This can be used for local libvirt but it is very<br>
> inefficient. The overhead for remote libvirt would be unbearable. I could<br>> run one virsh per page and use it "interactively" so the overhead gets<br>> lower.<br>> Option 2) The other option is to create Zend extension which should be able<br>
> to call libvirt directly from C. However I've never done anything like that<br>> so I do not know, whether it is reasonable or not.<br>> Option 3) I could also create some "wrapper daemon" in C or other language<br>
> with libvirt binding. But I think that this is an ugly way :-)<br>> Option 4) I could "talk" directly to the libvirt socket. But I am not sure<br>> how the communication goes there and whether it is stable or changes with<br>
> every version. And I consider the socket to be internal thing of libvirt...<br>><br>> Is there any other option I missed? And which one would you suggest?<br>><br>> Radek<br>><br>> --<br>> Libvir-list mailing list<br>
> <a href="mailto:Libvir-list@redhat.com">Libvir-list@redhat.com</a><br>> <a href="https://www.redhat.com/mailman/listinfo/libvir-list">https://www.redhat.com/mailman/listinfo/libvir-list</a><br>><br><br>