Trying lxc.mount.entry but does not work

I’ve set this

echo ‘lxc.mount.entry = /tmp/HOST /tmp/CONTAINER none bind,optional,create=dir,ro’ | lxc config set containername raw.lxc -

This never gets bind mounted into the container. Is there some kind of debug log for lxd instead of lxc start --debug ?

My version of lxd is 4.16

That line should use /tmp/HOST tmp/CONTAINER or something along those lines. Note that bind-mounting into /tmp is usually a bad idea as systemd in the container will wipe /tmp during boot.

Also in the LXD case, what you’re trying to do here should be done with:

lxc config device add NAME DEVICE disk source=/tmp/HOST path=/tmp/CONTAINER readonly=true

But note that same concern about using target paths in /tmp

I miswrote. The entry isn’t for /tmp

echo ‘lxc.mount.entry = /home/nexs/HOST /home/nexs/CONTAINER none bind,optional,create=dir,ro’ | lxc config set containername raw.lxc -

I’ve tried this too. And that didn’t work. I’ve used lxc config device before and that works. Is there somewhere that lxd outputs error messages if it cannot mount or errors out on something, because the host syslog doesn’t show anything with mounting and lxc start --debug only shows return messages from the websocket to the lxd daemon but itself doesn’t indicate any wrong.