Add CreateLXCTemplate.txt
This commit is contained in:
22
CreateLXCTemplate.txt
Normal file
22
CreateLXCTemplate.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
# 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 (.tar.zst) from <Storage>/dump directory to <Storage>/template/cache directory (Rename as desired)
|
||||
5. (Optional) Delete original backup
|
||||
--------------------------------------
|
||||
Reference in New Issue
Block a user