2.10.1. Creating Templates

In OpenVZ, you can create a template using the prlctl clone utility. Making a template may prove useful if you need to create several virtual machines or containers with the same configuration. In this case, your steps can be as follows:

  1. You create a virtual machine or container with the required configuration.
  2. You make a template on the basis of the created virtual machine or container.
  3. You use the template to create as many virtual machines or containers as necessary.

Let us assume that you want to create a template of the virtual machine MyVM. To do this, you can run the following command:

# prlctl clone MyVM --name template1 --template

This command clones the virtual machine and saves it as the template1 template. After the template has been successfully created, you can use it for creating new virtual machines.