Use systemctl reload snap.lxd.daemon
as snap restart lxd
or systemctl restart snap.lxd.daemon
will cause a “clean” shutdown of the LXD daemon, shutting down all the containers in the process.
When the snap package updates (refresh), a reload is performed, specifically so that containers don’t get respawned. Unfortunately we can’t make snap restart lxd
do that as what it does is call systemctl restart lxd
which in turn is the same as systemctl stop
and systemctl start
and we do need systemctl stop
to shutdown all containers as otherwise we’d get data corruption when you shutdown or reboot the server.