On 05/28/11 - 05:46:21PM, Ronen Narkis wrote:
Hey dear libvirt users /dev
Im trying to use ruby's bindings to libvirt and Im unable to use the domain
restore
ruby-1.8.7-p334 :014 > dom.restore("/tmp/puppet-client.state")
Libvirt::Error: Call to virDomainRestore failed
from (irb):14:in `restore'
from (irb):14
Unfortunately, dom.restore doesn't work. I suspect it is an object lifetime
issue, since once you have done a dom.save, the underlying VM is killed and
I think libvirt will drop the object.
What you really want to use is:
Libvirt::Domain::Restore(conn, "/tmp/puppet-client.state")
Which should do the trick.
--
Chris Lalancette