Custom LXC container recipe

DynFi User

Renowned Member
Apr 18, 2016
148
16
83
49
dynfi.com
Hello,

I would like to build a custom LXC container and use it as a template (and be able to use it as any already existing template (like ubuntu 22, or debian…)), we need to add couple of customized settings into this Master template.

Then we will use this template to setup customer's environment and rapidly replicate the template to create new instance.

Is there a clear guideline / explanation on how to setup this template ?


Thx.
 
The README in this dab project is… minimalist o_O:

Code:
➜  dab git:(master) cat README
TODO
 
  • Like
Reactions: fabian
Another method to create a custom LXC container template is well explained in the second part of this video: https://youtu.be/hxmXOamsuIg?si=UrEtuLf5y4hSmDlU&t=307

Basically, you can start with a proxmox lxc prebuilt container templates. Then you can create a container based on those templates and customize it. When you finished do your customizations, you can execute the command vzdump that creates a backup of the container and save it to /var/lib/vz/template/cache/ that is the directory where the proxmox lxc templates are stored. If you want you can rename the created file. Now you'll see the new customized template you created in the template section in the Proxmox dashboard and you can use it as a template for your new containers.

Also exaplained here: https://forum.proxmox.com/threads/customize-a-lxc-template.23461/post-145049
 
Last edited:
Another method to create a custom LXC container template is well explained in the second part of this video: https://youtu.be/hxmXOamsuIg?si=UrEtuLf5y4hSmDlU&t=307

Basically, you can start with a proxmox lxc prebuilt container templates. Then you can create a container based on those templates and customize it. When you finished do your customizations, you can execute the command vzdump that creates a backup of the container and save it to /var/lib/vz/template/cache/ that is the directory where the proxmox lxc templates are stored. If you want you can rename the created file. Now you'll see the new customized template you created in the template section in the Proxmox dashboard and you can use it as a template for your new containers.

Also exaplained here: https://forum.proxmox.com/threads/customize-a-lxc-template.23461/post-145049
Has been discussed here on the forums multiple times aswell ... e.g. over 8 years ago.
 

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!