diff --git a/containerd-shim/process.go b/containerd-shim/process.go index bf48eac..6de7d9b 100644 --- a/containerd-shim/process.go +++ b/containerd-shim/process.go @@ -132,7 +132,8 @@ func (p *process) start() error { ) } else if p.checkpoint != nil { args = append(args, "restore", - "--image-path", filepath.Join(p.checkpointPath), + "--image-path", p.checkpointPath, + "--work-path", filepath.Join(p.checkpointPath, "criu.work", "restore-"+time.Now().Format(time.RFC3339)), ) add := func(flags ...string) { args = append(args, flags...) diff --git a/runtime/container.go b/runtime/container.go index b395e79..4b9fa9a 100644 --- a/runtime/container.go +++ b/runtime/container.go @@ -351,6 +351,7 @@ func (c *container) Checkpoint(cpt Checkpoint, checkpointDir string) error { args := []string{ "checkpoint", "--image-path", path, + "--work-path", filepath.Join(path, "criu.work"), } add := func(flags ...string) { args = append(args, flags...)