Guest User

Untitled

a guest
May 26th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. require 'libvirt'
  2.  
  3. conn = Libvirt::open("qemu:///system")
  4. puts conn.capabilities
  5.  
  6. File::open("domain.xml") do |f|
  7. conn.createDomainLinux(f.readlines, nil)
  8. end
  9.  
  10. dom = conn.lookupDomainByName("mydomain")
  11. dom.suspend
  12. dom.resume
  13. puts dom.xmlDesc
Add Comment
Please, Sign In to add comment