Difference between revisions of "Creating OVZ Template"

From vpsget wiki
Jump to: navigation, search
(Created page with "Current article describes how to create template from existent OpenVZ container. You can do directly from SolusVM Admin CP (use "Create template" feature under VirtualServer m...")
 
Line 1: Line 1:
 
Current article describes how to create template from existent OpenVZ container.
 
Current article describes how to create template from existent OpenVZ container.
You can do directly from SolusVM Admin CP (use "Create template" feature under VirtualServer management tab).
+
 
 +
You can do it directly from the SolusVM Admin CP (use "Create template" feature under VirtualServer management tab).
  
 
Anyway there exists cases when you need to create it manually.
 
Anyway there exists cases when you need to create it manually.

Revision as of 17:44, 3 December 2013

Current article describes how to create template from existent OpenVZ container.

You can do it directly from the SolusVM Admin CP (use "Create template" feature under VirtualServer management tab).

Anyway there exists cases when you need to create it manually. It's quite easy.

First stop container that you want to use as source for OVZ template:

vzctl stop <VZID>

Optional is to clean the logs . You can find logfiles for stopped container in next path:

/vz/private/<VZID> 

You can clean messages, secure, maillog, etc. You can clean all logs under /vz/private/<VZID>/var/log/

Create template

tar czf /vz/template/cache/<Template_name>.tar.gz /vz/private/<VZID>

For example create template for container with ID=344 and Template Name will be "Centos6_LAMP_Webmin"

vzctl stop 344
tar czf /vz/template/cache/Centos6_LAMP_Webmin.tar.gz /vz/private/344