I have seen from the LXD 5.1 news (LXD 5.1 has been released) that now LXD can intercept sysinfo. The example shows how the memory seen within the container reflects the container memory limits. However, when using LXD 4.0.7 I see the same behaviour without any additional configuration:
$ lxc launch images:debian/11 a1 -c limits.memory=1GiB Creating a1 Starting a1 $ lxc exec a1 -- free -m total used free shared buff/cache available Mem: 1024 20 966 0 36 1003 Swap: 1024 0 1024
Even with LXC 3.0.3 I see the same behaviour.
So I am a bit confused on how the new feature differs from the default behaviour in previous versions of LXD.