Previous page

Next page

Locate page in Contents

Print this page

Deploying a Template

Though a template has the same components as a virtual machine (hardware, software, etc.), it cannot be started. To run a template as a virtual machine, you need first to convert the template. By converting a template, you create a virtual machine with the configuration identical to that of the template.

To convert a template into a virtual machine, use the --ostemplate option of the pctl create command. For example, to convert the template1 template to a virtual machine with the Converted_VM name, you can run this command:

# pctl create Converted_VM --ostemplate template1

Creating the VM on the basis of the template1 template...

Clone the template1 VM to the VM Converted_VM...

Operation progress 99%

The VM has been successfully cloned.

To check that the Converted_VM virtual machine has been successfully created, use the pctl list -a command:

# pctl list -a

STATUS IP_ADDR NAME

running 10.12.12.101 111

stopped 10.12.12.34 Converted_VM

running 10.30.17.149 Windows XP

The template itself is left intact and can be used for creating other virtual machines:

# pctl list -t

{4ad11c28-9f0e-4086-84ea-9c0487644026} win-2003 template1

{64bd8fea-6047-45bb-a144-7d4bba49c849} rhel template2