LXC -> Create template from existing container?

SPQRInc

Member
Jul 27, 2015
57
1
6
Hello there :)

Is there any possibility to create a template from an existing LXC-Container or simply clone one?

Thanks in advance :)
 
Hi Dietmar,

well, if I use "Backup" and try to restore that backup, I can only replace the existing machine. I am not able to create a new one from backup.
 
well, if I use "Backup" and try to restore that backup, I can only replace the existing machine. I am not able to create a new one from backup.

No, you can also create a new one from backup. Just use the restore button on the storage content panel.
 
I prefer to create a new container and then use the -force option to override it from "template" backup so I get a random MAC address. However I am guessing my fresh key pair will be overwritten by the template's. Is this a problem?

Also, currently it is possible to convert a container to template from command line, but I suppose this will only become useful after clone function arrives.
 
Also, currently it is possible to convert a container to template from command line, but I suppose this will only become useful after clone function arrives.

Yes, we try to provide that clone functionality with the next release . Sorry, but I do not understand the first question.
 
Yes, we try to provide that clone functionality with the next release . Sorry, but I do not understand the first question.
Is there an ETA on when we can expect this functionality to be released? Cheers.
 
I'd also like to know. We setting up servers manually like cpanel servers and not really ideal.

Would like to just clone a server.
 
Any update on this? I just tried pct set 149 --template 1 and got implement me: template at /usr/share/perl5/PVE/LXC/Config.pm line 1027. Which I guess is the same issue being discussed above.? I guess I can accept a "do it this way instead", but ultimately I got misled by the documentation making me expect something that might not be finished and robust yet :(
 
well what worked for us was to create a normal guest and set it up the way u want we then backip the guest using gzip instead of lzop and rename it to a good name. then we place that in thr templates/cache folder and setup new lxc vps using that. Works quite well.
 

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!