Files
SelfHosting-Tools-Scripts/CreateLXCTemplate.txt
2025-10-04 07:09:27 +00:00

22 lines
545 B
Plaintext

# On LXC
--------------------------------------
apt clean
apt autoclean
apt autoremove
rm /etc/hostname
rm /etc/resolv.conf
rm /etc/machine-id
rm /etc/ssh/ssh_host_*
history -c
history -w
history -c
--------------------------------------
# On Host
--------------------------------------
1. Shut down LXC
2. Save LXC as template
3. Create a backup of template
4. Copy/Move backup (cp Proxmox/dump/vzdump-lxc-<ID>-*.tar.zst Proxmox/template/cache/<TemplateName>.tar.zst)
5. (Optional) Delete original backup
--------------------------------------