[libvirt] [RFC PATCH 0/4] LXC - Implement save/restore domain state

Radostin Stoyanov posted 4 patches 6 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180411112915.5890-1-rstoyanov1@gmail.com
Test syntax-check passed
configure.ac             |   1 +
m4/virt-criu.m4          |  27 +++++
po/POTFILES.in           |   1 +
src/lxc/Makefile.inc.am  |   4 +
src/lxc/lxc_container.c  | 162 ++++++++++++++++++++++++++++--
src/lxc/lxc_container.h  |   3 +-
src/lxc/lxc_controller.c | 104 ++++++++++++++++++-
src/lxc/lxc_criu.c       | 253 +++++++++++++++++++++++++++++++++++++++++++++++
src/lxc/lxc_criu.h       |  36 +++++++
src/lxc/lxc_driver.c     | 238 +++++++++++++++++++++++++++++++++++++++++++-
src/lxc/lxc_process.c    |  23 ++++-
src/lxc/lxc_process.h    |   1 +
12 files changed, 836 insertions(+), 17 deletions(-)
create mode 100644 m4/virt-criu.m4
create mode 100644 src/lxc/lxc_criu.c
create mode 100644 src/lxc/lxc_criu.h
[libvirt] [RFC PATCH 0/4] LXC - Implement save/restore domain state
Posted by Radostin Stoyanov 6 years ago
This patch set contains rebased version of Katerina's work from GSoC 2016 [1].
It allows integrates CRIU [2] with the libvirt-lxc to enable save/resore of containers.

[1] https://wiki.libvirt.org/page/Google_Summer_of_Code_2016/lxc_migration
[2] https://criu.org

Radostin Stoyanov (4):
  configure: Include support for CRIU
  lxc: Add save/restore helper functions
  lxc: Add restore mode for libvirt-lxc
  lxc: Add save/restore support

 configure.ac             |   1 +
 m4/virt-criu.m4          |  27 +++++
 po/POTFILES.in           |   1 +
 src/lxc/Makefile.inc.am  |   4 +
 src/lxc/lxc_container.c  | 162 ++++++++++++++++++++++++++++--
 src/lxc/lxc_container.h  |   3 +-
 src/lxc/lxc_controller.c | 104 ++++++++++++++++++-
 src/lxc/lxc_criu.c       | 253 +++++++++++++++++++++++++++++++++++++++++++++++
 src/lxc/lxc_criu.h       |  36 +++++++
 src/lxc/lxc_driver.c     | 238 +++++++++++++++++++++++++++++++++++++++++++-
 src/lxc/lxc_process.c    |  23 ++++-
 src/lxc/lxc_process.h    |   1 +
 12 files changed, 836 insertions(+), 17 deletions(-)
 create mode 100644 m4/virt-criu.m4
 create mode 100644 src/lxc/lxc_criu.c
 create mode 100644 src/lxc/lxc_criu.h

-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [RFC PATCH 0/4] LXC - Implement save/restore domain state
Posted by Daniel P. Berrangé 6 years ago
On Wed, Apr 11, 2018 at 12:29:11PM +0100, Radostin Stoyanov wrote:
> This patch set contains rebased version of Katerina's work from GSoC 2016 [1].
> It allows integrates CRIU [2] with the libvirt-lxc to enable save/resore of containers.

I vaguely recall that when Katerina first did that work, we hit some
limitations of CRIU at the time, that blocked us merging. Does anyone
recall what that was, and if & when it was addressed in CRIU ?

> 
> [1] https://wiki.libvirt.org/page/Google_Summer_of_Code_2016/lxc_migration
> [2] https://criu.org
> 
> Radostin Stoyanov (4):
>   configure: Include support for CRIU
>   lxc: Add save/restore helper functions
>   lxc: Add restore mode for libvirt-lxc
>   lxc: Add save/restore support
> 
>  configure.ac             |   1 +
>  m4/virt-criu.m4          |  27 +++++
>  po/POTFILES.in           |   1 +
>  src/lxc/Makefile.inc.am  |   4 +
>  src/lxc/lxc_container.c  | 162 ++++++++++++++++++++++++++++--
>  src/lxc/lxc_container.h  |   3 +-
>  src/lxc/lxc_controller.c | 104 ++++++++++++++++++-
>  src/lxc/lxc_criu.c       | 253 +++++++++++++++++++++++++++++++++++++++++++++++
>  src/lxc/lxc_criu.h       |  36 +++++++
>  src/lxc/lxc_driver.c     | 238 +++++++++++++++++++++++++++++++++++++++++++-
>  src/lxc/lxc_process.c    |  23 ++++-
>  src/lxc/lxc_process.h    |   1 +
>  12 files changed, 836 insertions(+), 17 deletions(-)
>  create mode 100644 m4/virt-criu.m4
>  create mode 100644 src/lxc/lxc_criu.c
>  create mode 100644 src/lxc/lxc_criu.h
> 
> -- 
> 2.14.3
> 
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [RFC PATCH 0/4] LXC - Implement save/restore domain state
Posted by Radostin Stoyanov 6 years ago
On 11/04/18 12:34, Daniel P. Berrangé wrote:
> On Wed, Apr 11, 2018 at 12:29:11PM +0100, Radostin Stoyanov wrote:
>> This patch set contains rebased version of Katerina's work from GSoC 2016 [1].
>> It allows integrates CRIU [2] with the libvirt-lxc to enable save/resore of containers.
> I vaguely recall that when Katerina first did that work, we hit some
> limitations of CRIU at the time, that blocked us merging. Does anyone
> recall what that was, and if & when it was addressed in CRIU ?
The previous patch series (from 2016) is
https://www.redhat.com/archives/libvir-list/2016-July/msg00855.html
One current limitation of CRIU is that it fails to restore a containers
with enabled user namespace (See
https://github.com/checkpoint-restore/criu/issues/466)

Radostin

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [RFC PATCH 0/4] LXC - Implement save/restore domain state
Posted by Cedric Bosdonnat 6 years ago
On Wed, 2018-04-11 at 12:34 +0100, Daniel P. Berrangé wrote:
> On Wed, Apr 11, 2018 at 12:29:11PM +0100, Radostin Stoyanov wrote:
> > This patch set contains rebased version of Katerina's work from GSoC 2016 [1].
> > It allows integrates CRIU [2] with the libvirt-lxc to enable save/resore of containers.
> 
> I vaguely recall that when Katerina first did that work, we hit some
> limitations of CRIU at the time, that blocked us merging. Does anyone
> recall what that was, and if & when it was addressed in CRIU ?

What was missing in CRIU was the possibility to write the data into a stream
rather than in files. From what I recall this work has been merged upstream
in the mean time.

--
Cedric

> > 
> > [1] https://wiki.libvirt.org/page/Google_Summer_of_Code_2016/lxc_migration
> > [2] https://criu.org
> > 
> > Radostin Stoyanov (4):
> >   configure: Include support for CRIU
> >   lxc: Add save/restore helper functions
> >   lxc: Add restore mode for libvirt-lxc
> >   lxc: Add save/restore support
> > 
> >  configure.ac             |   1 +
> >  m4/virt-criu.m4          |  27 +++++
> >  po/POTFILES.in           |   1 +
> >  src/lxc/Makefile.inc.am  |   4 +
> >  src/lxc/lxc_container.c  | 162 ++++++++++++++++++++++++++++--
> >  src/lxc/lxc_container.h  |   3 +-
> >  src/lxc/lxc_controller.c | 104 ++++++++++++++++++-
> >  src/lxc/lxc_criu.c       | 253 +++++++++++++++++++++++++++++++++++++++++++++++
> >  src/lxc/lxc_criu.h       |  36 +++++++
> >  src/lxc/lxc_driver.c     | 238 +++++++++++++++++++++++++++++++++++++++++++-
> >  src/lxc/lxc_process.c    |  23 ++++-
> >  src/lxc/lxc_process.h    |   1 +
> >  12 files changed, 836 insertions(+), 17 deletions(-)
> >  create mode 100644 m4/virt-criu.m4
> >  create mode 100644 src/lxc/lxc_criu.c
> >  create mode 100644 src/lxc/lxc_criu.h
> > 
> > -- 
> > 2.14.3
> > 
> > --
> > libvir-list mailing list
> > libvir-list@redhat.com
> > https://www.redhat.com/mailman/listinfo/libvir-list
> 
> Regards,
> Daniel

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