Refining Linux Templates
Leverage virtualization-specific kernels
Deploy the linux-image-kvm kernel, which is optimized specifically for KVM virtualization environments.
For instance, on an Ubuntu system, you would run the following commands:
apt install linux-image-kvm apt purge linux-image-generic
Prior to publishing the template, perform cleanup
# removes logs journalctl --vacuum-size=1 # removes user history history -c
(as root) rm /root/.bash_history