KVM template scripts

From ISPWiki

Jump to: navigation, search

When creating a VPS under KVM, VDSmanager runs the scripts in the template. Following is the list of scripts:

  • copy-template - defines how to copy a template. This script can be used in case of non-standard behaviour when copying a template into the VPS directory.


1. The path to the template

2. The path to the VPS files

  • install - this script executes once the template's content is copied to the VPS directory. Normally it is used to prepare virtual server's file images.


1. The path to the VPS files

2. The VPS disk size

3. The VPS name

  • install-disk - this script runs upon initialization of the VPS file system.


1. The path to the template

2. The path to the VPS

3. The path to the virtual disk file of VPS.

After the installation process is finished and the VPS is configured, VDSmanager will read the file post-deploy and will send a message to vdstools of the virtual server. vdstools will try to execute the script inside the VPS. The script's size must not exceed 2 kb.

FreeBSD template files


The file will be put into /etc/rc.conf, the above fields will be specified automatically

The fields that will be filled out when adding a VPS

  • __VDS_IP__
  • __NETMASK__
  • __GATEWAY__

Example of the file /etc/rc.conf-isp



ifconfig_em0="inet __VDS_IP__ netmask __NETMASK__"


Was this helpful? Yes | No
Personal tools