Fine-tuning Linux Templates
Use a kernel purpose-built for virtualization
The linux-image-kvm kernel is designed specifically for KVM virtualization, making it the optimal choice.
As an example, on Ubuntu, you would run the following commands:
apt install linux-image-kvm apt purge linux-image-generic
Perform cleanup before publishing a template
# clears out log entries journalctl --vacuum-size=1 # wipes command history history -c
(run as root) rm /root/.bash_history