incus 6.0.4
My operating environment(VPS) is as follows:
System Summary:
Category
Details
OS
Debian GNU/Linux 12 (bookworm) x86_64
Host
KVM/QEMU (Standard PC (i440FX + PIIX, 1996) pc-i440fx-9.0)
Kernel
6.1.0-35-cloud-amd64
CPU
AMD Ryzen 9 7950X3D (2 cores) @ 4.192GHz
When I tried to create a stateful-snap, the error was as follows
root@localhost:~# incus snapshot create debian-incus stateful-snap --stateful
Error: Failed taking stateful checkpoint: snapshot dump failed
(00.009750) Warn (criu/seize.c:404): Unexpected process 45098 in the freezer cgroup (status 0x80057f)
(00.009754) Warn (criu/seize.c:404): Unexpected process 42303 in the freezer cgroup (status 0x80057f)
(00.009928) Error (criu/namespaces.c:460): Can't dump nested uts namespace for 37534
(00.009931) Error (criu/namespaces.c:721): Can't make utsns id
(00.012705) Error (criu/util.c:656): exited, status=1
(00.013741) Error (criu/util.c:656): exited, status=1
(00.045083) Error (criu/cr-dump.c:2111): Dumping FAILED.
If creating a regular snapshot, there is no problem .
I searched on the forum and found a similar situation five years ago.
How can I solve this problem? Can’t I run Incus in a VM to create a stateful-snap ?
simos
(Simos Xenitellis)
July 2, 2025, 7:23am
2
Welcome!
Is debian-incus a container or a virtual machine? CRIU has several limitations in taking stateful snapshots on containers. Stateful snapshots of VMs should be OK.
Yes,
‘debian-inus’ runs within the VM. Or, in other words, the entire Incus runs on a debian VM,
and I open a “ debian Incus/lxc VM ” inside Incus,VM nesting ?
simos
(Simos Xenitellis)
July 2, 2025, 8:40am
4
What is debian-incus
? A container or a VM?
You can verify by running the following. The n
below is for name , the t
is for type .
incus list --columns nt debian-incus
Sorry, my description was incorrect. I am running an Incus container in a VM(VPS),not VM running in VM
root@localhost:~# incus list --columns nt debian-incus
+--------------+-----------+
| NAME | TYPE |
+--------------+-----------+
| debian-incus | CONTAINER |
+--------------+-----------+
root@localhost:~# incus list
+--------------+---------+-----------------------+------------------------------------------------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+--------------+---------+-----------------------+------------------------------------------------+-----------+-----------+
| debian-incus | RUNNING | 172.17.0.1 (docker0) | fd42:c0b8:1f8e:e81d:1266:6aff:fef7:e82e (eth0) | CONTAINER | 1 |
| | | 10.240.108.220 (eth0) | | | |
+--------------+---------+-----------------------+------------------------------------------------+-----------+-----------+
root@localhost:~# incus snapshot create debian-incus stateful-snap --stateful
Error: Failed taking stateful checkpoint: snapshot dump failed
(00.009189) Warn (criu/seize.c:404): Unexpected process 45098 in the freezer cgroup (status 0x80057f)
(00.009194) Warn (criu/seize.c:404): Unexpected process 42303 in the freezer cgroup (status 0x80057f)
(00.009389) Error (criu/namespaces.c:460): Can't dump nested uts namespace for 37534
(00.009391) Error (criu/namespaces.c:721): Can't make utsns id
(00.010974) Error (criu/util.c:656): exited, status=1
(00.012140) Error (criu/util.c:656): exited, status=1
(00.045866) Error (criu/cr-dump.c:2111): Dumping FAILED.
root@localhost:~# incus snapshot create debian-incus stateful-snap1 --stateful
Error: Failed taking stateful checkpoint: snapshot dump failed
(00.007818) Warn (criu/seize.c:404): Unexpected process 45098 in the freezer cgroup (status 0x80057f)
(00.007823) Warn (criu/seize.c:404): Unexpected process 42303 in the freezer cgroup (status 0x80057f)
(00.008003) Error (criu/namespaces.c:460): Can't dump nested uts namespace for 37534
(00.008006) Error (criu/namespaces.c:721): Can't make utsns id
(00.009414) Error (criu/util.c:656): exited, status=1
(00.010575) Error (criu/util.c:656): exited, status=1
(00.044951) Error (criu/cr-dump.c:2111): Dumping FAILED.
simos
(Simos Xenitellis)
July 2, 2025, 11:05am
8
According to https://linuxcontainers.org/incus/docs/main/howto/instances_backup/
CRIU (the subsystem for checkpoint/restore functionality in Linux, CRIU ) may not be able to make stateful snapshots in all cases. It is likely that you got stuck in such a case.
To figure out whether this is a CRIU issue or an Incus issue, you can try to create a stateful snapshot for the simplest of containers, like images:alpine/edge/cloud
or images:ubuntu/24.04/cloud
. Obviously, if you get a failure in any case, then this could be an Incus issue.
https://linuxcontainers.org/
is
503 Service Unavailable
No server is available to handle this request.
I will try taking state snapshots on other containers in the future
I noticed a strange phenomenon where I used Incus to create a container for debian arch, but failed to create a state snapshot.
However, when I created Alpine Linux, I succeeded in creating a state snapshot
root@localhost:~# incus snapshot create my-arch snapshot2 --stateful
Error: Stateful snapshots require that the instance has migration.stateful be set to true
root@localhost:~# incus config set my-arch migration.stateful=true
root@localhost:~# incus snapshot create my-arch snapshot2 --stateful
Error: Failed taking stateful checkpoint: snapshot dump failed
(00.006883) Error (criu/namespaces.c:460): Can't dump nested uts namespace for 59583
(00.006889) Error (criu/namespaces.c:721): Can't make utsns id
(00.009941) Error (criu/util.c:656): exited, status=1
(00.011376) Error (criu/util.c:656): exited, status=1
(00.047553) Error (criu/cr-dump.c:2111): Dumping FAILED.
root@localhost:~# incus config set my-alpine migration.stateful=true
root@localhost:~# incus snapshot create my-alpine alpine-stateful-snap --stateful
root@localhost:~# incus snapshot list my-alpine
+----------------------+----------------------+------------+----------+
| NAME | TAKEN AT | EXPIRES AT | STATEFUL |
+----------------------+----------------------+------------+----------+
| alpine-stateful-snap | 2025/07/02 21:09 CST | | YES |
+----------------------+----------------------+------------+----------+
root@localhost:~#
stgraber
(Stéphane Graber)
July 2, 2025, 6:01pm
12
That’s actually pretty usual, checkpoint/restore of Linux containers is EXTREMELY difficult and very rarely succeeds.
A successful state dump also sadly doesn’t mean it’s restorable.
As it stands, I’m only aware of Alpine/Busybox being able to save state correctly but neither of them can be restored. We’re hoping to spend some time contributing to CRIU, LXC and other projects to improve the situation, though that will likely still be limited to very specific use cases, like OCI containers and very simple system containers.
Checkpoint/restore of containers running systemd isn’t likely to work any time soon.
Will using stateful snapshots in LXC/LXD also frequently encounter this failure issue?
simos
(Simos Xenitellis)
July 3, 2025, 7:24am
14
The ability to take snapshots is thanks to the CRIU project that does the implementation of checkpoint and restore functionality in Linux. That is, it’s a third-party software that is used in Incus (and LXD), and is shared among them. In that respect, there should be little different among the projects.
Incus has this version of CRIU. It’s the latest version, released 4 months ago.
$ /opt/incus/bin/criu --version
Version: 4.1
GitID: v4.1
$
You may follow CRIU issues at GitHub · Where software is built
My criu is 4.1 too ,
Then I’ll have to wait for now; it can’t fully replace a VM yet.