I have added a “DNS toaster” template: TinyVZ-0.7.02Deadwood.tar.gz (sig) Warning This is an OpenVZ template and it will create a number of folders and files in the directory it is extracted to. If extracting this by hand, be sure to do so in an empty directory. Since this is a template, it will need files included with TinyVZ-0.7.02.tar.gz to function, as well as OpenVZ.
Instructions for setting up the DNS toaster are included in the template file.
Other services can be set up to start at container start time by being added by hand to /etc/sysinit.sh.
About
One issue I have had with OpenVZ is that there is not a small template based on Busybox out there. So, in the spirit of open source, I solved this problem by making my own tiny OpenVZ template based on Busybox and uClibc.
TinyVZ is a tiny OpenVZ template. This allows OpenVZ users to have a container that uses far fewer resources than a container built from a traditional Linux distribution. The goals are to have a system that uses less memory and disk space than other OpenVZ templates.
This is a self-hosting template with all source code; it is possible to compile the entire system inside of the template. Look in the build/ directory (inside the template) for source code.
The system includes the following packages:
The system is for hard core UNIX/Linux gurus: The only editor is a miniature version of vi included with Busybox (actually, I also compiled in Busybox's version of the "ed" editor, for those who feel vi pampers the user too much); all configuration is done by editing text files.
It is now possible to use the relevant vzctl commands to set the IP, username/password, hostname, and DNS nameservers used. Note that vzctl 3.0.28 or higher is required to run this template.
The only unpaid support I supply for TinyVZ at this time is to fix security problems with a CVE vulnerability number that affect compiled programs outside of the /build tree. CVE 2010-0001 has been patched; other CVE issues have not been patched because they do not appear to be serious security issues that affect TinyVZ. Details are in the file build/CVE inside of the container.
It can be downloaded here:
http://samiam.org/TinyVZ/TinyVZ-0.7.02.tar.gz GPG sig
#!/bin/sh # Copyright 2011 Sam Trenholme. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # POSIX-compatible script for adding an IP to the TinyVZ container for ip in $IP_ADDR ; do if ! grep $ip /etc/iplist > /dev/null ; then echo IPLIST=\$IPLIST\" $ip\" >> /etc/iplist fi done # Reset all IPs ifconfig venet0 down . /etc/iplist NUMBER=0 for IP in $IPLIST ; do if [ $NUMBER -gt 0 ] ; then ifconfig venet0:$NUMBER $IP else ifconfig venet0 $IP fi NUMBER=$( expr $NUMBER + 1 ) done route add -net 0.0.0.0 dev venet0