Summary
I’m trying to take a stateful snapshot of an LXD virtual machine. When I use the --stateful
parameter, I get an error saying:
Error: Failed initializing state save to "/var/snap/lxd/common/lxd/virtual-machines/a01/state": Migration is disabled when VirtFS export path '/var/snap/lxd/common/lxd/devices/a01/config.mount' is mounted in the guest using mount_tag 'config'
Question: How do I take a stateful snapshot of an LXD virtual machine?
Repro Steps
- Launch new LXD VM
lxc launch --vm images:alpine/3.18 a01
- Set VM config
lxc config set config.migration.stateful=true
- Set VM config
devices.root.size.state: 1GiB
a. NOTE: (copydevices
config fromlxc config show --extended a01
) - Attempt stateful snapshot:
lxc snapshot a01 --stateful
- Observe error message