Run configure hook of "lxd" snap (snap "lxd" option "criu" is not a map)

Hi,

I am trying to set up criu.enable=true or criu_enable=true but both are giving

sudo snap set lxd criu.enable=true
sudo snap set lxd criu_enable=true

And here is what I get

error: cannot perform the following tasks:
- Run configure hook of "lxd" snap (invalid option name: "criu_enable")

My LXD version on Ubuntu 20.04 LTS

 lxd --version
4.18

Config file shows follow:

sudo cat /var/snap/lxd/common/config
# This file is auto-generated, do NOT manually edit
ceph_builtin=false
ceph_external=false
criu_enable=false
daemon_debug=false
daemon_group=lxd
daemon_syslog=false
lvm_external=false
lxcfs_loadavg=false
lxcfs_pidfd=false
lxcfs_cfs=false
openvswitch_builtin=false
shiftfs_enable=auto

Look like criu_enable=false set to false. Any idea how can I fix this? I need this for snapshot with the --stateful options:

lxc snapshot mysql8 snap1 --stateful
Error: Unable to create a stateful snapshot. CRIU isn't installed

Hence, I am trying the sudo snap set lxd criu_enable=true. From the /snap/lxd/current/commands/daemon.start

400 
401 # Setup CRIU
402 if [ "${criu_enable:-"false"}" = "true" ]; then
403     echo "==> Enabling CRIU"
404     export PATH="${SNAP_CURRENT}/criu:${PATH}"
405 fi

What am I missing?

I have the same problem as described above. A solution would be good.

snap set lxd criu.enable=true followed by systemctl reload snap.lxd.daemon

I could solve the error by executing snap unset lxd criu before executing snap set lxd criu.enable=true/false .

1 Like