Fine-Tuning Linux Templates

Select a kernel optimized for virtualization

Use the linux-image-kvm kernel, as it's specifically designed for KVM virtualization.

As an example, on Ubuntu, just run the following commands:

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