This script creates a new virtual server on the current machine. It is invoked as


where NAME is the name of the virtual server, DISKSPACE is the amount of disk space to be allocated (as for lvcreate), DISTRIBUTION is the Debian distribution to be installed (currently only »etch« works), and IPADDRESS is the desired IP address. NAME is mandatory while DISKSPACE defaults to 5G, DISTRIBUTION defaults to »etch«, and IPADDRESS defaults to »10.0.0.x/24«, where »x« is 1 plus the number of virtual servers that have already been defined.

In particular, vserver-create performs the following steps:

  • Check that it is invoked as root
  • Read the /etc/our-isp/vserver-create.conf file, if it exists, to establish defaults
  • Check that the virtual server name has not already been taken
  • Create a logical volume of the appropriate size, generate an ext3 file system on it and mount it under /vs/NAME
  • Add an entry for the file system to /etc/fstab
  • Initialise the actual virtual server using newvserver, which in turn calls upon debootstrap
  • Set up the appropriate time zone and name server (see below)
  • Install and configure the etckeeper package and bring the /etc directory under Mercurial version control
  • Set the virtual server to be auto-started when the host boots


Please note the following:

  • If the host is runnning Debian Etch, only Etch servers can be generated, since debootstrap in Etch doesn't know anything newer. (We assume no one is still interested in Woody nor Sarge.) If a newer Debian version is desired, generate an Etch server and upgrade it by hand.
  • The newvserver script insists on initialising the name server in resolv.conf to the content of the host's resolv.conf file, which in the case of grobian is Since Linux vservers do not have access to, host lookups fail (which means that no extra packages can be installed etc.). To avoid this problem, vserver-create uses a preset IP address for the resolver (currently, which is correct for our hosting outfit -- another value can be set in the configuration file).
  • The newvserver script skips the tedious manual timezone selection and instead installs a time zone whose name is given in the configuration file -- by default, Europe/Berlin is used.
  • The script installs etckeeper to establish source control for the /etc directory. However since etckeeper is not part of Debian Etch, if an Etch server is installed it is instead taken from the Etch-backports server. The corresponding URLs are hard-coded in the script for now and should be checked if the etckeeper installation fails for whatever reason.
  • Also we patch the etckeeper file pre-install.d/50uncommitted-changes to allow aborting a package installation if /etc contains uncommitted changes, rather than ignoring them.
Last modified 9 years ago Last modified on May 6, 2008, 3:54:36 PM