====== Problem getting machineid on LXC/LXD container ======
When you install Trisul packages like the probe or hub on a LXC/LXD linux container you might face an error where Trisul is unable to get the machineID of the container.
The error could be something like the following ; when you try to get the machineID from the hub or probe node from the admin panel.
{{:tips:trisul_network_analytics_14-07-2021_18-36-20.png?800|}}
===== Fix this error to allow LXC nodes to get the machineID =====
Essentially you need to set the container permissions to allow access to the /dev/mem device from the host which is used as part of dmidecode. Do the following steps.
lxc stop
lxc config set security.privileged true
lxc config device add devmem unix-char source=/dev/mem
lxc restart
To test if it works do
lxc exec dmidecode
If that does not work add the following commands and retry
lxc config set raw.lxc 'lxc.cap.drop='
lxc config set raw.lxc 'lxc.cap.keep='