<div dir="ltr">I recommend taking a look at this code, which implements checkpointing in Docker containers:<div><br></div><div><a href="https://github.com/opencontainers/runc/blob/master/libcontainer/container_linux.go#L545">https://github.com/opencontainers/runc/blob/master/libcontainer/container_linux.go#L545</a><br></div><div><br></div><div>It uses the API so there's some mental translation to be done if you really want to use the command line. I think what you're missing is the "--root" flag, which should be the rootfs of your container.</div><div><br></div><div>Alternatively, you should consider just using native docker support, which is available on my github repository:</div><div><br></div><div><a href="https://github.com/boucher/docker/releases/tag/v1.10_2-16-16-experimental">https://github.com/boucher/docker/releases/tag/v1.10_2-16-16-experimental</a><br></div><div>(or, the docker-checkpoint-restore branch if you need docker 1.12, but you'll need to build it yourself)</div><div><br></div><div>-Ross</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 24, 2016 at 1:10 AM Konstantin Kolias <<a href="mailto:kkolias@gmu.edu">kkolias@gmu.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">Hello all,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I get an error with something really basic: trying to checkpoint restore an apache container (docker).</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">My settings:<u></u><u></u></p>
<p class="MsoNormal">Ubuntu 16.04 (on amazon vm)<u></u><u></u></p>
<p class="MsoNormal">Docker 1.11.2<u></u><u></u></p>
<p class="MsoNormal">Criu 2.0 <u></u><u></u></p>
<p class="MsoNormal">Created a container debian + apache.<u></u><u></u></p>
<p class="MsoNormal">Made it run with: sudo docker run -d -p 8080:80 apache /usr/sbin/apache2ctl –X</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I did this in an attempt to create a single process apache.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Then attempted to take a checkpoint:<u></u><u></u></p>
<p class="MsoNormal">sudo criu dump -o dump.log -v4 -t 329 \<u></u><u></u></p>
<p class="MsoNormal">-D /tmp/img/0d97f03fb4880e0d65f97974e7fbef43735e4283acf47c1b7cc705e10e7e6759 \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /etc/resolv.conf:/etc/resolv.conf \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /etc/hosts:/etc/hosts \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /etc/hostname:/etc/hostname \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /.dockerinit:/.dockerinit \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /sys/fs/cgroup/memory:/sys/fs/cgroup/memory \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /sys/fs/cgroup/cpu,cpuacct:/sys/fs/cgroup/cpu,cpuacct \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /sys/fs/cgroup/freezer:/sys/fs/cgroup/freezer \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /sys/fs/cgroup/cpuset:/sys/fs/cgroup/cpuset \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /sys/fs/cgroup/perf_event:/sys/fs/cgroup/perf_event \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /sys/fs/cgroup/devices:/sys/fs/cgroup/devices \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /sys/fs/cgroup/hugetlb:/sys/fs/cgroup/hugetlb \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /sys/fs/cgroup/net_cls,net_prio:/sys/fs/cgroup/net_cls,net_prio \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /sys/fs/cgroup/blkio:/sys/fs/cgroup/blkio \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /sys/fs/cgroup/pids:/sys/fs/cgroup/pids \<u></u><u></u></p>
<p class="MsoNormal">--ext-mount-map /sys/fs/cgroup/systemd:/sys/fs/cgroup/systemd \<u></u><u></u></p>
<p class="MsoNormal">--manage-cgroups \<u></u><u></u></p>
<p class="MsoNormal">--evasive-devices<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I get an error:<u></u><u></u></p>
<p class="MsoNormal">Error (mount.c:740): mnt: 292:./etc/resolv.conf doesn't have a proper root mount<u></u><u></u></p>
<p class="MsoNormal">(00.008457) Unlock network<u></u><u></u></p>
<p class="MsoNormal">(00.008459) Running network-unlock scripts<u></u><u></u></p>
<p class="MsoNormal">(00.009719) Unfreezing tasks into 1<u></u><u></u></p>
<p class="MsoNormal">(00.009728) Unseizing 329 into 1<u></u><u></u></p>
<p class="MsoNormal">(00.009739) Unseizing 349 into 1<u></u><u></u></p>
<p class="MsoNormal">(00.009845) Error (cr-dump.c:1600): Dumping FAILED.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Can anyone explain the possible reasons for this error and the nature of the problem?</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">It’s the first time I post to this mailing list so I don’t know if it’s proper to post my lengthy dump.log file.</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regards</p>
<p class="MsoNormal">Costas<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
_______________________________________________<br>
CRIU mailing list<br>
<a href="mailto:CRIU@openvz.org" target="_blank">CRIU@openvz.org</a><br>
<a href="https://lists.openvz.org/mailman/listinfo/criu" rel="noreferrer" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
</blockquote></div>