[CRIU] Migration and Restart of http://criu.org/Simple_loop

Thouraya TH thouraya87 at gmail.com
Tue Feb 3 03:25:39 PST 2015


root@*g-71*:/home/imgDir# criu restore -d -vvv -o restore.log *--shell-job*
&& echo OK
OK
root at g-71:/home/imgDir# Tue Feb  3 12:16:52 CET 2015
Tue Feb  3 12:16:53 CET 2015
Tue Feb  3 12:16:54 CET 2015
Tue Feb  3 12:16:55 CET 2015
Tue Feb  3 12:16:56 CET 2015
Tue Feb  3 12:16:57 CET 2015
Tue Feb  3 12:16:58 CET 2015
Tue Feb  3 12:16:59 CET 2015
Tue Feb  3 12:17:00 CET 2015
Tue Feb  3 12:17:01 CET 2015

Fine restart on the same machine. Thanks a lot.

*i try to migrate the imgDir on a new host:*

scp -r *imgDir *root@*g-80*.xxxxxxx:/home

root at g-80:/home# cd imgDir/
root at g-80:/home/imgDir# ls
cgroup.img      creds-1849.img  ext-files.img  filelocks.img
ids-1849.img   mm-1249.img    packetsk.img      pages-2.img
sigacts-1249.img  stats-dump
core-1249.img   creds-1967.img  fanotify.img   fs-1249.img
ids-1967.img   mm-1849.img    pagemap-1249.img  pipes-data.img
sigacts-1849.img  timerfd.img
core-1849.img   creds-1995.img  fdinfo-2.img   fs-1849.img
ids-1995.img   mm-1967.img    pagemap-1849.img  pipes.img
sigacts-1967.img  tty.img
core-1967.img   dump.log        fdinfo-3.img   fs-1967.img
inetsk.img     mm-1995.img    pagemap-1967.img  pstree.img
sigacts-1995.img  tty-info.img
core-1995.img   eventfd.img     fifo-data.img  fs-1995.img
inotify.img    netlinksk.img  pagemap-1995.img  reg-files.img
signalfd.img      tunfile.img
creds-1249.img  eventpoll.img   fifo.img       ids-1249.img
inventory.img  ns-files.img   pages-1.img       remap-fpath.img
sk-queues.img     unixsk.img


root at g-80:/home/imgDir# criu restore -d -vvv -o restore.log && echo OK
root at g-80:/home/imgDir# ps -C test.sh
  PID TTY          TIME CMD

*restore.log:*
.............................
(00.011947)   1249: Map 0x00007f3fe7486000-0x00007f3fe7641000
0x0000000000000000 vma
(00.011965)   1249: Map 0x00007f3fe7641000-0x00007f3fe7841000
0x00000000001bb000 vma
(00.011978)   1249: Map 0x00007f3fe7841000-0x00007f3fe7845000
0x00000000001bb000 vma
(00.011990)   1249: Map 0x00007f3fe7845000-0x00007f3fe7847000
0x00000000001bf000 vma
(00.011999)   1249: Map 0x00007f3fe7847000-0x00007f3fe784c000
0x0000000000000000 vma
(00.012010)   1249: Map 0x00007f3fe784c000-0x00007f3fe786f000
0x0000000000000000 vma
(00.012020)   1249: Map 0x00007f3fe7a63000-0x00007f3fe7a66000
0x0000000000000000 vma
(00.012027)   1249: Map 0x00007f3fe7a6c000-0x00007f3fe7a6e000
0x0000000000000000 vma
(00.012037)   1249: Map 0x00007f3fe7a6e000-0x00007f3fe7a6f000
0x0000000000022000 vma
(00.012049)   1249: Map 0x00007f3fe7a6f000-0x00007f3fe7a70000
0x0000000000023000 vma
(00.012059)   1249: Map 0x00007f3fe7a70000-0x00007f3fe7a71000
0x0000000000000000 vma
(00.012070)   1249: Map 0x00007f3fe7a71000-0x00007f3fe7a8d000
0x0000000000000000 vma
(00.012081)   1249: Map 0x00007f3fe7c8c000-0x00007f3fe7c8e000
0x000000000001b000 vma
(00.012092)   1249: Map 0x00007f3fe7c8e000-0x00007f3fe7c8f000
0x000000000001d000 vma
(00.012101)   1249: Map 0x00007f3fe7c8f000-0x00007f3fe7c91000
0x0000000000000000 vma
(00.012108)   1249: Map 0x00007f3fe96e5000-0x00007f3fe9706000
0x0000000000000000 vma
(00.012116)   1249: Map 0x00007fff410cc000-0x00007fff410ef000
0x0000000000000000 vma
(00.012123)   1249: Map 0x00007fff411fe000-0x00007fff41200000
0x0000000000000000 vma
(00.012309)   1249: nr_restored_pages: 28
(00.012314)   1249: nr_shared_pages:   0
(00.012318)   1249: nr_droped_pages:   0
(00.012355)   1249: cg: Move into 2
(00.012371)   1249: Error (cgroup.c:907): cg: Can't move into
blkio//user/0.user/1.session/tasks (-1/-1): No such file or directory
(00.012405) Error (cr-restore.c:1838): Restoring FAILED.
(00.018935) Error (cr-restore.c:1185): 1249 exited, status=1


Have you an idea please ?
Best Regards.
Thouraya.


2015-02-03 12:14 GMT+01:00 Ruslan Kuprieiev <kupruser at gmail.com>:

>  Hi Thouraya,
>
> On 02/03/2015 01:06 PM, Thouraya TH wrote:
>
>  Hello,
>
> $ cat > test.sh <<-EOF
> #!/bin/sh
> while :; do
>     sleep 1
>     date
> done
> EOF
> $ chmod +x *test.sh*
>
> I'd like to migrate and  restart this process on a new machine.
>
> *Fist of all*, i have done the *dumping process*:
>
> root at g-71:/home# criu dump -vvvv -o dump.log -D imgDir -R -t 1249 --shell-job && echo OK
>
>
> Here you are using "--shell-job" ...
>
>   OK
> root at g-71:/home# cd imgDir/
> root at g-71:/home/imgDir# ls
> cgroup.img      creds-1849.img  ext-files.img  filelocks.img  ids-1849.img   mm-1249.img    packetsk.img      pages-2.img      sigacts-1249.img  stats-dump
> core-1249.img   creds-1967.img  fanotify.img   fs-1249.img    ids-1967.img   mm-1849.img    pagemap-1249.img  pipes-data.img   sigacts-1849.img  timerfd.img
> core-1849.img   creds-1995.img  fdinfo-2.img   fs-1849.img    ids-1995.img   mm-1967.img    pagemap-1849.img  pipes.img        sigacts-1967.img  tty.img
> core-1967.img   dump.log        fdinfo-3.img   fs-1967.img    inetsk.img     mm-1995.img    pagemap-1967.img  pstree.img       sigacts-1995.img  tty-info.img
> core-1995.img   eventfd.img     fifo-data.img  fs-1995.img    inotify.img    netlinksk.img  pagemap-1995.img  reg-files.img    signalfd.img      tunfile.img
> creds-1249.img  eventpoll.img   fifo.img       ids-1249.img   inventory.img  ns-files.img   pages-1.img       remap-fpath.img  sk-queues.img     unixsk.img
>
>  *Secondly*, i try to restart the process *on the same machine* but it
> didn't work:
>
>  criu restore -d -vvv -o restore.log && echo OK
>
>
> so you should use it here too. Try adding --shell-job to restore command
> and you should be fine =).
>
>    ps -C test.sh
>   PID TTY          TIME CMD
>
> restore.log
> ............
> ............
> (00.013583)   1249: Collecting 48/29 (flags 0)
> (00.013595)   1249: Collecting 49/31 (flags 2)
> (00.013611)   1249: Collecting 50/32 (flags 2)
> (00.013624)   1249: Collecting 71/33 (flags 2)
> (00.013631)   1249: Collecting 51/34 (flags 2)
> (00.013642)   1249: Collecting 72/35 (flags 2)
> (00.013648)   1249: Collecting 45/37 (flags 2)
> (00.013676)   1249: Collecting 44/36 (flags 2)
> (00.013690)   1249: tty: Collected tty ID 0x1
> (00.013696)   1249: Collecting 52/42 (flags 2)
> (00.013712)   1249: Collecting 34/19 (flags 0)
> (00.013723)   1249: Collecting 54/45 (flags 2)
> (00.013734)   1249: Collecting 55/38 (flags 2)
> (00.013761)   1249: Trying to read socket queues image
> (00.013774)   1249: Error (tty.c:193): tty: Found slave peer index 1
> without correspond master peer
> (00.013791) Error (cr-restore.c:1838): Restoring FAILED.
> (00.021267) Error (cr-restore.c:1185): 1249 exited, status=1
>
>  Have you an idea please ?
>
>  Thanks a lot.
>  Best Regards.
>
>
> _______________________________________________
> CRIU mailing listCRIU at openvz.orghttps://lists.openvz.org/mailman/listinfo/criu
>
>  Thanks,
> Ruslan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150203/349b5d60/attachment.html>


More information about the CRIU mailing list