OpenVZ-1.0
From Grid5000
This page describes the 1.0 version of the openVZ environment based on Lenny version of Debian distribution for AMD64/EM64T machines. It intends to explain how this environment was built and how to use it with Kadeploy.
Contents |
Identification sheet
|
Lenny-x64-openvz-1.0 |
|---|
|
|
Kernel version 2.6.26-2-openvz-amd64 from Debian for amd64/em64t |
|
Authentication
|
|
Applications |
|
Misc
|
Build
Here are explanations on how the system was installed and tuned from a Lenny-x64-base-2.2.
Motd
Motd is updated :
cat > /etc/motd.tail <<EOF
Lenny-x64-openvz-2.2 (image based on Debian version Lenny/stable for AMD64/EM64T)
Maintained by Philippe-Charles Robert <philippe-charles.robert@loria.fr>
Valid on Dell {PE1855, PE1950}, HP {DL140G3, DL145G2, DL385G2},
IBM {e325, e326, e326m}, Sun {V20z, X2200 M2, X4100},
Altix Xe 310, Carri CS-5393B
Applications
* Text: Vim, XEmacs, JED, nano, JOE
* Script: Perl, Python, Ruby
(Type "dpkg -l" to see complete installed package list)
Misc
* i386 shared libraries are available
* SSH has X11 forwarding enabled
* Max open files: 8192
* TCP bandwidth: for 1Gbs
More details: https://www.grid5000.fr/index.php/Lenny-x64-openvz-1.0
EOF
Packages
Install OpenVZ and related tools
apt-get update && apt-get install linux-image-openvz-amd64 vzctl vzquota
Remove useless files in /boot:
rm /boot/System.map-2.6.26-2-amd64 rm /boot/config-2.6.26-2-amd64 rm /boot/intrd.img-2.6.26-amd64 rm /boot/vmlinuz-2.6.26-2-amd64
Create a symlink from /var/lib/vz to /vz to provide backward compatibility:
ln -s /var/lib/vz /vz
We should reboot to check everything work fine.
Before this, we switch the description file to lenny-x64-openvz-1.0.dsc3, otherwise the node will reboot in the base environment.
See Recording_environment at the end of this article.
tgz-g5k probert@frontend:lenny-x64-openvz.tgz
Once rebooted:
Check the running kernel is the OpenVZ one
uname -a
Install miscellaneous tools and remove the lenny-base kernel
apt-get install debootstrap sysfsutils lvm2 libyaml-ruby cstream apt-get autoremove linux-image-2.6.26-2-amd64 linux-image-2.6-amd64 linux-headers-2.6-amd64 linux-headers-2.6.26-2-amd64
Install the vzdump package (which is not per default available on the Debian repository)
wget http://www.proxmox.com/cms_proxmox/cms/upload/vzdump/vzdump_1.1-1_all.deb dpkg -i vzdump_1.1-1_all.deb
/!\ pas dans le proxy - le mettre dans un dépôt git? /!\ /!\ dépendances exim4 /!\
vim /etc/sysctl.conf
net.ipv4.conf.all.rp_filter=1 net.ipv4.icmp_echo_ignore_broadcasts=1 net.ipv4.conf.default.forwarding=1 net.ipv4.conf.default.proxy_arp = 0 net.ipv4.ip_forward=1 kernel.sysrq = 1 net.ipv4.conf.default.send_redirects = 1 net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.eth0.proxy_arp=1
sysctl -p
vim /etc/vz/vz.conf >NEIGHBOUR_DEVS=all ( avant #NEIGHBOUR_DEVS=default )
Get debian-5.0-amd64-minimal.tar.gz
mv /root/debian-5.0-amd64-minimal.tar.gz /var/lib/vz/template/cache/
Basic Commands
vzctl create 101 --ostemplate debian-5.0-amd64-minimal --config vps.basic vzctl set 101 --onboot yes --save vzctl set 101 --hostname test.example.com --save vzctl set 101 --ipadd 192.168.0.101 --save
