OpenVZ Forum


Home » International » German » Debian Squeeze cpu limit anleitung
Debian Squeeze cpu limit anleitung [message #45546] Fri, 16 March 2012 13:24
bionic is currently offline  bionic
Messages: 2
Registered: March 2012
Junior Member
hey ho,
hier ne kurze Anleitung für einen selbstkompilierten Kernel. Vielleicht kann´s jemand brauchen...

Problem: mit dem kernel 2.6.32-5, installiert über apt-get install linux-image-2.6-openvz-amd64 konnte man das CPU-Limit vom container nicht setzen.

Lösung: Den aktuellen Kernel (rhel6/042stab049.6) mit dem folgenden bash-script selber kompilieren und einbinden...

Linux Kernel: linux-2.6.32
Arch: AMD64

#!/bin/bash
apt-get install kernel-package libncurses5-dev tar patch gzip -y
cd /root
wget kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.tar.bz2 # KERNEL
wget download.openvz.org/kernel/branches/rhel6-2.6.32/042stab049.6/patches/patch-042stab049.6-combined.gz #PATCH
tar xjf linux-2.6.32.tar.bz2
cd linux-2.6.32
gzip -dc ../patch-042stab049.6-combined.gz | patch -p1
wget download.openvz.org/kernel/branches/rhel6-2.6.32/042stab049.6/configs/config-2.6.32-042stab049.6.x86_64 -O .config # CONFIG
make menuconfig # Settings ggf. ändern
make-kpkg --append_to_version=-1-bionic --revision=1 --initrd --config menuconfig binary-arch
dpkg -i ../linux-image-2.6.32-1-bionic_1_amd64.deb
update-initramfs -c -k 2.6.32-1-bionic
/usr/sbin/update-grub


Danach neustarten und den neuen Kernel wählen.
vzctl set XXX --cpus 1 --save sollte dann funktionieren Wink
Previous Topic: OpenVZ mit Debian Squeeze
Next Topic: V-Server kommen nicht ins Internet
Goto Forum:
  


Current Time: Sun Jul 28 23:18:45 GMT 2024

Total time taken to generate the page: 0.02766 seconds