Create template from a vm: Difference between revisions

From Jwiki
No edit summary
No edit summary
Line 18: Line 18:
</syntaxhighlight>
</syntaxhighlight>


1. Execute as other user (optional):
 
2. Execute as other user (optional):


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 27: Line 28:
exit
exit
</syntaxhighlight>
</syntaxhighlight>
3. On gui click on convert to template

Revision as of 11:23, 29 August 2024


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


2. Execute as other user (optional):

echo "" > ~/.bash_history
rm ~/.Xauthority
history -c
sudo shutdown
exit


3. On gui click on convert to template