Технология OpenVZ
Ubuntu 10.04
Сборка ядра с поддержкой OpenVZ
Установка утилит OpenVZ и настройка хост машины
root@gate:~# apt-get install linux-openvz vzctl
root@gate:~# cat /etc/sysctl.d/10-openvz.conf
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.default.proxy_arp = 1
net.ipv4.ip_forward = 1
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 0
root@gate:~# sysctl -p
root@gate:~# ln -s /var/lib/vz /vz
Создание виртуальной машины
root@gate:~# cd /var/lib/vz/template/cache/
root@gate:...# wget http://download.openvz.org/template/precreated/contrib/ubuntu-10.04-minimal_10.04_i386.tar.gz
root@gate:~# vzctl create 101 --ostemplate ubuntu-10.04-minimal_10.04_i386
root@gate:~# vzctl set 101 --ipadd 172.16.1.100+X --save
root@gate:~# vzctl set 101 --hostname server.corpX.un --save
root@gate:~# vzctl set 101 --nameserver 172.16.1.254 --save
root@gate:~# cat /etc/vz/conf/101.conf
...
IP_ADDRESS="172.16.1.100+X"
HOSTNAME="server.corpX.un"
NAMESERVER="172.16.1.254"
root@gate:~# vzctl start 101
root@gate:~# vzctl enter 101