-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using CRIU with nested LXC containers #2426
Comments
For LXC, the auto mode for external mounts will not work, you need to enumerate them manually. But you still need to call CRIU from a parent container to dump a target pid namespace properly. Otherwise, it will look like two nested pid namespaces. I don't recommend to use CRIU directly to dump/restore LXC containers. It should be easier to use lxc tools for that. |
Just to clarify about auto-detection of external mounts. When I am running non-nested LXC container, it uses external mp at least for rootfs (besides,
So, this container can be easily dumped by the following command (
So AFAIU, the option I agree that direct calling to Thank you! |
It works well before you need to restore it. I don't remember details it was a long time when I used it last time.
When LXC starts a container, it creates a mount namespace for it and mounts rootfs and a few other mounts that depends on a container configuration (fusefs proc, external volumes, etc). For CRIU, all these mounts will be external. Only LXC knows how to proper mount them on restore. I don't know where this code in the LXC, but you can look at runsc, it should be similar: |
If I recall correctly, this option may have "undefined" behaviour when migrating a container to another host (opencontainers/runc#1968 (comment)). |
A friendly reminder that this issue had no activity for 30 days. |
Hi!
I am considering using CRIU for checkpoint/restore of nested LXC containers. Do I understand it right that in this case CRIU should be called inside parent container?
For example, as far as I understood CRIU is using mnt namespace of the CRIU process (
/proc/self/ns/mnt
) to resolve external mountpoints for target process, so this means that CRIU wont be able to work from the host level in case target process is running in nested container. Is that correct?Thanks,
Alex
The text was updated successfully, but these errors were encountered: