2017-09-13 2 views
0

리눅스 버전 2.6.38과 init.d에서 LXC 2.0을 실행하고 싶습니다. 커널 버전과 initd가 모두 필수 사항인지 여부.커널 2.6.38 및 initd를 기반으로 시스템에서 Linux 네임 스페이스를 사용하는 방법은 무엇입니까?

다음과 같이 네임 스페이스를 지원하는 커널을 다시 컴파일했습니다.

# Kernel parameters 
CONFIG_NAMESPACES=y 
CONFIG_CGROUP_NS=y 
CONFIG_UTS_NS=y 
CONFIG_IPC_NS=y 
CONFIG_USER_NS=y 
CONFIG_PID_NS=y 
CONFIG_NET_NS=y 


[[email protected] ~]# CONFIG=$(pwd)/.config lxc-checkconfig 
--- Namespaces --- 
Namespaces: enabled 
Utsname namespace: enabled 
Ipc namespace: enabled 
Pid namespace: enabled 
User namespace: enabled 
newuidmap is not installed 
newgidmap is not installed 
Network namespace: enabled 
Multiple /dev/pts instances: enabled 
--- Control groups --- 
Cgroup: enabled 
Cgroup clone_children flag: enabled 
Cgroup device: missing 
Cgroup sched: enabled 
Cgroup cpu account: enabled 
Cgroup memory controller: enabled 
Cgroup cpuset: enabled 

lxc-start -n ts1 --logfile=ts1.log에서 다음 호를 치기 전까지는 모든 것이 성공적으로 실행됩니다.

lxc_start - start.c:preserve_ns:138 - No such file or directory - Kernel does not support attaching to namespaces. 

LXC/start.c : (138) 내 부모 프로세스가 /proc/<PID>/ns 폴더가없는 내가 확인할 때조차 initd를 포함하여 시스템의 모든 프로세스에 대해 사실이라고 말한다.

initd가 네임 스페이스를 초기 프로세스로 고려하지 않는다고 가정합니다.

initd를 네임 스페이스로 연결하려면 어떻게해야합니까?

답변

0

편집 : 오 판독 질문, 수정 :

가 가진 것 같다 - https://cateee.net/lkddb/web-lkddb/PID_NS.html가 충분하지 않다가, 아마 필요한 다른 옵션이 있습니다. (CONFIG_EXPERIMENTAL?)

어딘가에서 lxc 컨테이너가있는 데비안 스퀴즈 (6, 2.6 커널 라인)를 본 기억이 있습니다. 따라서 할 수 있어야합니다. 어쩌면 거기에서 Kconfig를 가져와 비교해보십시오.

나는 또한, 시도하고 어쩌면 비교이 패치 세트를 발견, 나는 높은 것 ~ 2009 커널과의 호환성을 기대하지 않을 것이다 오래된 LXC (V1)을 고려 http://lxc.sourceforge.net/patches/linux/2.6.38/2.6.38.2-lxc1/patches/

을 또한 (모든 경우) 우선 순위 - 그래서 고대 커널과 함께 lxd에 더 많은 경고와 함정이있을 가능성이 있습니다.

관련 문제