> If I mimic the lava LXC machine creation commands (lxc-create) and I attach to the machine I get a sane environment.
> Is this expected behavior?

A hacking session inside an LXC is of very limited use - a full VM
using QEMU is generally a much better idea - that will also need
network bridging support using the tap netdevice to allow users to
login to the session.

The environment that you get in the LXC session is inherited from the environment of the lava-dispatch command. This environment is (by design and for good reasons that I can explain later on) very limited and controlled by the file /etc/lava-server/env.yaml

This is only a guess as I haven't tried on my setup. You can check that this guess is true (or not) by changing /etc/lava-server/env.yaml (setting purge to false).
But keep in mind that this is only for testing and not for production!


Cheers

--
Rémi Duraffort
STMIcroelectronics