criu_opts_linux.go 1.9 KB

12345678910111213141516171819202122232425262728293031323334
  1. package libcontainer
  2. import criu "github.com/checkpoint-restore/go-criu/v5/rpc"
  3. type CriuPageServerInfo struct {
  4. Address string // IP address of CRIU page server
  5. Port int32 // port number of CRIU page server
  6. }
  7. type VethPairName struct {
  8. ContainerInterfaceName string
  9. HostInterfaceName string
  10. }
  11. type CriuOpts struct {
  12. ImagesDirectory string // directory for storing image files
  13. WorkDirectory string // directory to cd and write logs/pidfiles/stats to
  14. ParentImage string // directory for storing parent image files in pre-dump and dump
  15. LeaveRunning bool // leave container in running state after checkpoint
  16. TcpEstablished bool // checkpoint/restore established TCP connections
  17. ExternalUnixConnections bool // allow external unix connections
  18. ShellJob bool // allow to dump and restore shell jobs
  19. FileLocks bool // handle file locks, for safety
  20. PreDump bool // call criu predump to perform iterative checkpoint
  21. PageServer CriuPageServerInfo // allow to dump to criu page server
  22. VethPairs []VethPairName // pass the veth to criu when restore
  23. ManageCgroupsMode criu.CriuCgMode // dump or restore cgroup mode
  24. EmptyNs uint32 // don't c/r properties for namespace from this mask
  25. AutoDedup bool // auto deduplication for incremental dumps
  26. LazyPages bool // restore memory pages lazily using userfaultfd
  27. StatusFd int // fd for feedback when lazy server is ready
  28. LsmProfile string // LSM profile used to restore the container
  29. LsmMountContext string // LSM mount context value to use during restore
  30. }