Create template from a vm
1. Execute as root:
sudo su - root
echo "" > ~/.bash_history
rm ~/.Xauthority
rm /etc/ssh/ssh_host_*
echo "" > /etc/machine-id
systemctl disable --now salt-minion.service
echo
rm -rf /etc/salt/pki/minion/*
echo "" > /etc/salt/minion_id
echo "" > /etc/resolv.conf
history -c
exit
1. Execute as other user (optional):
echo "" > ~/.bash_history
rm ~/.Xauthority
history -c
sudo shutdown