Create own CT template from ISO or VM?

GastonJ

Member
Aug 22, 2022
26
3
8
Good morning,

I have the need to create my own CT templates, rather than use official templates. A while ago I did find an article and create an Oracle Linux 8 template, which I now use for deploying CT's for databases.

However I lost the guide for creating new templates and find that I need to create my own Oracle Linux 7 template. Any pointers to the guide for creating templates from ISO's or VM's would be appreciated.

Regards, and TIA.
 
Hi!
I have the need to create my own CT templates, rather than use official templates. A while ago I did find an article and create an Oracle Linux 8 template, which I now use for deploying CT's for databases.

However I lost the guide for creating new templates and find that I need to create my own Oracle Linux 7 template. Any pointers to the guide for creating templates from ISO's or VM's would be appreciated.
Not a complete guide, but a rough overview:

The simplest method would be using an existing Oracle Linux template to create a container and set up your desired base variant and customizations, then either convert that container to a Proxmox VE Guest Template which you can then clone to get new containers with the customizations applied.
The alternative to cloning would be making a backup, and moving the resulting file to the template/cache/ folder of a Proxmox VE storage (e.g., /var/lib/vz/template/cache/ for the "local" storage), then you should be able to use that template if you newly create containers via the CT Create wizard.
 
  • Like
Reactions: GastonJ
Creating a template from a VM is also straight-forward:

rsync the whole filesystem to a new subfolder, chroot into it, remove kernel and other stuff you don't need in a container and tar the whole thing, put the file in /var/lib/vz/template/cache/. I have done this in the past, yet moved await from containers and do everything directly in a VM. Easier mass-deployment with kickstart, live-migration and better support with original OL kernel. You can also not use ACFS with containers, so you need to stick to VMs.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!