To create a whole new openvz template is a little bit complex, use already exist template to create a new version is much easier.
Refererce:
https://techanarchy.net/2015/01/proxmox-custom-openvz-templates/
https://raymii.org/s/tutorials/OpenVZ_Proxmox_Container_to_Template.html
Actually, I’ll remove logs under /var/log/ before re-pack the template.
Hint:
Use pigz to compress the template can save your time, reference:
Use multi-threads to compress file(s) when tar-ing something