I’ve run xmrig in unprivileged LXD for over a year… the MSR MOD error message can be ignored if you run as root on the host machine once after boot. I generally set a @reboot line in the root crontab.
The command you want to run is wrset which is discussed here:-
https://xmrig.com/docs/miner/randomx-optimization-guide/msr
Note that even if you run this xmrig will still complain but its as its already set you can safely ignore it.