On 07/29/11 - 09:34:17AM, David M. Barlieb wrote:
Hi, I'm fairly new to using libvirt. I have RHEL6 servers running
KVM
virtual environment. As I understand it, libvirt provides the tools to
the KVM environment so that I can create domains or virtual guests. So,
that being said, what does this ruby-libvirt provide me or enhance given
my current setup.
I'll understabnd if this is a little rudimentary but I really do not
know who or where else to ask these types of question. I get quite a bit
of email from the libvirt-users groups about libvirt and really have no
idea if I can or should put any of these into my current setup, or if I
should be asking RedHat this.
I certainly wouldn't mind testing and contributing to these effort to
enhance the libvirt tools and KVM hypervisor but think I need a better
understanding of exactly how libvirt and KVM interact and what the
enhancements bring to the table.
In the future it is usually best to keep one of the lists on an email; that
way, if I'm away or not responding, someone else can help you. I've added
libvirt-users to this response.
In any case, you have the right idea. Libvirt is a control plane for various
different virtualization solutions. Arguably the most popular virtualization
solution that libvirt can control is KVM, but it can also manage Xen, VMware
ESX, LXC (linux containers), UML, etc.
Libvirt provides both tools (like virsh and libvirtd) and APIs for interacting
with virtual machines. The APIs are things like virDomainShutdown(),
virDomainReboot(), etc. The ruby-libvirt package is a thin wrapper around
these APIs, so that you can use this functionality from ruby programs. That
is, you would be able to do something like:
dom.reboot
dom.shutdown
from your ruby programs. There are also bindings for other languages such
as python, php, and perl.
There is a lot more information at
http://libvirt.org, and there is more
information specifically about the ruby bindings at
http://libvirt.org/ruby
--
Chris Lalancette