What is ruby-libvirt?
ruby-libvirt provides Ruby bindings for libvirt. With that you can use libvirt directly from your Ruby programs:
require 'libvirt'
conn = Libvirt::open("qemu:///system")
puts conn.capabilities
File::open("domain.xml") do |f|
conn.createDomainLinux(f.readlines, nil)
end
dom = conn.lookupDomainByName("mydomain")
dom.suspend
dom.resume
puts dom.xmlDesc
Developers
The sources are available with mercurial. To clone, run
hg clone http://libvirt.org/hg/ruby-libvirt/
For more information about Mercurial see the Mercurial website and these instructions.
Please use the libvir mailing list for questions, comments and patches.