[libvirt-users] [libvirt] [LXC] Tyring to locate livbvirt operations for LXC relocation

Daniel P. Berrange berrange at redhat.com
Thu Feb 4 13:44:49 UTC 2010

On Wed, Feb 03, 2010 at 04:03:10PM +0200, Avi Weit wrote:
> Hello,
> I am searching for the libvirt operations for relocating LXC (system or
> application) containers. LXC relocation mechanism is done by checkpoint /
> restart. I went over libvirt API documentation and found the following
> methods:
> virDomainSave that receives a domain and path to state file. The method
> saves domain's memory contents into a disk file.
> virDomainRestore that receives a domain and path to state file. The method
> restores the domain from the state file created by save operation.
> Are these the proper methods to use for LXC relocation? I assume I can also
> use the corresponding operations via virsh (save / restore)..
> >From looking into lxcDriver object (defined under /src/lxc/xlc_driver.c in
> libvirt server source) I can see that NULLs are set in save and restore
> methods. Does that mean that there is no support for saving and restoring
> Linux containers? Is there a libvirt patch beyond the kernel patch that
> needs to be applied?

That is correct - the virDomainSave/Restore functions are intended to save
the running guest/container state to a file or load it from a file, 
respectively. These operations have not yet been implemented for libvirt's
LXC driver. I'm not sure how mature the kernel support for container
save/restore is yet, but if it has stabilized sufficiently, then we will
obviously accept patches from anyone wanting to try implementing...

|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

More information about the libvirt-users mailing list