Ability to manually set: Node/Hypervisor type

Started by sodalist, March 28, 2023, 03:15:57 PM

Previous topic - Next topic

sodalist

If running nxagent as non root user within LXC container src/agent/subagents/linux/hypervisor.cpp will fail to detect container=lxc as it can not read /proc/1/environ.

Would it be possible to:

OR

1) extend src/agent/subagents/linux/hypervisor.cpp to implement methods to detect hypervisor and node type
    example: https://github.com/systemd/systemd/blob/main/src/basic/virt.c#L657
 
2) use systemd-detect-virt executable directly

3) try to read /run/systemd/container

4) enable/explain option to manually set:
    Node type: Container
    Hypervisor type: LXC

thank you,

Ales