You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit updates the README file to include detailed steps for installing and
using criu-coordinator.
Signed-off-by: Kouame Behouba Manasse <[email protected]>
__criu-coordinator__ operates in a client-server model. The server manages the coordination of checkpoints, while clients are invoked as CRIU action scripts that communicate with the server during checkpoint and restore operations.
32
+
9
33
1. Start coordinator server
10
34
11
35
```console
12
36
criu-coordinator server --address 127.0.0.1 --port 8080
13
37
```
14
38
15
-
2. Create directory for CRIU image files and copy `criu-coordinator.json`
Create a global configuration file at /etc/criu/criu-coordinator.json. For example:
42
+
43
+
```json
44
+
{
45
+
"address": "127.0.0.1",
46
+
"port": "8080",
47
+
"dependencies": {
48
+
"A": ["B"],
49
+
"B": ["A"]
50
+
}
51
+
}
20
52
```
53
+
A and B could be process names, process IDs, or container IDs. The dependencies define which processes must be checkpointed together.
21
54
22
-
3. Configure CRIU to use criu-coordinator
55
+
56
+
Alternatively, for simple processes, you can create a per process configuration file `criu-coordinator.json` and place it in the directory where CRIU images will be stored. For example:
57
+
58
+
For process A:
59
+
```json
60
+
{
61
+
"id": "A",
62
+
"dependencies": ["B"],
63
+
"address": "127.0.0.1",
64
+
"port": "8080",
65
+
"log-file": "coordinator.log"
66
+
}
67
+
68
+
```
69
+
70
+
For process B:
71
+
```json
72
+
{
73
+
"id": "B",
74
+
"dependencies": ["A"],
75
+
"address": "127.0.0.1",
76
+
"port": "8080",
77
+
"log-file": "coordinator.log"
78
+
}
79
+
```
80
+
81
+
3. Configure CRIU to use criu-coordinator as the action script
23
82
24
83
```console
25
84
mkdir -p /etc/criu/
26
85
echo action-script="$(which criu-coordinator)" | sudo tee /etc/criu/default.conf
27
86
```
28
87
88
+
4. Coordinated Checkpoint/Restore
89
+
90
+
You can now perform coordinated checkpoint and restore operations. For example, to checkpoint process A and B:
91
+
92
+
In terminal 1 (for process A):
93
+
94
+
```console
95
+
sudo criu dump -t <PID_A> -D /tmp/images-a -j
96
+
```
97
+
98
+
In terminal 2 (for process B):
99
+
100
+
```console
101
+
sudo criu dump -t <PID_B> -D /tmp/images-b -j
102
+
```
103
+
104
+
To restore the processes, use the following commands:
0 commit comments