Re: ruby libvirt restore is broken

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]