Create the LXC Template
In order to turn the container into a template, we need to delete the network interface then create a backup.
From Proxmox (not inside the container):
1
2
3
4
# Remove the network interface:
sudo pct set 250 --delete net0
# Create a backup:
vzdump 250 --mode stop --compress gzip --dumpdir /<vzdump-path>/data/template/cache/
The new file will be located in: /<vzdump-path>/data/template/cache
You can leave it as is or rename it to something:
1
2
3
4
# Change directories:
cd /media/sas/data/template/cache
# Rename it:
sudo mv new_vz_dump.tar.gz custom_debian_10.4.tar.gz
See man vzdump for more info.
This post is licensed under CC BY 4.0 by the author.