Create template from a vm

From Jwiki
Revision as of 10:10, 29 August 2024 by Gyurci08 (talk | contribs)


1. Execute as 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
exit