I am putting this in general, since it is a basic VM usecase, but would of course like to solve it with incus tooling. ![]()
Has anyone here implemented cis compliance / hardening for vm images or containers?
I know that there are ansible playbooks to check and configure the hosts post deployment.
I would prefer to handle it one step earlier and include it in the vm profile and for example solve some of it via cloudinit.
Or is this something distrobuilder would solve?
Especially the partitioning with separate (logical) volumes for /var /var/log /home makes great sense to me but it seams quite hard to implement after the os installation is done.
I really love the idea of prepackaged images
and would try to avoid dealing with packer wherever possible.
Currently we are installing a debian vm once a new release gets published and during installation process we switch in another terminal an do the partitioning by hand. and then convert the vm into a template.
Our partitioning scheme looks like this currently:
sda1 /boot
sda2 /boot/efi
sdb root-vg:
rootvg-root
rootvg-home
rootvg-var
rootvg-log
And then do the other hardening part using ansible playbooks post deployment for each vm.
How are you guys handling this topic?
If this is an long solved problem then feel free to link any talks/repos on that topic.
Thank you in advance.