[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] Web Interface -> LibVirt Communication?

This might not be the 'right way' but here is how I handled communication to each Xen instance my web interface is managing. I used the ssh style connect string.. even if it was a local instance.. here is a line ripped right from my code:

server_list={"michael":['',""], "tito":['',""], "jermaine":['',""}

.. then later in my code...

for server in server_list:
server_list[server][1] = libvirt.open('xen+ssh://root@'+server_list[server][0]+'/')
   if server_list[server][1] == None:
       print 'Failed to open connection to the hypervisor'

.. in this setup you MUST have the ssh public key of the user the web server runs as in the 'root' account of each server it manages.. again, this might not be 100% kosher.. but it works.

I want to write a web tool that lets me administer my cluster from one location (including operations that things like virt-manager don't provide) - what's the proper way of achieving this? Can i communicate over TCP with libvirt on each server (is this documented?) or should I be trying to get my web app to auth and run virsh commands over SSH?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]