Создание темплейта Debian в OpenVZ

Debian:

sudo apt-get install debootstrap

Gentoo:

sudo emerge debootstrap
Fedora:

sudo yum install debootstrap

Lenny (текущий Debian stable-релиз)

debootstrap --arch i386 lenny /vz/private/219 http://ftp.ua.debian.org/debian/

На ноде с виртуалками должен /etc/sysctl.conf быть правильным:
# On Hardware Node we generally need packet
# forwarding enabled and proxy arp disabled

net.ipv4.conf.default.forwarding=1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.ip_forward=1

# Enables source route verification
net.ipv4.conf.all.rp_filter = 1

# Enables the magic-sysrq key
kernel.sysrq = 1

# TCP Explict Congestion Notification
net.ipv4.tcp_ecn = 0

# we do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0

Инициализируем начальным конфигом:
sudo vzctl set 219 --applyconfig vps.basic --save

Определяем OSTEMPLATE, кстате можно посмотреть или подправить самому:
ls /etc/vz/dists/|grep -v old
altlinux-2.4.conf
altlinux-3.0.conf
altlinux-4.0.conf
altlinux.conf
arch-0.7.conf
arch-0.8.conf
arch.conf
centos-3.conf
centos-4.conf
centos.conf
debian-3.0.conf
debian-3.1.conf
debian-4.0.conf
debian.conf
default
distribution.conf-template
fedora-7.conf
fedora-8.conf
fedora-9.conf
fedora-core-1.conf
fedora-core-2.conf
fedora-core-3.conf
fedora-core-4.conf
fedora-core-5.conf
fedora-core-6.conf
fedora-core-7.conf
fedora-core.conf
gentoo.conf
mandrake.conf
opensuse.conf
owl.conf
redhat-7.0.conf
redhat-7.1.conf
redhat-7.2.conf
redhat-7.3.conf
redhat-8.0.conf
redhat-9.conf
redhat.conf
rhel-3.conf
rhel-4.conf
scripts
slackware-10.0.conf
slackware-10.1.conf
slackware-9.0.conf
slackware-9.1.conf
slackware.conf
sles-9.conf
sles.conf
suse-7.3.conf
suse-8.0.conf
suse-8.1.conf
suse-8.2.conf
suse-9.0.conf
suse-9.1.conf
suse-9.2.conf
suse-9.3.conf
suse.conf
ubuntu-5.1.conf
ubuntu.conf

# vzctl --help
vzctl version 3.0.22
Copyright (C) 2000-2007 SWsoft.
This program may be distributed under the terms of the GNU GPL License.

Usage: vzctl [options] [parameters] vzctl destroy | mount | umount | stop | restart | status | enter
vzctl create [--ostemplate ] [--config ] [--private ] [--root ] [--ipadd ] | [--hostname ] vzctl start [--force] [--wait] vzctl exec | exec2 [arg ...] vzctl runscript

Яндекс.Метрика