I notice that incus start
has a flag
--stateless Ignore the instance state
and incus stop
has a flag
--stateful Store the instance state
However, I can’t find any documentation for what those flags actually mean. The incus manual just duplicates the above flag definitions.
As far as I can tell from the source code, it looks like a stop --stateful
will store some additional state (what kind of state? is it like CRIU?) and start
will by default restore that state unless told not to:
if shutdownAction == "stateful-stop" {
// Attempt to restore state.
err = inst.Start(true)
} else {
// Normal startup.
err = inst.Start(false)
}
Therefore, this suggest to me that it’s like a suspend/resume operation, i.e. stop --stateful
doesn’t shutdown the container but freezes its state. Is that correct?
Does it work for containers and VMs?
Thanks,
Brian.