# How do you make custom OpenVZ templates?



## vpsnewb (Mar 31, 2013)

It'd be cool to learn how to make my own custom OpenVZ templates for particular configs (LAMP/LEMP stacks) as well as compiled with software already like cPanel, Kloxo, Webmin, zPanel, etc, etc.

Anyone have a good guide?


----------



## HalfEatenPie (Mar 31, 2013)

Honestly the best way (atleast for me) was to use the OpenVZ Wiki as the starting point. 

http://wiki.openvz.org/Category:Templates

For example, looking into CentOS 6, its just a few commands and then packaging it up.  

Personally, I'd use a combination of the OpenVZ Wiki and the TurnkeyLinux's "clean" templates to make my own.  

If there is a better guide, I'd totally appreciate it too!


----------



## Awmusic12635 (May 3, 2013)

Personally, I find the easiest way to make an Openvz template is to load up a base template in Solusvm and install it onto a dev vps.

Then make any modifications that you feel like and then click on the "create template" button in the admin panel on the details of the virtual server.

It will then as you to make a file name which it creates from the files of the VPS you edited and places it in  /vz/templates/cache .


----------



## shovenose (May 13, 2013)

Does anybody have a good cPanel CentOS 6 64-bit template?


----------



## Awmusic12635 (May 13, 2013)

shovenose said:


> Does anybody have a good cPanel CentOS 6 64-bit template?


http://openvztemplate.com/templatefiles/centos-6-cpanel.tar.gz


----------



## MannDude (May 14, 2013)

Fliphost said:


> Personally, I find the easiest way to make an Openvz template is to load up a base template in Solusvm and install it onto a dev vps.
> 
> Then make any modifications that you feel like and then click on the "create template" button in the admin panel on the details of the virtual server.
> 
> It will then as you to make a file name which it creates from the files of the VPS you edited and places it in  /vz/templates/cache .


Is it really that simple? I was always under the impression the process was much more invovled than that.


----------



## shovenose (May 14, 2013)

Fliphost said:


> http://openvztemplate.com/templatefiles/centos-6-cpanel.tar.gz


I was unfortunately never able to get templates from your site to work, otherwise I would.


----------



## Awmusic12635 (May 14, 2013)

There is not much you need to get them to work. Just place in the Openvz template directory.


I know they work as I use them for Fliphost.


----------



## shovenose (May 14, 2013)

Well, It did not work for me, sorry.


----------



## Awmusic12635 (May 14, 2013)

There is a report a problem on each template page. I cannot fix any bugs or issues if they are not reported.


Please fill it out and I will look into it.


----------



## wilbo (May 17, 2013)

I've found that most control panels let you create templates.  I know HyperVM, OpenVZ Web Panel and Solus all let you make templates.


----------



## coreyman (May 17, 2013)

Fliphost said:


> http://openvztemplate.com/templatefiles/centos-6-cpanel.tar.gz


I get a 403 Forbidden on this and additionally I can not find a template like this by just browsing the site.


----------



## Awmusic12635 (May 17, 2013)

coreyman said:


> I get a 403 Forbidden on this and additionally I can not find a template like this by just browsing the site.


Sorry I moved it around, I will post a new link shortly


----------



## herbyscrub (May 17, 2013)

I do the following and it works fine for me:

- download precreated from openvz website

- load it up in a test box (or production...really doesn't matter)

- customize container

- vzdump --compress 6969

- move from /vz/dump to /vz/template/cache

- vzctl create 6969 --ostemplate debian-6.0-i386-gloo_vnstat --config basic (basically just omit tar.gz)


----------



## wilbo (May 18, 2013)

herbyscrub said:


> I do the following and it works fine for me:
> 
> - download precreated from openvz website
> 
> ...


Does this method strip out the ip numbers from the template?


----------



## Corporal Clegg (May 18, 2013)

wilbo said:


> Does this method strip out the ip numbers from the template


 

Delete them before creating template, see here for example http://openvz.org/Updating_Debian_template


----------



## Jono20201 (May 18, 2013)

I just use SolusVM's template creator, thats how I created a pre-install cPanel and Webmin templates. Tempted to also make some really minimal templates when I find some time.


----------



## Awmusic12635 (May 18, 2013)

coreyman said:


> I get a 403 Forbidden on this and additionally I can not find a template like this by just browsing the site.


New page: http://openvztemplate.com/view.php?id=34


----------



## BlackoutIsHere (May 18, 2013)

Jono20201 said:


> Tempted to also make some really minimal templates when I find some time.


 
Minimal templates are great! The less the merrier?


----------



## Awmusic12635 (May 18, 2013)

BlackoutIsHere said:


> Minimal templates are great! The less the merrier?


Yea, Its fun having debian running on like 2-3MB of RAM. I think that is what the openvztemplate.com ones run at on average.


----------



## jarland (May 18, 2013)

Jono20201 said:


> SolusVM's template creator



I've been meaning to test this question for a while but I've always had other priorities. Does SolusVM erase the SSH keys so that they are generated again for the next install? My understanding is that there is template creation, then there is secure template creation.

Reference: http://openvz.org/Debian_template_creation#Fix_SSH_host_keys


----------



## WebTech Hosts (Mar 8, 2015)

Whats the difference between minimal and standard?

https://openvz.org/Download/template/precreated


----------



## HalfEatenPie (Mar 8, 2015)

WebTech Hosts said:


> Whats the difference between minimal and standard?
> 
> https://openvz.org/Download/template/precreated


Minimal only has the barebones whereas standard frequently contains additional applications such as Apache and the such.  In my opinion, they should deliver all templates as minimal. 

Also get the occasional "you're a scam!  I've never had apache preinstalled on my server from so and so!".  What do they expect?  It's the standard precreated templates from OpenVZ themselves.


----------

