[CRIU] CRIU on RHEL 6
Pavel Emelyanov
xemul at virtuozzo.com
Thu Aug 17 16:18:14 MSK 2017
On 08/16/2017 08:08 PM, Harry Jiang wrote:
> Hi everyone, I'm interested in using CRIU on redhat 6 but CRIU requires kernel version 3.11 or newer
> and redhat 6 uses 2.6. I know that CRIU is available already in redhat 7 but unfortunately that is
> not an option. We don't need more advanced features like networking, just for simple c/c++ program
> for simulations/computation.
>
> I have two questions:
> 1. Is there an easy way to run CRIU on redhat 6?
Easy -- no, sorry :( 3.11 is not a random choice, here (https://criu.org/Upstream_kernel_commits)
is the full set of patches that we've made for the kernel to make criu work. You can stop reading
this list at 3.12 kernel. Not all of them are required for the truly minimal case though, but
this minimal case is really small :)
> 2. Is it possible and if so how hard would it be to modify the core of CRIU to run on an older kenel
> (ie 2.6?). For example I know ptrace_seize wasn't added until 3.4.
You can run 'criu check', it will validate the needed featured (well, a little bit more actually)
from the kernel. The bare minimum is really a bit smaller, than this, but still includes stuff
that's not in 2.6. The most crucial kernel functionality for criu is
1. ptrace seize. We can live without it just by using ptrace attach, but stopped tasks _will_ have
problems with c/r. If that's OK for you, this is fixable.
2. /proc/pid/map_files. We can live w/o this thing as well, but there will be problems with c/r-ing
containers, tasks that run on updated libraries and more. Both can be work-around-ed in criu code
up to some extent.
3. sys.ns_last_pid sysctl. This is really must have. I can come up with some hackish ways to overcome
its absence in criu code, but even if someone implements it nobody will be happy accepting it into
the mainstream repo %)
4. sys_kcmp() syscall. Same here, we cannot live w/o it in ... most of the cases. We can discuss
various corner cases and hacks how to live without it, but again -- it's not for the upstream repo.
5. prctl and /proc/stat extensions. They are connected and yet again -- you can try to live without
both in some specific cases, but ...
> Any help or pointers would be appreciated, thanks.
So, the exact way to go depends on what you need criu for :) We can discuss it, if your usage meets
the above 5 requirements and you're ready to mess with the low-level code and patches, let's go!
-- Pavel
More information about the CRIU
mailing list