Lynis - Security auditing tool for Linux, macOS, and UNIX-based systems. Assists with compliance testing (HIPAA/ISO27001/PCI DSS) and system hardening. Agentless, and installation optional.
Describe the bug
On a LXC container you might find no kernels installed as the host kernel is used.
Version
LXC container running ubuntu 20.04 on Proxmox host.
Expected behaviour
It should be known if a host is a container and not a VM or host.
I have this check in one of my scripts. If it fails
if [[ $(find /boot/ -maxdepth 1 -name 'vmlinuz*' -print -quit) ]]; then
I know it is a container. Possibly better checks out there but this works without installing any new tools.
Describe the bug On a LXC container you might find no kernels installed as the host kernel is used.
Version LXC container running ubuntu 20.04 on Proxmox host.
Expected behaviour It should be known if a host is a container and not a VM or host.
I have this check in one of my scripts. If it fails
if [[ $(find /boot/ -maxdepth 1 -name 'vmlinuz*' -print -quit) ]]; then
I know it is a container. Possibly better checks out there but this works without installing any new tools.