Vserver en:creating own images

Aus Cryptronic
Wechseln zu: Navigation, Suche



this method works for all distros known to work with Linux Vserver.


Creating own images for openvcp is pretty easy:

  1. Install a normal VServer, with existing image or brand new with vserver build.
  2. Start the vserver (vserver xyz start)
  3. Enter into the vserver with vserver xyz enter and install your applications with the preferred way of your distribution, e.g. apt-get.
  4. Shut down the vserver (vserver xyz stop)
  5. Copy the files inside of the vserver directory e.g. /vservers/xyz to the openvcp image directory e.g. /vservers/images/your_image_name: cp -a /vservers/xyz /vservers/images/your_image_name

openvcp features

There are some features in openvcp for creating vservers from images. You have the possibility to execute a shell script befor the image is copyed into the new vserver (pre script) and there is a script which is executed in the context of the new installed vserver after the vserver is started (post script).

pre script

You have to locate the shell script in the openvcp images directory and name it in the following way: <image_name>-pre.sh

E.g.: when you have an image with the name debian the pre script name would be debian-pre.sh

This script will be executed with the vservername as argument 1.

Attention: This script is executed in the node context.

post script

This shell script is executed inside of the vserver when the Vserver is started the first time, after this run this script will be deleted.

You have to name this script with <image_name>-post.sh

E.g.: when you have an image with the name debian the pre script name would be debian-post.sh


I could take no responsibility for these methods.

When you have questions please contact me via email.

Meine Werkzeuge