Skip to content

Instantly share code, notes, and snippets.

@proffalken
Created May 25, 2010 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save proffalken/413094 to your computer and use it in GitHub Desktop.
Save proffalken/413094 to your computer and use it in GitHub Desktop.
require 'libvirt'
conn = Libvirt::open("qemu:///system")
puts conn.capabilities
xmlcontent = File.read("domain.xml")
conn.create_domain_linux(xmlcontent, nil)
dom = conn.lookup_domain_by_name("mydomain")
dom.suspend
dom.resume
puts dom.xml_desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment