Salut,
je souhaite virtualiser avec LXC, mais dès le premier check, celui-ci me rapporte une erreur.
J’ai cru comprendre que Michel (entre autres) est un adepte de LXC …
[quote]# lxc-checkconfig
Kernel config /proc/config.gz not found, looking in other places…
Found kernel config file /boot/config-2.6.32-5-amd64
— Namespaces —
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Multiple /dev/pts instances: enabled
— Control groups —
Cgroup: enabled
Cgroup namespace: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: missing
Cgroup cpuset: enabled
— Misc —
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
File capabilities: enabled
Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig
#[/quote]
Si j’ai bien orienté mes recherches, celles-ci me ramènent à la re-compilation du kernel. (?)
Kernel Documentation / cgroups / memory.txt
[quote]
…
260 2.7 Kernel Memory Extension (CONFIG_CGROUP_MEM_RES_CTLR_KMEM)
261
262 With the Kernel memory extension, the Memory Controller is able to limit
263 the amount of kernel memory used by the system. Kernel memory is fundamentally
264 different than user memory, since it can’t be swapped out, which makes it
265 possible to DoS the system by consuming too much of this precious resource.
266
267 Kernel memory limits are not imposed for the root cgroup. Usage for the root
268 cgroup may or may not be accounted.
269
270 Currently no soft limit is implemented for kernel memory. It is future work
271 to trigger slab reclaim when those limits are reached.
272
273 2.7.1 Current Kernel Memory resources accounted
274
275 * sockets memory pressure: some sockets protocols have memory pressure
276 thresholds. The Memory Controller allows them to be controlled individually
277 per cgroup, instead of globally.
278
279 * tcp memory pressure: sockets memory pressure for the tcp protocol.
280
281 3. User Interface
282
283 0. Configuration
284
285 a. Enable CONFIG_CGROUPS
286 b. Enable CONFIG_RESOURCE_COUNTERS
287 c. Enable CONFIG_CGROUP_MEM_RES_CTLR
288 d. Enable CONFIG_CGROUP_MEM_RES_CTLR_SWAP (to use swap extension)
289
290 1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?)
291 # mount -t tmpfs none /sys/fs/cgroup
292 # mkdir /sys/fs/cgroup/memory
293 # mount -t cgroup none /sys/fs/cgroup/memory -o memory
294
295 2. Make the new group and move bash into it
296 # mkdir /sys/fs/cgroup/memory/0
297 # echo $$ > /sys/fs/cgroup/memory/0/tasks
298
299 Since now we’re in the 0 cgroup, we can alter the memory limit:
300 # echo 4M > /sys/fs/cgroup/memory/0/memory.limit_in_bytes
301
302 NOTE: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo,
303 mega or gigabytes. (Here, Kilo, Mega, Giga are Kibibytes, Mebibytes, Gibibytes.)
304
305 NOTE: We can write “-1” to reset the *.limit_in_bytes(unlimited).
306 NOTE: We cannot set limits on the root cgroup any more.
307
308 # cat /sys/fs/cgroup/memory/0/memory.limit_in_bytes
309 4194304
310
311 We can check the usage:
312 # cat /sys/fs/cgroup/memory/0/memory.usage_in_bytes
313 1216512
314
…[/quote]
Mes outils.
# dpkg -l | egrep -e "gcc|make|binutils"
ii binutils 2.20.1-16 The GNU assembler, linker and binary utilities
ii gcc 4:4.4.5-1 The GNU C compiler
ii gcc-4.3 4.3.5-4 The GNU C compiler
ii gcc-4.3-base 4.3.5-4 The GNU Compiler Collection (base package)
ii gcc-4.4 4.4.5-8 The GNU C compiler
ii gcc-4.4-base 4.4.5-8 The GNU Compiler Collection (base package)
ii libgcc1 1:4.4.5-8 GCC support library
ii make 3.81-8 An utility for Directing compilation.
ii module-assistant 0.11.3 tool to make module package creation easier
#
linux-image et linux-headers.
# aptitude search linux-source
p linux-source - Linux kernel source (meta-package)
p linux-source-2.6 - Linux kernel source (dummy package)
p linux-source-2.6.32 - Linux kernel source for version 2.6.32 with Debian patches
p linux-source-3.2 - Linux kernel source for version 3.2 with Debian patches
#
# aptitude search linux-headers
v linux-headers -
v linux-headers-2.6 -
p linux-headers-2.6-amd64 - Header files for Linux amd64 configuration (dummy package)
p linux-headers-2.6-openvz-amd64 - Header files for Linux 2.6-openvz-amd64 (meta-package)
p linux-headers-2.6-vserver-amd64 - Header files for Linux 2.6-vserver-amd64 (meta-package)
p linux-headers-2.6-xen-amd64 - Header files for Linux 2.6-xen-amd64 (meta-package)
p linux-headers-2.6.32-5-all - All header files for Linux 2.6.32 (meta-package)
p linux-headers-2.6.32-5-all-amd64 - All header files for Linux 2.6.32 (meta-package)
i linux-headers-2.6.32-5-amd64 - Header files for Linux 2.6.32-5-amd64
i A linux-headers-2.6.32-5-common - Common header files for Linux 2.6.32-5
p linux-headers-2.6.32-5-common-openvz - Common header files for Linux 2.6.32-5-openvz
p linux-headers-2.6.32-5-common-vserver - Common header files for Linux 2.6.32-5-vserver
p linux-headers-2.6.32-5-common-xen - Common header files for Linux 2.6.32-5-xen
p linux-headers-2.6.32-5-openvz-amd64 - Header files for Linux 2.6.32-5-openvz-amd64
p linux-headers-2.6.32-5-vserver-amd64 - Header files for Linux 2.6.32-5-vserver-amd64
p linux-headers-2.6.32-5-xen-amd64 - Header files for Linux 2.6.32-5-xen-amd64
p linux-headers-3.2.0-0.bpo.2-all - All header files for Linux 3.2 (meta-package)
p linux-headers-3.2.0-0.bpo.2-all-amd64 - All header files for Linux 3.2 (meta-package)
p linux-headers-3.2.0-0.bpo.2-amd64 - Header files for Linux 3.2.0-0.bpo.2-amd64
p linux-headers-3.2.0-0.bpo.2-common - Common header files for Linux 3.2.0-0.bpo.2
p linux-headers-3.2.0-0.bpo.2-common-rt - Common header files for Linux 3.2.0-0.bpo.2-rt
p linux-headers-3.2.0-0.bpo.2-rt-amd64 - Header files for Linux 3.2.0-0.bpo.2-rt-amd64
p linux-headers-3.2.0-2-all - All header files for Linux 3.2 (meta-package)
p linux-headers-3.2.0-2-all-amd64 - All header files for Linux 3.2 (meta-package)
p linux-headers-3.2.0-2-amd64 - Header files for Linux 3.2.0-2-amd64
p linux-headers-3.2.0-2-common - Common header files for Linux 3.2.0-2
p linux-headers-3.2.0-2-common-rt - Common header files for Linux 3.2.0-2-rt
p linux-headers-3.2.0-2-rt-amd64 - Header files for Linux 3.2.0-2-rt-amd64
p linux-headers-amd64 - Header files for Linux amd64 configuration (meta-package)
p linux-headers-rt-amd64 - Header files for Linux rt-amd64 configuration (meta-package)
#
Suis je dans le vrai, me faut il recompiler ?
Pour m’aider le Wiki (Compiler et patcher son noyau) est il suffisant ?
Avant de plonger dans le grand bain … ![]()
