Linux Template Tweaking

Opt for a kernel purpose-built for virtualization

Go with  linux-image-kvm kernel, which is specifically designed for KVM virtualization.

For instance, on Ubuntu you can run:

apt install linux-image-kvm
apt purge linux-image-generic
Tidy up before publishing a template
# removes logs
journalctl --vacuum-size=1
# removes user history
history -c
(as root) rm /root/.bash_history