[one-users] Libvirt ruby binding integration

Javier Fontan jfontan at fdi.ucm.es
Thu Jan 8 07:22:42 PST 2009


Hello Marco,

Your proposal is interesting and we are thinking in doing that for the  
next release. It will probably be a generic libvirt driver  
configurable to use various protocols and hypervisors. Until we do  
this you can modify the driver to do what you want. In this method (http://trac.opennebula.org/browser/one/branches/one-1.2/src/vmm_mad/kvm/one_vmm_kvm.rb#L158 
) is the code that calls virsh to perform actions:

--8<------
     def exec_kvm_command(host, command)
         Open3.popen3(
             "ssh -n #{host} virsh #{command} ;"+
             " echo ExitCode: $? 1>&2")
     end
------>8--

I think you can change it to something similar to:

--8<------
     def exec_kvm_command(host, command)
         Open3.popen3(
             "virsh -c qemu://#{host}/ #{command} ;"+
             " echo ExitCode: $? 1>&2")
     end
------>8--

I have not tried this change but it can not be very different to that.

Bye


On Jan 7, 2009, at 10:03 PM, Marco Sinhoreli wrote:

> Hi all,
>
> I'm  new in list and as opennebula user. I'm studying a system to
> orchestrate our infrastructure and I found the opennebula on Xen.org
> site. Reading the opennebula documentation, I look that is possible to
> use libvirt to interact with one system. Well, I have a doubt: Is
> possible too to use the libvirt to remote connection with the libvirtd
> located on dom0 instead of ssh? I thinks that, to scale for a lot of
> hypervisors, I could have problems with ssh because the system needs
> some levels and parsers for abstract informations about the virtuals
> environments.
>
> Best regards,
>
> -- 
> Marco Sinhoreli
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

-- 
Javier Fontan, Grid & Virtualization Technology Engineer/Researcher
DSA Research Group: http://dsa-research.org
Globus GridWay Metascheduler: http://www.GridWay.org
OpenNebula Virtual Infrastructure Engine: http://www.OpenNebula.org




More information about the Users mailing list