Create OS Template

From Virtualizor Wiki
Jump to: navigation, search


You can use Virtualizor to create / clone an existing VPS. Its very simple to do so.

Some Notes

  • Create VPS of Minimum size for Linux OS templates because OS template size is equal to VPS disk space
  • Install all necessary software on the VPS you are going to clone

How to do it ?

Just go to the Virtualizor Admin Panel -> Media -> Create Template
Select the vps id which of which you want to create template
Once the template is created it will be automatically added to virtualizor -> Media -> OS templates, so you can use this template to create VPSs on your server.
You can check the template creation logs in /var/virtualizor/log/createtemplate.log file on the server where the VPS is hosted.

Create template.png

Configuration Options

Create template options.png

pygrub : PyGrub enables you to start Linux domUs with a kernel inside the DomU instead of a kernel that lies in the filesystem of the dom0. If you want to enable pygrub for the template then tick the checkbox (Only for Xen VPSs only).
Check to create Ext4 file system. : As the name suggest, if you want to create a Ext4 file system for the template then tick the checkbox. By default ext3 filesystem is created.
Disk Name : By default the Drive is sda. Xen templates specifically require xvda to be specified as the Disk name.
Dont Resize Filesystem : If checked virtualizor will not resize the File system of the VPS which is created from this template.
Perform Operations : Operations like changing network settings, root password will be performed for the VPS created from this template only if this checkbox is checked while creating the template. You can however change it anytime after the template is created by editing the template.

Windows Templates

You can use the above method to create a Windows template as well. In the above method the File System of the OS is not shrinked and the Template will be created of exactly the same size as the VPS (in case of Xen-HVM and KVM)

We do have an alternative method to create a Windows Template which will shrink the file system as well, but you require to clean shut down of vps before creating the template and system reserved partition has to be removed.

Execute the following command for creating the windows template :
root> /usr/local/emps/bin/php /usr/local/virtualizor/tools/windows.php <BLOCK_DEVICE> <TEMPLATE_NAME>

root> /usr/local/emps/bin/php /usr/local/virtualizor/tools/windows.php /dev/vg/vsv1001-id-uuid windows-2008r2.img

Note : Lvname can be obtained using lvscan command and it can be identified by vps id.

Eg: If vps id is v1001 then lvname will be vsv1001-id-uuid.

For removing the System reserved 100MB partition please follow the steps given below :

1)Open a command prompt with administrator privileges (right click => run as administrator)
bcdboot c:\windows /s c:
You should get a message similar to:
Boot files successfully created.
2) Open the Disk Management GUI (you could use diskpart for scripts), locate the  C:\ partition right-click and select 
“Mark Partition as Active”, select yes to the “do you want to continue message”
3) Reboot to confirm that everything is ok.
4) In Disk Management you can now delete the 100Mb System Reserved partition by right clicking on it and selecting “Delete volume”

We do provide pre-created Windows OS Templates. Just contact our support team and they will make it for you and give you the templates.

Note : If the vps is created from ISO then it will contain System reserved partition which will cause issues in setting the vps password and disk resize for the vps created from this newly created template.
Note : Virtualizor also has the capability of setting the Windows Password if the admin username is "Administrator"