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:
- You create a virtual machine or container with the required configuration.
- You make a template on the basis of the created virtual machine or container.
- 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.