Fine-Tuning Linux Templates
Use a kernel optimized for virtualization
Work with linux-image-kvm, a kernel specifically built for KVM virtualization.
For instance, on an Ubuntu system, you should run these commands:
apt install linux-image-kvm apt purge linux-image-generic
Tidy up before publishing a template
# clears logs journalctl --vacuum-size=1 # wipes user history history -c
(as root) rm /root/.bash_history